#hendr1x

1 messages · Page 1 of 1 (latest)

wet hatchBOT
urban vector
#

So each intent will only do one payment but you can use your saved payment methods on however many intents after the PM has been saved.

azure yoke
#

Thank you for your help.

#

Is there a command that tells the system to save the payment information or is it automatically done for all paymentIntents?

#

I think I found it

urban vector
#

Yes exactly. And you can set that to either on_session, meaning you will only reuse it while the user is present on your website, or off_session meaning that you may charge the payment method automatically when the user is not around.

wet hatchBOT
azure yoke
#

ok. Last question please...it seems like I need to both CUSTOMER_ID and PAYMENT_METHOD_ID. Where/how do I get PAYMENT_METHOD_ID?

urban vector
#

A couple of ways. The Payment method ID will be set on the payment_method property of the intent when it is confirmed. So you can retrieve it there.
The successful payment will also trigger payment_intent.succeeded and payment_method.attached events that will have the ID in them.
Or you can list the saved payment methods for the customer with the API https://stripe.com/docs/api/payment_methods/list