#tonidigital_api

1 messages ¡ Page 1 of 1 (latest)

fading minnowBOT
#

👋 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/1294270060319477785

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

wanton grail
#

hi there!

#

in that case we're creating Customer with specific paymentMethodId, then SetupIntent (because there will be trial period and after that charging should happened) and Subscription
that seems backward. you just start by creating a Subbscription, which will create a PaymentIntent or SetupIntent for you, which then created a Payment Method

#

When trial period ends invoice is finalized but payment and subscriptions are set to Incomplete.
Does the customer has a default payment method set?

cunning heath
#

Yes, customer has set defaultPaymentMethodId. So you're saying that I don't have to explicitly set setupIntent because creationg of subscription will do that imediatelly?

#

this is just some test data, fyi

wanton grail
#

what's your current flow exactly? first collect a payment method, and then create a subscription? if se customers might have to go thought the 3DS flow two times in a row, which is a bad experience.
instead start by creating the Subscription, and use the PaymentIntent/SetupIntent contains in the Subscription to collect the payment method.

cunning heath
#

Current flow is: customer enters credit card on FE via Stripe iframe that then call api for creating paymentMethodId. With that paymentMethodId we're creating customer, creating setupIntent (I'm not sure do we even need this?) and creationg of subscription with that customerId.
I can see all of these infos on Stripe dashboard, customer, subscription, etc. but when trial period ends (I set for now 0 days for trial period) payment is not processed and invoice stays incomplete as well as subscription

wanton grail
#

that's a really bad flow. make sure to update it to what I recommended above.

cunning heath
#

Ok, and how we should to do this "se the PaymentIntent/SetupIntent contains in the Subscription to collect the payment method"? I'm not sure what do you mean with this

wanton grail
cunning heath
#

Ok, thanks for these links

#

One left questions: how long is able to reserve money on Stripe before charging happened? I red 7 days, is that correct?

wanton grail
#

you mean for placing a hold on a payment method?

cunning heath
#

yes, that's the answer. thank you