When setting up or making subscription payments you can configure a few more settings for their end users. These include -
-
immediate_action_type
parameter - whether the subscriptions plan should initiate an immediate action. When this parameter is used, a special cycle with type "IMMEDIATE" will be created. Xendit will try to perform the action of payment during Plan Creation. If the immediate payment fails, the plan will be deactivated automatically. This parameter helps merchants proceed with the plan creation only if the end user manages to complete the immediate payment transaction. -
notification_config
parameter - defines the type of notification that the end user should receive. -
failed_cycle_action
parameter - whether the subsriptions plan deactivates when it encounters a failed cycle. This parameter helps merchants to handle the subsriptions plan in the event that a cycle has exhausted all the retries and failed. Merchants can use this parameter to either “STOP” the subsriptions plan automatically or “RESUME” to ignore the failure and continue on with the next payment cycle.
You can refer to this documentation for further explanation