#stone
1 messages · Page 1 of 1 (latest)
hi! it depends how you do the upgrade.
in the default case, they just move to the $10 month plan immediately and stay on it, doesn't matter what happens to payments
there's this way of doing the upgrade though : https://stripe.com/docs/billing/subscriptions/pending-updates where the change to the new plan doesn't happen until the payment is successful.
Bit of a broad question! Is there a specific use case you're trying to account for?
Reference to :Pending updates aren’t supported when the subscription’s collection_method is send_invoice or when bank debits are used as the payment method for the subscription.
My customers use Cards and Sepa to pay.
Here are the bank debit PaymentMethods:
https://stripe.com/docs/payments/bank-debits
Cards are not
By default, updates are applied regardless of whether payment on the new invoice succeeds. If payment fails,will the webhook event custom.subscription.delete be sent to my server?
customer.subscription.deletedis sent when a customer’s subscription ends. for failed payments you'll receive invoice.payment_failed events
All subscription events and explanation can be found here:
https://stripe.com/docs/billing/subscriptions/webhooks#events
itemBuilder.setPrice(toStripePriceId);
itemBuilder.setId(stripeSubscription.getItems().getData().get(0).getId());
subscriptionUpdateParamsBuilder
= subscriptionUpdateParamsBuilder.setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.ALWAYS_INVOICE);
subscriptionUpdateParamsBuilder
= subscriptionUpdateParamsBuilder.addItem(itemBuilder.build());
//Monthly -> Monthly
if (fromInterval.equals("month") && toInterval.equals("month") ){
subscriptionUpdateParamsBuilder = subscriptionUpdateParamsBuilder.setProrationDate(stripeSubscription.getCurrentPeriodStart());
}
//Monthly -> Yearly
//Yearly -> Yearly
com.stripe.model.Subscription subscription
= stripeSubscription.update(subscriptionUpdateParamsBuilder.build());
😣 Does this also apply to the immediate billing case of always_invoice?
Not sure I understand this part. I invite you to test and if you face any particular issue don't hesitate to come back with your follow up question and concrete example (stripe object Ids)