#Reyansh Sharma
1 messages · Page 1 of 1 (latest)
hello! can you share the SetupIntent id?
For setup Intent --> pm_1MAULWIXPl35VUO69BgR5XEi
Though on customer profile --> pm_1MAULWIXPl35VUO6ag9ntSbL
Checking
Setupintent Id: seti_1MAUL7IXPl35VUO6YMapclTH
Is there any way I can get the customer's payment method after confirmSetupIntent
gimme a while, still looking into this
https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly#submit-payment-method
The generated_card payment method automatically attaches to the customer ID you provided during SetupIntent creation. You can retrieve the attached payment method by fetching the list of payment methods that gets attached to the customer.```
Sure
I was expecting the same (Same PM ids for Setupintent & customer).
Yeah that's not how this works. Setup Intents with Terminal generate 2 PM objects - XEi is the card present (Terminal) PM – that's not reusable. SbL is the non-Terminal PM that we attach to the customer that can then be re-used for subsequent off-session payments.
Ok thanks
Is there any way I can get the customer's PM as well? as that is what I need to do further steps.
Specifically from the Setup Intent object?
If possible or any other way to do so? I can try to get the latest added from customer if there is no other way?
You can expand the latest_attempt field which will be a Setup Attempt object: https://stripe.com/docs/api/setup_intents/object#setup_intent_object-latest_attempt
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Then you can access this field which is what is saved to the Customer object: https://stripe.com/docs/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.