#Reyansh Sharma
1 messages ยท Page 1 of 1 (latest)
No, normally you would want to create a new one. Why do you want to reuse btw?
- Created a setup intent without a customer attached to it (Don't have customer info at the moment).
- using terminal JS to collect the payment method and then confirming the setup intent so PM got attached to it.
- After setup intent confirmation use the card fingerprint to check if a customer already exists for the same if so want to have a setup intent attached to the customer which can be use for off_session payments ๐
but can't update the existing setup intent with customer as it is already successful ๐ฆ
In step 3 I think you may don't need another SetupIntent. How about just continue to use the collected PaymentMethod?
After collected via terminal I believe you have another PaymentMethod available to use online
Got your point so I will try the following:
- Get the confirmed setup intent.
- Fetch the LatestAttemptId from the setup intent object & then the corresponding GeneratedCardId (Which is the PM for off-session payments).
- I will be using this PM to attach to the customer & hence for the online payment.
Going to try this & will get back to you guys if will run into any issues thanks (Haven't tried this earlier as thought might not be possible).
Yep!
It's mentioned here tho https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly#submit-payment-method