Below, we will detail how to implement the Direct Debit service with basic functionality. There are customizations which are detailed in additional customization features

Quick Review


When a customer decides to set up direct debit through ETpay, a flow is executed as follows:

  1. CREATE SESSION From the merchant's website, a POST request is made to our API to obtain the session_token, which allows the user to initiate their subscription session.
  2. INITIATE FUNNEL From the merchant's website, an email is sent to the user with the link to the subscription process.
  3. CLIENT SESSION (FUNNEL) The process that the user undergoes to subscribe, entering personal data and signing the authorization for recurring charges.
  4. REDIRECTION SUCCESS/ERROR The user completes their subscription session in our funnel. Upon completing the subscription, the funnel will redirect to the success or error URL as appropriate (both can be the same URL). This redirection is solely intended to provide visual confirmation to the end user within the merchant's site.
  5. RECEIPT OF NOTIFICATION ETpay will make a POST request to the URL of the web service specified by the merchant. This call confirms the successful or failed status of the subscription and requires a validation step of the information.

Definiciones

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

Development of Each Stage


Create session