#ShubhamDev
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
You should be following this full guide:
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
@red glacier I have followed this one only but still stuck. Could you please help me to figure it out.
I have generated a clientSecret using create a subscription api. Now what would be the next step?
@red glacier A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters.
This is what i am getting
I'm with you stop using the mention @ please
What step are you having an issue in the guide I shared ?
Do you want to use the Stripe Checkout integration or Elements ?
stripe checkout integration i want
So you need to follow this guide instead:
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
Try following it step by step and tell me what step exactly are you having issue with.
sure
I am following stripe elements, few of the api's I have created
But stuck after this api
const subscription = await stripe.subscriptions.create({
customer: 'cus_4QFOF3xrvBT2nU',
items: [
{price: 'price_1MFQaK2eZvKYlo2CKdW2CeAM'},
],
});
Not sure I understand what you want to achieve, do you want Stripe Checkout Integration or Elements Integration ? I though you told me you want to use Stripe Checkout, no ?
Element integration currently I am working on, apologies for previous one
As of now I have successfully created the subscription by this api stripe.subscriptions.create.
Now I want what will be the next step?
Ok no worries. Now, you need to follow this guide step by step, and simply tell me what step (1, 2, 3...) are you having when following it
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
and what error are you facing please
Up to 5 steps(Create a subscription) I have got the response.
Now I want to integrate card element as 6th step.
Do you have any example in reactjs to performing 6th step
Yes you can refer to this sample:
https://github.com/stripe/react-stripe-js/blob/master/examples/hooks/9-Payment-Element.js
You need to adapt it and use the CLIENT_SECRET of the PaymentIntent of the latest invoice of the Subscription like mentioned in the 6th step in the guide.
Do you have any other way to implement this 6th step?
No, not for Subscriptions. But you can refer to this complete quick start/project, in order to understand how to implement Stripe Elements using react
https://stripe.com/docs/payments/quickstart?platform=web&client=react&lang=node
Thanks this will helpfull for me