Servipag is a widely used payment method in Chile, supported by EBANX, that allows customers to pay for online purchases either through online banking or at physical payment locations. Servipag is a trusted solution in Chile, offering customers the flexibility to complete transactions in a way that best suits their preferences, whether via bank transfer, debit card, or cash. It is a reliable and secure option, particularly for customers in Chile who prefer bank transfers or cash payments for online purchases.
Requirements
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
- Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters.
How it works
- Customer selects Servipag - At checkout, your customer chooses Servipag as the payment method.
- Generate payment voucher - EBANX generates a payment voucher with a unique reference code and payment instructions.
- Customer completes payment - Your customer can either complete the payment online via Servipag’s platform or visit a physical Servipag location to pay in cash.
- Payment confirmation - Once the payment is made, Servipag processes it and sends confirmation to EBANX.
- Merchant notified - EBANX updates the payment status and notifies you, allowing you to fulfill your order.
This process ensures flexibility and convenience for Chilean customers using bank transfers or cash-based payments.
Instructions
Follow the steps below.
Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/directDefine your parameters
With Servipag, customers are redirected to a secure third-party website to complete the payment quickly and safely. To obtain this redirection link, call the ws/direct endpoint with the required parameters.
You must provide required parameters for payment requests. These parameters ensure successful completion of transactions.Defining API parameters
Essential parameters
payment.payment_type_code
- Specifies the payment method to be used for the transaction.payment.currency_code
- Three-letter code of the payment currency.payment.amount_total
- Total amount to be charged.
Additional parameters
- EBANX Integration Key - Used to authenticate and authorize API requests.
- Customer Information
- Includes details such as the customer name, email, address and document number (Depends on the requirements of the payment method or local regulations).
- While not mandatory for all countries or payment methods, providing this information can enhance security and increase the likelihood of successful processing.
- Additional Context - Extra data for specific methods or countries.
To learn more about API parameters, please refer to theAPI Reference Guide chevron_rightAt the API Reference Guide, select Chile and Servipag from the dropdown menues.
Sample request
Use the following example to initiate a request.
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "request",
"payment": {
"name": "José Silva",
"email": "josechile@example.com",
"country": "cl",
"payment_type_code": "servipag",
"merchant_payment_code": "0x0W28D03-CL-T04",
"currency_code": "CLP",
"amount_total": "100"
}
}'Sample response
A successful request returns a response like the example below, with the third-party website link provided in the payment.redirect_url parameter.
{
"payment": {
"hash": "5efd1cd0ac77c56f8e73d9ca635438b3217a5363cd80f90d",
"country": "cl",
"merchant_payment_code": "0x0W28D03-CL-T04",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "2020-07-01 23:31:28",
"confirm_date": null,
"transfer_date": null,
"amount_br": "100.00",
"amount_ext": "100.00",
"amount_iof": "0.00",
"amount_ext_requested": "100.00",
"currency_rate": "1.0000",
"currency_ext": "CLP",
"due_date": "2020-07-04",
"instalments": "1",
"payment_type_code": "servipag",
"redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=5efd1cd0ac77c56f8e73d9ca635438b3217a5363cd80f90d",
"pre_approved": false,
"capture_available": null
},
"status": "SUCCESS",
"redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=5efd1cd0ac77c56f8e73d9ca635438b3217a5363cd80f90d"
}At this stage, the payment will appear as pending (PE) in yourEBANX Dashboardchevron_rightRedirect customer to the returned URL
Redirect your customer to the URL returned in the parameter
redirect_url
. After the redirection, your customer will be at a third-party website with all the necessary purchase details to finalize their payment securely and easily.Testing Servipag in a sandbox environment
In our Sandbox environment, we provide a Servipag simulation interface to test bank transfer payments. This mock interface allows you to simulate different payment outcomes:
- Simulate Authorized = YES: Confirms the payment as successful.
- Simulate Authorized = NO: Denies the payment.
- Leave Pending: Leaves the payment in a pending state.
This simulation mimics the real production flow, where users are redirected to their Internet Banking to complete transactions, enabling you to thoroughly test authorized and unauthorized payments.
Monitor payment for status changes
Notifications
EBANX will send a notification whenever a payment status changes.
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
After receiving a notification that status has changed, retrieve the payment status.
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO). If the customer does not complete the payment, the status will eventually change to cancelled (CA).
Congratulations!
You have succesfully integrated Servipag.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
Sample Cards
Click here to view mock card data to validate your payment integration.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.