Hello,
I would like to ask a quick question.
On my website, I allow users to subscribe to recurring plans.
I have also set up Webhooks. Everything works except for one thing I don’t understand.
So here is the problem:
I would like to know why I receive these events:
“subscription.created” with a STATUS=ACTIVE
but, when I log into my Square dashboard, I see that the subscription is indeed active, but that there was a problem with the payment (either insufficient funds or other) and therefore Square was unable to proceed with the payment with the customer’s card.
So my question is, why do I receive the event on my webhook of “subscription.created” with a STATUS=ACTIVE.
Because in reality, the subscription should not be activated, because we have not received the payment!
Do I need to activate another webhook event to get this?
Thank you
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Use Webhooks to Integrate with a Payroll System
Use Customer Webhooks
Refunds API Webhooks
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Sorry, that does not help !
thanks
The “subscription.created” webhook event is triggered when a subscription is created, regardless of the payment status. The status “ACTIVE” in this context means that the subscription has been successfully created and is active in the system, not that the payment has been successfully processed.
If there’s a problem with the payment, you should receive a separate webhook event, specifically “payment.updated”, which will indicate that the payment status has changed, for example, to ‘FAILED’ or ‘DECLINED’. This event is triggered when any field in a Payment is updated, such as when a payment fails due to insufficient funds.
So, in your case, you should listen for both “subscription.created” and “payment.updated” webhook events to accurately track the status of your subscriptions and their associated payments.
This answer was reviewed by @Bryan-Square.
Hi!
Fantastic
Thanks a lot! I will test this! I just enabled this event “payment.updated”
Thanks a lot! It is much appreciated!