#sa_919191
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
@livid hornet thank you. so in the backend, I'm creating a customer , creating a setupIntent including the customer ID
on the front-end I use the clientSecret to complete the setupIntent but the return object of setupIntent is missing the customer object
I can confirm that in the stripe dashboard, the payment method is attached to the customer
do you have a request id I could take a look at ?
where are you seeing that the customer id is missing?
actually, I did a mistake I was looking at the confirmCardSetup
in https://stripe.com/docs/js/setup_intents/confirm_card_setup on success it returns "result.setupIntent: the successful SetupIntent" but this has the customer object missing which according to https://stripe.com/docs/api/setup_intents/retrieve?lang=php customer object should exist. does this means on confirmCardSetup the setupIntent does not includes the customer object only when we execute a Get request on setupIntent the customer object exists?
let's continue here
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
on confirmCardSetup
the success response of confirmCardSetup is the setup_intent object but its missing the customer object
Customer objects are generally something you only interact with on the backend so that seems normal
what information is it exactly that you want on the frontend that's not available?
thank you, customer name and last 4 digits of the card
does this means, I have to pass the setup intent ID to back-end and fetch the customer details using the setupIntent Get call?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
possibly, but let me think if there's a better way
yeah I don't think there's a better way.
You should have your backend call https://stripe.com/docs/api/setup_intents/retrieve?lang=php with expand=>["latest_attempt"] and then you'll be able to access https://stripe.com/docs/api/setup_attempts/object#setup_attempt_object-payment_method_details-card or all the card details.