Below, we will detail how to implement the Direct Debit service with basic functionality. There are customizations which are detailed in additional customization features
When a customer decides to set up direct debit through ETpay, a flow is executed as follows:
| Field Name | Description | Optional | Data Type |
|---|---|---|---|
| merchant_code | The merchant's identification code | No | String |
| merchant_api_token | The merchant's unique API token | No | String |
| client_full_name | The full name of the client to be domiciled | No | String |
| client_id | The unique identifier of the client for the merchant | No | String |
| merchant_order_id | The unique domiciliation identifier for the merchant | No | String |
| client_email | The client's email to which subscription emails will be sent | No | String |
| service_name | The name of the service to which the client will subscribe | No | String |
| service_id | The unique identifier of the service to which the client will subscribe | No | String |
| max_amount | The maximum amount that can be charged to a client in a billing request | Yes | Number |
| frequency | The frequency at which charges can be made (weekly, biweekly, monthly, bimonthly, by_use) | Yes | String |
| end_date | The last date on which a charge can be made to the client (YYYY-MM-DD) | Yes | String |
| subscription_completed_url | The URL to which the client will be redirected upon completing their subscription | Yes | String |
| subscription_cancelation_url | The URL to which the client will be redirected in case of an error in their subscription process | Yes | String |
The following is the accepted catalog of payment frequencies for the frequency field:
| FREQUENCY | MEANING |
|---|---|
| weekly | The direct debit to be created must accept weekly charges |
| biweekly | The direct debit to be created must accept biweekly charges |
| monthly | The direct debit must accept monthly charges |
| bimonthly | The direct debit must accept bimonthly charges |
| by_use | [DEFAULT] The direct debit accepts charges at any other frequency |