#juls1083
1 messages · Page 1 of 1 (latest)
Well you shouldn't need to create/manage Mandates manually if you're using our payment UIs
We are using a custom backend. We use setup intents to add the credit card details, according to the guide, I must add the parameters of the mandate for indian cards on the setup intent API
How are you collecting the actual card details from users though?
- We create a setup intent and return the client secret to the UI
- We collect the card number via stripe-js libraries, and the user confirms the client secret with the stripe.confirmCardSetup function
- we attach the CC to the customer using the stripe API
If you're using confirmCardSetup that handles the mandate creation
we attach the CC to the customer using the stripe API
You shouldn't do that: https://support.stripe.com/questions/guide-for-saving-cards-in-india
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Can you help me?
Sorry, the CC gets attached with the confirmCardSetup function. What we do is to update it as default payment method
I only need to pass the mandate parameters to confirmCardSetup? And that's it?
The Stripe.js method automatically collects mandate acceptance. You don't need to pass anything additional
What about specifying the interval or the amount? There are mandatory parameters
They would be inferred from the Subscription that generated the Setup Intent
I see... but we create a Setup Intent from scratch using the customer Id, we don't use the subscription Setup Intent. We have a trial period, and it can take up to a month for our customer to attach a CC after they create the subscription
That's not really recommended as you'll be complicating the flow
You should just create a Subscription upfront with the trial, and use the pending_setup_intent to collect payment information when you need
The parameter payment_method_options[card][mandate_options][supported_types][0]=[india] is also inferred?
Yes, the payment UIs handle everything
When we use a setup intent, and the user confirms it, it closes. What happens when the user edit existing payment details? In this case, we need to create a setup intent, right?
because they may change their CC six months later
there's no pending setup intent on the subscription then
Yes, you'd need a new Setup Intent which would generated a new pm_xxx object. You can then update the Subscription to use that PM
and the mandate gets updated automatically?
A new mandate would be generated with the new Setup Intent yes