#_best-practices

1 messages ¡ Page 1 of 1 (latest)

trim canopyBOT
ruby muralBOT
#

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.

trim canopyBOT
#

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

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

ruby muralBOT
woeful dust
#

In response to a related question I received yesterday, I realize that the debit payment method and subscription mode are not compatible. But our team need to integrate this method.

Here is the link to that question
#dev-help message

pastel thorn
#

As my colleague mentioned the Subscription is built that way. I can double check if you provide an example Subscription Id in Test Mode

woeful dust
#

To share a little more details about my current test situation, I tested webhook handling with a card that completes payment processing after 3 minutes, and I saw that a subscription was created for the customer who tried to pay before the processing was complete. At this point, the Payment and Invoice were in pending status, but the Subscription was active. I'm a little confused by this - it doesn't make sense that the subscription is active when the payment hasn't been fully processed.

Is it correct that the subscription is active because the information received through the delayed webhook is delayed in updating stripe from the bank, so it's pending, and the money is actually gone from the customer's end?

woeful dust
pastel thorn
#

But you are using Checkout

woeful dust
pastel thorn
#

There is another way that you could use Checkout in Setup mode to collect a PaymentMethod beforehand, then only after it succeeded, you use it to create a Subscription

woeful dust
pastel thorn
#

No you can just ... not creating the Subscription yet. Only create the Subscription if you receive checkout.session.async_payment_succeeded

woeful dust
#

Once a subscription is active, can't it be changed to past_due status via update?

pastel thorn
#

No you can't touch its status directly

#

If its payment fails, it will automatically change to past_due

#

It's more of an automatic engine

woeful dust
#

I see..
Yeah , i want to make subscription only when i get checkout.session.async_payment_succeeded but stripe make subscription to active automatically when customer put their info of debit card and submit in the checkout.

I didn't understand the Setup mode you described very well, can you explain this a bit more in detail?

pastel thorn
#

Sure, when you create a Checkout Session, you got a mode parameter, right? Set it to setup instead of subscription

woeful dust
#

Yes we are using subscription mode now

#

I changed it to setup

pastel thorn
#

Okie, now after confirm you will have setup_intent.succeeded webhook event

woeful dust
#

I think I need to learn a bit about setup intent mode, but I'll check the documentation for that. Can you continue with the explanation?

pastel thorn
#

Basically you will create a SetupIntent via Checkout Session

#

Then separately, after that, using the collected PaymentMethod to create a Subscription