#akashpatil7596_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/1225752247472754728
đ 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.
- akash_subscription-cancellation, 24 minutes ago, 24 messages
- akash_invoice-upcoming, 1 hour ago, 11 messages
- akashpatil7596_api, 21 hours ago, 35 messages
- akashpatil7596_api, 22 hours ago, 37 messages
- akashpatil7596_api, 1 day ago, 37 messages
- akashpatil7596_api, 1 day ago, 49 messages
and 7 more
hi there!
Hello
how do you create the Subscriptions? With Checkout Session or the Subscription endpoint directly?
checkout session
then you can use this to collect a PaymentMethod even if the first invoice has a zero amount: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_method_collection
Nooooooo, I'm doing all my code in customer.subscriptions.created webhook
I'm confused. can you clarify your question with a concrete example?
1). customer buys $999.99/year plan
2). cancel the plan same day and got $999.99 back in stripe account
3). again buys $19.99/month subscription
4). go to checkout session page and do the payment
5). I catch this with my customer.subscription.created webhook, in their I retrieve list of invoice for the charge ID so I can get last four digits of card number, but in invoice list there is only one data with no charge or payment_intent
yes that I understood. but what's the question/issue?
I edit the question, please take a look
- well there's no charge there, so it's expected that there's no PaymentIntent/Charge ID.
instead you can just look at the default payment method the customer has
assuming there is one
Can I look the default payment method of subscription instead?
sure, that works too, depending on how you set things up: https://docs.stripe.com/api/subscriptions/object#subscription_object-default_payment_method
Is there any API for retrieving default payment method of a subscription?
No wait I got this
Is there any API for retrieving default payment method of a subscription?
yes I shared it just above