react-stripe-js icon indicating copy to clipboard operation
react-stripe-js copied to clipboard

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

Open tranvanhieu01012002 opened this issue 4 months ago • 0 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

tranvanhieu01012002 avatar Oct 01 '24 03:10 tranvanhieu01012002