> For example, what if customer does not upgrade the plan, but downgrades? How would proration work in that case?
Stripe deals with the prorata and credits the customers account next billing cycle.
> what if Stripe cannot charge credit card for a day or two
Stripe re-trys at time intervals you specify
> What if user managed to resubscribe again using different credit card
Stripe handles the connection because a subscription and card is attached to a customer object. Stripe will intelligently tie all this up and only charge the customer once even if two cards are entered.
> What if the card is permanently unchargable
After a specified number of failed charges stripe will send you a separate webhook at which point you know this is a completely failed card. Simply send the user an email and ask them to re-enter card details. If the card authenticates stripe will tie things together and correctly charge for the subscription.
> Stripe handles the connection because a subscription and card is attached to a customer object.
That all sound good in top-level theory.
In practice that would mean that I have to reattach new credit card to the same customer object in Stripe.
I didn't even research if it's possible, but if it is - that's a different API call. Different than API call for signing up new customer.
Updating credit card on existing customer makes it harder to allow customer to return back to customer's previous credit card ("Use my previously entered Visa credit card ending by 1234").
How about the case when:
- Payment delayed.
- I removed premium membership from user.
- Stripe subscription finally charged old user's credit card, but my system did not receive IPN notification yet.
- User resubscribed again with new credit card.
- Then my system receives old credit card charge IPN notification.
What should my system do in that case?
What if my user decided switch to PayPal and still has Stripe subscription stuck in the limbo?
What do I do when I receive that we-were-able-to-charge-that-stubborn-credit-card IPN if user already paid by other means?
Do you see how these "Stripe-to-my-system subscription synchronization" issues are getting very ugly very quick?
Stripe deals with the prorata and credits the customers account next billing cycle.
> what if Stripe cannot charge credit card for a day or two
Stripe re-trys at time intervals you specify
> What if user managed to resubscribe again using different credit card
Stripe handles the connection because a subscription and card is attached to a customer object. Stripe will intelligently tie all this up and only charge the customer once even if two cards are entered.
> What if the card is permanently unchargable
After a specified number of failed charges stripe will send you a separate webhook at which point you know this is a completely failed card. Simply send the user an email and ask them to re-enter card details. If the card authenticates stripe will tie things together and correctly charge for the subscription.