#elianbraja
1 messages · Page 1 of 1 (latest)
Hi there
Can you provide an example Subscription that I can look at where this occurred?
The ID of the Subscription specifically
Thanks looking
thank you
I see that everything gets added on the upcoming invoice
Instead I want the customer to make the payment of the newly added items and then update the subscription
Hmm not seeing the payment_behavior specified in any of those update requests
You can see the POST body in your Dashboard: https://dashboard.stripe.com/test/logs/req_DXICa2ma47Qnoj
Sounds like you may not have saved your code or you have something cached in your backend
I fixed the problem with the payment behaviour
I want the subscription to be on hold until the customer makes the payment of the prorated amount
how can I do that?
Ah you need to pass proration_behavior as well here
So try proration_behavior: always_invoice
Since you want to actually generate an invoice here to attempt to charge
ah ok, but why is it maked as paid automatically?
Well it will attempt payment immediately
If that fails then the update won't occur
That is how pending_if_incomplete works
It attempts from customer's default payment method?
👋 Hopping in here since bismarck has to head out soon
Yup, payment would be attempted with the customer's default payment method
but can I change that for the subscription update?
So my flow is:
- Customer decides to update subscription
- Subscription is pending until successful payment
- An open invoice gets created and user can select any payment method
- If payment succeeds subscription gets activated
With these options:
payment_behavior: "pending_if_incomplete",
proration_behavior: "always_invoice"
I have no pay to specify the payment method for the charge to be applied
The only thing I can think of here is trying to use pending_if_incomplete with collection_method: send_invoice
But backing up for a second - do you really need a pending update? What d you want to happen if the update is never paid for?
if the update is never paid the subscription should remain as it was before
but I also want a prorated calculation
But why do you want to allow your user to select a different payment method if they already have one that works?
So you suggest to automatically collect payment from their default payment method?
and say that they have to change the default payment method before before updating the subscription if they want another one?
Yup
but what happens if customer does not have any default payment method?
Where does Stripe attempt to collect payment?
If the customer doesn't have a default payment method at all then we won't attempt payment (and the update won't be applied to the subscripton)
I want to add a Declined Test Card as my customer's default payment method but I cannot add it because Stripe says that is a declined card
how can I test?
You can use the 4000000000000341 test card if you want to test this
yes, but I cannot add it to customer
because Stripe cannot let me add Declined Cards
How are you trying to add it to the customer? If you just add it through the dashboard it should work fine
That's a different card then the one I shared with you
You specifically want to use the 4000000000000341 one
(we have that one specifically for this use case where you want to attach a PM that will decline)
ah ok
My last question is. If I use payment_behaviour: "error_if_incomplete" with it also keep the subscription not updated?
So what is the difference between "pending_if_incompleted" and "error_if_incompleted" if both of them keep the subscription not updated if payment fails?
apart from the fact that "error_if_incompleted" returns an error
So the difference between error_if_incomplete and pending_if_incomplete is that when payment fails with pending_if_incomplete you still have time (23 hours) to try and complete payment and have the update apply
If payment still isn't successful after the 23 hours then the update is expired
and with error_if_incomplete the user does not have the option to retry payment?
isn't there an invoice created that can be retried?
That's right - with error_if_incomplete there would be no Invoice created that could be retried and you'd have to make the update call again
ok I understand. Thank you