The merchant have two integration types for Payment Links:
- Vía API
- Vía BackOffice
Payment Flows types
API:
- From the merchant web, a POST request is generated to obtain the payment link or the QR code to initialize the payment session.
- The merchant sends the payment link to the client by the best suits method (QR, SMS, Whats app or Email).
- The cliente scan the QR code or enter to the link and start the payment session on our page.
- Webhook: ETpay will do a POST request to the URL previosly defined on the “Merchant Onboarding”. This request confirm the final status of the payments.
BackOffice:
- The person in charge of the merchant enters the ETpay BackOffice to generate the payment links.
- The merchant sends the payment link to the client by the best suits method (QR, SMS, Whats app or Email).
- The cliente scan the QR code or enter to the link and start the payment session on our page.
- Webhook: ETpay will do a POST request to the URL previosly defined on the “Merchant Onboarding”. This request confirm the final status of the payments.
Connecting to the API
The ETpay API is an REST API. In order to communicate with this youll need to send HTTP requests and our API will response with JSON objects and HTTP codes that define the status of the response (success, error, etc)
Obtaining the session token.
The first step of the payment process consists of obtaining the session token by a POST request from the merchant server (not from the client browser) with the merchant_code and the merchant_api_token to the endpoint [URL provided by ETpay]/create-session-token. Must be define the next variable on the headers: