#anil_api

1 messages ¡ Page 1 of 1 (latest)

paper marshBOT
#

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

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

novel notch
north jacinth
#

Yes there is two options use a smart retry and use a custom retry

In custom retry if i remove all then retry will disable ?

novel notch
#

yes, it should be disabled if you have no configurations under customer and smart retries

north jacinth
#

Okay.

#

For webhook events like invoice.paid and invoice.payment_failed will only work for mode = subscription

novel notch
#

Maybe can you elaborate on the problem you're trying to solve? That'll help me be able to advise you better

north jacinth
#

There are products which can be buy as one time payment and as recurring payment . I have to update in database accordingly so calling the api in webhook events.

Invoice.payment_succeed here i am checking billing reason = subscription_create then updating default_payment_method

Invoice.paid /Invoice.payment_failed updating database as subscription

Checkout.session.complete here checking if mode is payment then updating database as for single payment.

novel notch
#

yep, the method you've described to handle one-off payments and subscriptions look correct to me

north jacinth
#

Okay.
The method will not conflict for subscription and one time payment?

novel notch
north jacinth
#

Okay. I appreciate your help.