stripe/stripe-js

[BUG]: Error 400 when calling API `confirmSetup` method

TruongVX352 opened this issue · 1 comments

What happened?

When using confirmSetup with Express Checkout Element

const response = await stripe?.confirmSetup({
  elements,
 // `clientSecret` from the created SetupIntent
  clientSecret,
  confirmParams: {
    return_url: `${window.origin}/checkout-redirect`,
  },
});

I receive an error object

{
  "code": "parameter_unknown",
  "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
  "message": "Received unknown parameter: payment_method_options[paypal][order_id]",
  "param": "payment_method_options[paypal][order_id]",
  "request_log_url": "https://dashboard.stripe.com/test/logs/req_ICKXw0e9kNWJ4p?t=1731471781",
  "type": "invalid_request_error"
}

Are there any ways to resolve this error?
I reviewed the payload when calling the API and found this parameter: payment_method_options[paypal][order_id]: 07F30298GS466640P.
According to Stripe documentation, it should return an object containing a payment_method for setting up future payments without immediately charging the customer.

Environment

Windows 11 - Chrome/130.0.0.0

Reproduction

No response

Hi @TruongVX352 this does not appear to be a question about this helper module but a general integration question.

Please write in to support with details about what you're trying to do and the docs you're referring to: https://support.stripe.com/contact