#_webhooks

1 messages · Page 1 of 1 (latest)

misty glacierBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1248213477622022154

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

cosmic ingot
#

one option might be to attach a 100%, one-time coupon to the subscription before making the change. Then the generated invoice will be discounted to $0.

patent timber
#

Thank you for your response.

I will check by applying a 100% coupon.

Is it possible to confirm through webhook parameters that the invoice was created automatically?

cosmic ingot
#

it should be, but can you explain in more detail what precisely you're attempting to confirm?

patent timber
#

When a subscription is changed from a subscription that does not require payment to a paid subscription, an invoice would be created and a "payment_succeeded" event would fly in the webhook if the payment is successful.

In my service, when we receive a "payment_succeeded" event, we change the charges and send emails to users. Additionally, we sometimes link paid subscription items to a zero-cost subscription. In these cases, I do not want to update the billing cycle.

cosmic ingot
#

you should check things like the amount_paid and billing_reason on the Invoice I would say, before deciding to take actions.

patent timber
#

Thank you for providing an answer to my question.

I will verify using the method you suggested.