Skip to main content

Webpay logo

Webpay is an alternative payment method of Transbank that provides PAYRETAILERS and FLOW, exclusive to Chile, allowing users to pay securely with credit, debit and prepaid cards. The process includes selecting Webpay, entering card details on its secure platform, authenticating identity and confirming payment. It is known for its security and reliability.

Integration via redirection with PAYRETAILERS

This method requires the user to be present at the time of payment, which must be processed through a browser. First we must generate a payment order indicating the following fields on the user to avoid the user having to fill them in at a later step.

5]```json "extra_data": { "profile": { "first_name": "John", "last_name": "Doe", "email": "johndoe@gmail.com", "document_identification_number": "92309089", "phone": { "number": "02614235138", "prefix": "54" } }, "billing_address": { "city": "Castellon", "country": "CHL", "address1": "Avinguda del Mar 23", "zip_code": "12000", "state_code": "CT" } }


## Integration by redirection with FLOW

To integrate by redirection, the user must be present at the time of payment, which must be processed through a browser. First we must [generate a payment order](/reference/#operation/generate-payment-order), indicating the email address.
5]```json
"extra_data": {
"profile": {
"first_name": " ",
"last_name": " ",
"email": "test@gmail.com",
}
}

As service identifier, the service_uuid of the PAYRETAILERS OR FLOW service you have activated in your Paylands Backend → Manage → Payment Services → Listing must be indicated.

Once the order is generated, the user must be redirected to the payment screen indicating the token of the order and in the query, the name of the APM:

We construct the redirection URL by replacing the token with the value returned in the previous call. 5]```jsx https://api.paylands.com/v1/sandbox/payment/process/{token}?apm=WEBPAY


Once the user is redirected to this screen, he/she can enter the card details to complete the payment. When the payment is completed, he/she will be redirected back to the OK or KO URL, depending on the payment result.

## Testing
For more information on how to test this payment method on each of your providers, visit the PAYRETAILERS or FLOW documentation.

## Custom fields
Optionally, in case you are using WEBPAY with FLOW, inside the `extra_data` object you can include the `payment_reason` field, which allows you to indicate a description of the payment.
```json
"extra_data": {
"payment": {
"payment_reason": "Payment description"
}
}