#cedricmorelle
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- cedricmorelle, 22 hours ago, 23 messages
- cedricmorelle, 1 day ago, 14 messages
hi! if you pass the value in your HTML field to Stripe it will appear somewhere.
there's a billing_details param on confirmSetup
that adds it to the billing_details on the PaymentMethod object that gets created.
somewhere ? ๐
well yes, there are multiple ways of doing this and it takes time for me to type and pull up API links and stuff. so just giving a quick answer and some pointers, I'll expand in a moment
there are other ways of doing this like passing the email separately to your backend and passing to the email field on your Customer object, depends overall how you have things set up.
Ok thanks for your patience I will study that carefully
sorry I just looked at the doc and still trying to understand I create
stripe.confirmSetup with https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details still
how should I pass my email?
linkAuthenticationElement.on('change', (event) => {
emailAddress = event.value.email;
});
const { error } = await stripe.confirmSetup({
elements,
confirmParams: {
return_url: ...,
receipt_email: emailAddress,
},
});```
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it's email , not receipt_email
emailAddress = event.value.email;
});
const { error } = await stripe.confirmSetup({
elements,
confirmParams: {
return_url: ...,
email: emailAddress,
},
});``` as simple as that?
That's strange:
"error": {
"message": "Unrecognized request URL (GET: /v1/setup_intents/seti_1OHmUDAslfugMFd9znEP184x/confirm). Please see https://stripe.com/docs or we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}```
it shouldn't be a GET request, it should be POST.
I'm doing POST of course
I see there is a issue here :
{
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: email",
"param": "email",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_3sAmVjMgylK1RA?t=1701259637",
"setup_intent": {
"id": "seti_1OHmUDAslfugMFd9znEP184x",
"object": "setup_intent",
"automatic_payment_methods": null,
"cancellation_reason": null,
"client_secret": "seti_1OHmUDAslfugMFd9znEP184x_secret_P5yR80kLXFqE5Oajl4sPkX24fPl8qjq",
"created": 1701259405,
"description": null,
"last_setup_error": null,
"livemode": false,
"next_action": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_types": [
"card",
"link",
"paypal",
"sepa_debit"
],
"status": "requires_payment_method",
"usage": "off_session"
},
"type": "invalid_request_error"
}```
my syntax here is incorrect I guess:
const { error } = await stripe.confirmSetup({
elements,
confirmParams: {
return_url: ...,
email: emailAddress,
},
});```