#krishna008
1 messages ยท Page 1 of 1 (latest)
You should create Product and Price via API
I am doing stripe.paymentIntnent.create for one time payment
should I replace that one to product plan and subcsription api
Yes, see in details here: https://stripe.com/docs/billing/subscriptions/build-subscriptions
Yes you create Product and Price first, then create Subscription. Please refer to the Doc above
Custom code
Okay Let me check it.
To crate product document has mentioned using dashbord or CLI?
Isn't there API for create product and Price
๐ taking over for my colleague. Let me catch up.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do I need to use stripe.paymentIntents.create
for what exactly?
for client secret
yes but your questions are really all over the place
like you're asking about subscriptions, then producs and prices and now payment intents
I'm not sure what to answer because I'm unsure what you're trying to achieve
I alredy implemented one time payment & now I want to implement recurring.
for that do I need to keep my previos code same or render conditionally
In one time payment I was using stripe.paymentIntents.create
So do I need to keep it same?
no you would have to create a subscription first, and then use the underlying latest_invoice.payment_intent to get the secret and continue the flow that already exist for payment if you're using PaymentElement
my colleague sent you a doc previously, have you taken the time to look at it?
Yes I checked it but there is not client secret.
check again https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
subscriptionId: subscription.id,
clientSecret: subscription.latest_invoice.payment_intent.client_secret,
});```
this is the code that returns the client_secret
it's in the donc that I've sent you
please read it carefully
ohh sorry it was in response sir.
Sir then do I need to use stripe.paymentIntents.create?
no you don't
Okay sir. Then for subscription I will use this secret.
yes
One more thing sir. Can I take application fee in subscription.
yes
if this is for Connect yes
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay sir I will read doc.