#Vinicius Martins-session
1 messages ยท Page 1 of 1 (latest)
Hi ๐ apologies for the delay, can you share the ID of a request where you encountered this error?
Yes, I dont have this request now, but I'll test again e send to you
RequestId => req_UpI5tXXpkI3KrO
Thank you, pulling that up.
I believe it's the format of the email string there that is not being accepted. If you drop the .br, does that avoid the error?
Oh, sorry, you're trying to pass a hash into the customer field that is only expecting to receive a Customer ID. I think you may be looking for the customer_email field instead:
https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-customer_email
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I understand, I thought that sending the data to the customer would already work, first I need to create the customer and then associate it with a checkout?
That, or you can let the Checkout Session create the Customer for you.
Hum... yeah, but I need adress info inside the customer, So sending just customer_email dont work
You can set billing_address_collection to required when creating the Checkout Session to force it to collect address information:
https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-billing_address_collection
And can set customer_creation to always to ensure those sessions will always create Customer objects.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.