#jarvis_subscription-paymentmethod

1 messages ยท Page 1 of 1 (latest)

frozen nimbusBOT
#

๐Ÿ‘‹ 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/1271220328986706072

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

full vapor
#

jarvis_subscription-paymentmethod

#

@hushed yacht if you are using a Subscription you should always pass mode: 'subscription'
And the list of payment methods works completely differently with Subscriptions and Invoices and can be configured here in the Dashboard instead: https://dashboard.stripe.com/settings/billing/invoice

hushed yacht
#

Yes

#

I understand

#

But in case of trial products

#

Where the first charge would happen at a later date

#

What are we supposed to pass as clientSecret in that case?

full vapor
#

There's a neat trick in our API that no one ever finds ๐Ÿ˜…
When you are on a trial, there's no PaymentIntent since there's no payment upfront. So instead we create a SetupIntent and we put it in pending_setup_intent on the Subscription
So you can Expand that property (see https://www.youtube.com/watch?v=m8Vj_CEWyQc and https://stripe.com/docs/expand) and you can use that client secret