#SCIF

1 messages · Page 1 of 1 (latest)

floral drumBOT
hardy lance
#

👋 Thanks for sharing your flow. Could you share the problem that you're facing with current flow?

cobalt knot
#

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

hardy lance
#

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

#

If mandate is not collected, it will lead to failure of future payments

cobalt knot
#

But this is essentially a part of SCA isn't it?

hardy lance
#

India mandate collection is in addition to SCA. Additional information is required for subscription payment

cobalt knot
#

But is it sorted during creation of SI/PI?

hardy lance
#

Yes! If you create Subscription first and use its own SI/PI.

cobalt knot
#

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?

hardy lance
#

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:

  1. Create a subscription with price, coupon and customer ID
  2. Retrieve PI
  3. Collect payment method with PI client secret using Payment Element with stripe.confirmPayment or Card Element with stripe.confirmCardPayment
  4. If stripe.confirmPayment fails, repeat step 3 again
cobalt knot
hardy lance
#

Thank you for waiting. I'm still checking with my colleague about the Indian regulations

hardy lance
#

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.