stripe/react-stripe-js

[BUG]: Can not set API version for ```/v1/payment_methods```

Closed this issue · 1 comments

What happened?

I am using
Embedded Form for payment follow:

const stripePromise = loadStripe(process.env.STRIPE_KEY, {
  apiVersion: process.env.STRIPE_API_VERSION,
});

const CheckoutForm2 = ({ translates, locale }) => {
  const searchParams = useSearchParams();
  const key = searchParams.get("key");

  const options = {
    clientSecret: key,
  };

  return (
    <EmbeddedCheckoutProvider stripe={stripePromise} options={options}>
      <EmbeddedCheckout />
    </EmbeddedCheckoutProvider>
  );
};

I really set API version for latest version, but there is an API still use old API version

API:/v1/payment_methods
and request body:

{
  "_stripe_version": "2020-08-27",
  ...others data
}

How can I handle this one?

Environment

"@stripe/react-stripe-js": "^2.8.0",
   "@stripe/stripe-js": "^4.5.0",

Ubuntu, chrome, Stripe test version

Reproduction

Use this document:
https://docs.stripe.com/payments/checkout/save-during-payment?payment-ui=embedded-form
No response

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.