Subscriptions Webhook
Subscriptions webhook
It is important to know what webhooks are used and when they are triggered. This helps to plan your system’s response to each event. The table below lists and describes the types of webhooks available.
Webhook event | Trigger | Description |
---|---|---|
Subscriptions Plan Activation recurring.plan.activated | 1. When a Subscriptions plan has successfully linked payment method. 2. Or, when a Subscriptions plan with immediate_action_type = FULL_AMOUNT has been created AND the corresponding immediate charge was successfully made. 3. When a plan without any immediate action has been successfully created. | Merchants can use this as an indication that the Subscription plan was successfully activated and will start making recurring payments. |
Subscriptions Plan Deactivation recurring.plan.inactivated | 1. When a Subscriptions plan has defined the total_recurrence value and it has completed the required number of cycles indicated by total_recurrence. 2. When a Subscriptions plan with failed_cycle_action = "STOP" met with a "FAILED" Subscriptions cycle. 3. Or, when a Subscriptions plan with immediate_action_type = FULL_AMOUNT has been created BUT the immediate charge has failed. | Merchants can use this notification to close off their Subscription plan with a particular end user, as a indicator to stop provision of goods/ service |
Subscriptions Cycle Creation recurring.cycle.created | 1. When a cycle with "SCHEDULED" status is created by the system, representing the upcoming subscription charge. 2. Or, when the upcoming cycle changes status from "SCHEDULED" to "PENDING" (the first payment action is being executed) | Merchants can use this notification as an indication of when the next cycle will execute. They can also update certain values of the upcoming cycle. |
Subscriptions Cycle Successful Action recurring.cycle.succeeded | 1. When a cycle has made a successful charge, or 2. It may be a charge initiated by the system on schedule or for a retry of a previously failed charge, or. 3. It may be initiated by the merchant using a forced charge attempt. | Merchants can use this notification as an indication that end user has successful paid for the specified interval |
Subscriptions Cycle Retrying Action recurring.cycle.retrying | When the current attempt has failed, the cycle will retry the charge again at a future date according to the retry configuration of the corresponding plan schedule. | Merchants can use this notification as an indication that end user failed to pay for the specified interval but Xendit will continue to retry for payments |
Subscriptions Cycle Failed Action recurring.cycle.failed | When all configured attempts (including the retry attempts and payment links) have been exhausted and did not manage to yield any successful payments for the cycle. | Merchants can use this notification as an indication that the end user failed to pay for the specified interval and no further actions will be taken by the system. |
Last Updated on 2023-09-04