#somegamer1337-react-deferred-intent-subs
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.
- somegamer1337, 2 days ago, 5 messages
Hey there, yes it is. It depends on how you initialize the Elements provider. See the snippets here:
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment&client=react#add-and-configure-the-elements-provider-to-your-checkout-page
const options = {
mode: 'payment',
amount: 1099,
currency: 'usd',
// Fully customizable with appearance API.
appearance: {/*...*/},
};
return (
<Elements stripe={stripePromise} options={options}>
<CheckoutForm />
</Elements>
);
Thanks, but I think that would only work for one time Payments? I am trying to use this for subscriptions. Perhaps it is possible to do something like this but in React? https://github.com/stripe/stripe-billing-typographic/blob/358eecb1b8425c585d46c4973c7ed334c7f26638/client/src/components/Payment.vue#L132-L141
When I try to do it, I get this error:
IntegrationError: In order to create a payment element, you must pass a clientSecret or mode when creating the Elements group.
e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})