#cedricmorelle

1 messages ยท Page 1 of 1 (latest)

wide summitBOT
#

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.

clever elm
#

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.

clever elm
#

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.

glass zinc
#

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,
            },
        });```
clever elm
#

it's email , not receipt_email

glass zinc
#
                emailAddress = event.value.email;
            });
const { error } = await stripe.confirmSetup({
            elements,
            confirmParams: {
                return_url: ...,
                email: emailAddress,
            },
        });``` as simple as that?
clever elm
#

you can test it in test mode and find out

#

but that seems correct yes

glass zinc
#

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"
  }
}```
clever elm
#

it shouldn't be a GET request, it should be POST.

glass zinc
#

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,
            },
        });```
clever elm
#

yes it's incorrect

#

you have to pass it inside billing_details like explained in the links earlier