#taviksha-akar_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285114927509667901
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- taviksha-akar_code, 3 days ago, 28 messages
- taviksha-akar_api, 3 days ago, 13 messages
hello! If you are creating a subscription, you should only create a subscription using https://docs.stripe.com/api/subscriptions/create or https://docs.stripe.com/api/subscription_schedules/create
You should not be creating a PaymentIntent separately i.e. https://stripe.com/docs/api/payment_intents/create
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how will payments will be taken then? If we don't use payment intent then will the payment on subscription create will be taken automatically??
I've already discussed this with you last week - did you try the suggestion I shared?
if you want to stop the automatic collection of the invoices for a period of time, then it sounds to me like https://docs.stripe.com/billing/subscriptions/pause-payment is what you're looking for. If you're using subscription schedules, then you would need to wait for the subscription to be created, then update the subscription to pause it. The subscription will be active. I'm not entirely certain if this is the exact behaviour you're looking for so you should test it to be sure
No, that was another case where I want to stop automatic collection. And now I am asking for the normal subscription flow.
where I have to take payments on subscription creation
have you tried creating a Subscription normally following this guide : https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription ?
So how the user card will be attached to the subscription means where to get the default payment method id
?
Hi @ebon sundial I'm taking over this thread
Are you asking how to set a default_payment_method for a subscription? https://docs.stripe.com/api/subscriptions/create#create_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes I mean if a user is creating a subscriptio and enters a card at that time that card should be used to take payments
so we are creating payment intent and it returns us the client_secret and that client_secret is used further to get payment method id in front end side then we pass that payment method id on creatign subscription in "default_payment_method "
By doing this, there are two payments have been done
one is just after creating the payment intent and other in subscription create
we just need to have one payment
but it is taking two payments.
when payment intent payment has been created with incomplete status can we mark that same payment as paid on subscription creating without creating another payment??
hi there?
Why do you need to create another paymentintent?
it will return a client_secret which will be used in front side to get payment method id
No you don't need to do that
You can just the client_secret from the payment_intent assocaited with the first invoice that subscription creates
https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements#create-subscription I'd highly recommend you go through this integration in details.
but there is a parameter default_payment_method what should we pass in it then?? how the card will be attached to the subscription?
Are you able to use the example code in the doc that I shared earlier? you don't need to pass in an default_payment_method if you haven't collect a payment method yet.
this doc does not have payment process information
Refer to the "Build a subscription" doc on details about payment method collection
'payment_behavior' => 'default_incomplete',
this is given in the build a subscription doc, which is not supported on creating a scheduled subscription.
so how will this flow will work when creating a scheduled subscription.
Hmm, I thought you are creating subscription schedule and let the schedule create subscription ? Why do you need to specify payment_behavior ?
Just curious, which schedule use case are you building? https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases
As you doc says, payment_behavior should be set as default_incomplete that's why I was trying to pass it.
Just to confirm, are you still trying to build with subscriptions schedule?
yes
Then you should start with the subscription schedule document
https://docs.stripe.com/billing/subscriptions/subscription-schedules
If you want to collect a payment method before creating a subscription schedule, you can use SetupIntent + PaymentElement, or a setup mode checkout session.
Ok so should I use SetupIntent which will not take payment?
It depends on the use case. You'd use a SetupIntent to collect a card if you intend to then charge that card for the first time some hours/days later.