#akashpatil7596_api

1 messages ¡ Page 1 of 1 (latest)

jagged oarBOT
#

👋 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.

regal raftBOT
#

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.

lean hazel
#

hi there!

long lynx
#

Hello

lean hazel
#

how do you create the Subscriptions? With Checkout Session or the Subscription endpoint directly?

long lynx
#

checkout session

lean hazel
long lynx
#

Nooooooo, I'm doing all my code in customer.subscriptions.created webhook

lean hazel
#

I'm confused. can you clarify your question with a concrete example?

long lynx
#

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

lean hazel
#

yes that I understood. but what's the question/issue?

long lynx
#

I edit the question, please take a look

lean hazel
#
  1. 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

long lynx
#

Can I look the default payment method of subscription instead?

lean hazel
long lynx
#

Is there any API for retrieving default payment method of a subscription?

#

No wait I got this

lean hazel
#

Is there any API for retrieving default payment method of a subscription?
yes I shared it just above