#SCIF
1 messages · Page 1 of 1 (latest)
👋 Thanks for sharing your flow. Could you share the problem that you're facing with current flow?
We multiplies the subscription on every attempt. Sometimes people try pay and resulted in unsuccsessfully (the HUGE issue in India) payment. Then try to pay using another card for instance. Paid fine. Then they open an email and found an invoice for 1st sub and pay it. So essentially two paid subscription and we have to refund it
I assume, if we would not use createPaymentMethod() but create a setup intent, that could lead minimize the amount of failed payments as SCA will be done with a better customer experience, but that doesn't solve the the multiplying of subscriptions issue in full
I'd recommend creating a subscription on the customer first, then collect payment method instead. With every subscription created, it will generate Payment Intent (with non-zero amount) or Setup Intent (with zero amount). You can then use the Payment Intent (PI) or Setup Intent (SI) to complete the payment. Even if the payment fails, same PI or SI can be used to re-collect the payment method details from the customer again. With this, no new subscription will be created
You may refer to the guide here: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
In addition, India has regulation to collect mandate as part of subscription flow: https://stripe.com/docs/india-recurring-payments
If mandate is not collected, it will lead to failure of future payments
But this is essentially a part of SCA isn't it?
India mandate collection is in addition to SCA. Additional information is required for subscription payment
But is it sorted during creation of SI/PI?
Ok. Let me just recap this — to create a subscription I need to supply price, coupon and customer id. Then on subscription creation, invoice and linked to it PI are created automatically. To fullfill PI I need to collect PM from the elements form as I do now. If the payment failed, we redirect the customer to step 2, but found unpaid subscription, don't create a new one. Collect the form and try to create PM again. Will adding a new PM automatically trigger payment attempt of PI created some time ago?
You can use PI to collect the payment method with stripe.confirmPayment directly: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
stripe.createPaymentMethod is not required.
Essentially, the steps will be:
- Create a subscription with price, coupon and customer ID
- Retrieve PI
- Collect payment method with PI client secret using Payment Element with
stripe.confirmPaymentor Card Element withstripe.confirmCardPayment - If
stripe.confirmPaymentfails, repeat step 3 again
RE: Indian payments
https://stripe.com/docs/india-recurring-payments#subscription-updates
With the RBI regulations in place, you can’t:
…
* Update the default payment method used for the subscription.
What does mean update the default PM for the subscription here? But can customer set new PM on visiting invoice url?
Thank you for waiting. I'm still checking with my colleague about the Indian regulations
Thanks for waiting. With charge_automatically, the subscription will have a default payment method saved on the subscription: https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method
For Indian subscription, cancelling the subscription and create new one is required for updating the payment method saved on the subscription. As it requires new mandate to be created as part of subscription flow.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.