#juls1083

1 messages · Page 1 of 1 (latest)

atomic kayakBOT
fair girder
#

Well you shouldn't need to create/manage Mandates manually if you're using our payment UIs

patent sky
#

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

fair girder
#

How are you collecting the actual card details from users though?

patent sky
#
  • 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
fair girder
#

If you're using confirmCardSetup that handles the mandate creation

violet rose
#

Can you help me?

patent sky
#

Sorry, the CC gets attached with the confirmCardSetup function. What we do is to update it as default payment method

fair girder
patent sky
#

I only need to pass the mandate parameters to confirmCardSetup? And that's it?

fair girder
#

The Stripe.js method automatically collects mandate acceptance. You don't need to pass anything additional

patent sky
#

What about specifying the interval or the amount? There are mandatory parameters

fair girder
#

They would be inferred from the Subscription that generated the Setup Intent

patent sky
#

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

fair girder
#

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

patent sky
#

The parameter payment_method_options[card][mandate_options][supported_types][0]=[india] is also inferred?

fair girder
#

Yes, the payment UIs handle everything

patent sky
#

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

fair girder
#

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

patent sky
#

and the mandate gets updated automatically?

fair girder
#

A new mandate would be generated with the new Setup Intent yes