#ijsje
1 messages · Page 1 of 1 (latest)
Customers can use credit card or it's a sepa automatic charge
i use invoice immediatly
response = stripe.Subscription.modify( subscription_obj.subscription, items=items, proration_behavior='always_invoice', payment_behavior='allow_incomplete', )
is it possible to see in this response if the customer needs to do additional work to complete the payment? Since I would like to send the customer to the stripe customer portal in that case.
You need to use webhooks to check if there was a problem.
Also for 3d secure? Stripe would know if the payment method use 3d secure beforehand right?
We would try it and if the bank requires 3ds the automatic payment would fail, then we send a webhook event.
What would be the best strategy to deal with this then? Should I automatically send the customer to the customer portal after updating their subscription?
Or do they get an email from stripe and that should be enough
You can enable automatic emails from Stripe in your settings.
https://dashboard.stripe.com/settings/billing/automatic
In Prevent failed payments section
I see that the subscription response should contain the incomplete_status
or is this later added?
Yes
Unfortunately I am not seeing the incomplete_status
I only see past due
Onvolledig means incomplete
Can you summarise the issue for me please
I use subscription modify api to modify the subscription. Now I am trying to deal with payment failures and 3d secure. Vanya said that you can't see this in the response from subscription modify api, but you see this through webhooks.
Now I am retreiving the subscription after a while and it only gives me status="past due"
I don't see the incomplete status for 3d secure
https://stripe.com/docs/billing/migration/strong-customer-authentication#option-1:-using-the-payment-behavior-flag
past_due would be accurate yes. Your updates would have likely triggered a new invoice to reflect the changes, and if payment fails (i.e 3DS requested), then it'll probably push it to past_due
So how can I know if payment is incomplete?
this is my modify subscription code:
response = stripe.Subscription.modify( subscription_obj.subscription, items=items, proration_behavior='always_invoice', payment_behavior='allow_incomplete', )
Isn't past_due a good indicator of that? Anyway if you wanted payment attempt details, they're on the associated Invoice
No, because past due can also happen in the case of sepa and then no customer actions is required
I am trying to use the customer portal as much as possible. So I need to retreive the lastest invoice?
I want to send the customer to the customer portal if customer action is required in the case of incomplete payment
Then you'd check latest_invoice.payment_intent.status which will reflect the latest attempt to pay the invoice
Will likely be requires_payment_method
where can i see latest_invoice.payment.intent.status ?
You need to 'expand' those fields on the Subscription object