#nicomorl

1 messages · Page 1 of 1 (latest)

forest pilotBOT
bleak badge
#

Hello

#

Taking a look at those examples

#

Give me a moment

#

Okay so the reason this is happening is that you are attaching the PaymentMethod to the Customer and then creating a one-off payment. That also requires 2 requests when you can just make one. You want to change to creating the PaymentIntent with setup_future_usage and no need to do a separate Customer attachment request.

#

That will both attach the PaymentMethod, and when the mandate is generated via mandate_data it is understood here that it is for recurring use.

#

Then, in the future, you can just pass that generated mandate ID again, you don't need to pass mandate_data each time, otherwise a new mandate will be generated whenver you do that.