How to start?

Access the start-up documents and start making your first applications:

First steps

Our API collection

Dive a little deeper and start exploring our API reference to get an idea of what's possible:

API Endpoints

First steps


Get your API keys

Your API requests are authenticated using API keys "Bearer Token", authentication method is supported, using the "TokenApi" provided to the merchant as token.

In addition, the data to be sent must always be signed with a "SecretKey", Our platform verifies that the data sent belong to the merchant and were not adulterated during shipment through the network.

Any request that does not include an API key will return an error. Both the TokenApi and SecretKey will be provided to the merchant by management.


How to sign with your SecretKey?

All parameters must be in the signature except the "sign" parameter, which is where the signature goes.

The parameters must first be sorted alphabetically in ascending order according to the parameter name.

Once ordered, the parameters must be concatenated into a string, e.g. if your parameters are:.

    # Parameters to be signed.
        $data = [
            'currency' => 'CLP',
            'country' => 'CL',
            'amount' => 45000,
            'clientName' => 'Demo',
            'clientEmail' => 'demo@demo.cl',
            'clientPhone' => '999999999',
            'clientDocument' => '999999999',
            'paymentMethod' => 'webpay_payment',
            'urlConfirmation' => 'https://www. example.com/payment-responses/param/55',
            'urlFinal' => 'https://www.example.com/payment-responses/param/55',
            'urlRejected' => 'https://www.example.com/payment-reject/param/55',
            'order' => 3000001
        ];
    

The chain ordered for signing should look like this:

    // Chain to be signed.
        $keys = array_keys($data);
		sort($keys);
		$toSign = '';
		foreach ($keys as $key) {
			$toSign .= $key . $data[$key];
		}
    

Finally the concatenated string must be signed with the hmac function using the sha256 and SecretKey as key.

    // Obtaining signature.
        $sign = hash_hmac('sha256', $toSign, $secretKey);
    

API Documentation

Dive into the details of each API endpoint by consulting our complete documentation


Payments

All methods associated with the creation and reading of payments:

Payments

Withdrawals

Everything related to retreats:

Withdrawals

Payments


Create a new payment

POST https://url.base/api/payment/new

Endpoint to create a new payment.

To create a new payment request, the request must be built with the following parameters.


Parameters

* Information required.

Bodys

*currency String ISO currency code. # countries-and-currencies​
*country String International country format. # countries-and-currencies​
*amount Integer Transaction amount
*clientName String Client Fullname (First Name - Last Name)
*clientEmail String Client Email
*clientPhone String Client Phone
*clientDocument String Client Id
*paymentMethod String Available payment methods Learn about the methods available for your commerce
*urlConfirmation Link Url of payment confirmation.
*urlFinal Link URL redirection after payment is completed.
urlRejected Link URL redirection in case the transaction is reject
*order String Identifier of the payment to be associated.
*sign String Signature of the parameters. How to sing

Example


{
    $data = [
        'currency' => 'CLP',
        'country' => 'CL',
        'amount' => 1000,
        'clientName' => 'Demo',
        'clientEmail' => 'demo@demo.cl',
        'clientPhone' => '999999999',
        'clientDocument' => '999999999',
        'paymentMethod' => 'webpay_payment',
        'urlConfirmation' => 'webhook',
        'urlFinal' => 'url rediret',
        'urlreject' => 'url reject',
        'order' => 3000001
    ];
}
                                    
                                

Answer Create a payment

ProntoPaga response to the payment request is the UID of the transaction and the URL to which you must redirect the user.

200: OK Payment successfully created.

{
    "urlPay"= [string] // Link to process the payment,
    "uid": [string] // Payment identifier in the system,
}
                                    
                                
401: Unauthorized Permission denied

Payment Confirm

Once the user has completed the payment process, ProntoPaga will return the data to the URL you specified in the urlConfirmation


{
    "uid" : [string] // Transaction identifier.
    "status" : [tring] // Transaction status.
    "amount" : [integer] // Transaction amount.
    "method" : [string] // Payment method used.
    "reference" : [string] // Transaction reference.
    "clientEmail" : [string] // Client Email.
    "clientDocument" : [string] // Client Id.
    "order" : [string] // Transaction order.
    "currency" : [string] // ISO currency code.
    "country" : [string] // International country format.
    "method_type" : [string] // Method Type.
    "method_detail" : [string] // Method Detail.
    "hash" : [string] // Security hash parameter.
    "sing" : [string] // Signature of the parameters..
}
                                

Payment details

GET https://url.base/api/payment/data/{uid}

Endpoint to obtain the details of a payment.


Parameters

Path

*uid String The identifier must be provided as part of the endpoint as
indicated in the path.

Responses

200: OK Payment details
{
    "uid" : [string] // Transaction identifier.
    "status" : [tring] // Transaction status.
    "amount" : [integer] // Transaction amount.
    "method" : [string] // Payment method used.
    "reference" : [string] // Transaction reference.
    "clientEmail" : [string] // Client Email.
    "clientDocument" : [string] // Client Id.
    "order" : [string] // Transaction order.
    "currency" : [string] // ISO currency code.
    "country" : [string] // International country format.
    "method_type" : [string] // Method Type.
    "method_detail" : [string] // Method Detail.
    "hash" : [string] // Security hash parameter.
    "sing" : [string] // Signature of the parameters..
}
                                
400: Bad Request Invalid ID provided
404: Not Found Payment not found

Methods of payment

To know the methods associated with your business, see the following endpoint

Option 1 - GET https://url.base/api/payment/methods

Displays all methods assigned to the commerce


Parameters

Path

*Bearer Token String The bearer token is provided by us.

Responses

{
    {
        "name": "WebPay",
        "method": "webpay_payment",
        "currency": "CLP"
    },
    {
        "name": "Paga con tu banco",
        "method": "etpay_payment",
        "currency": "CLP"
    },
    {
        "name": "PIX",
        "method": "pix_payment",
        "currency": "BRL"
    },
    
}

Option 2 - GET https://url.base/api/payment/methods/{currency}

Displays all methods assigned to the commerce according to the currency sent, e.g. "CLP"


Parameters

Path

*Bearer Token String The bearer token is provided by us.

Responses

{
    {
        "name": "WebPay",
        "method": "webpay_payment",
        "currency": "CLP"
    },
    {
        "name": "Paga con tu banco",
        "method": "etpay_payment",
        "currency": "CLP"
    },
    
}

Payment Status

New => Initial status of the application
Created => Status corresponding to when the user selects payment method
Success => Indicates that the transaction was successful
Canceled => The user has cancelled the transaction
Reject => Request rejected by payment method Know the types of rejected payments
Pending => Application pending approval by payment method
Expired => The system automatically expires pending requests after x amount of time.

Payments Reject

Here you will learn about the types of rejected payments

Option 1 - Client Blocked

This rejection corresponds to when blacklisting is blocked.


Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "rejected",
    "message": "El cliente se encuentra bloqueado"
},

Option 2 - Limits Commerce

The customer has exceeded the limits set for the commerce.

Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "rejected",
    "message": "Excede límite diario, 
                quedan disponibles 5.000.000,00 CLP para el dia,
                10.000.000,00 CLP para la semana,
                30.000.000,00 CLP para el mes.
                Depósito máximo por transacción 6.000.000,00 CLP"
},

Withdrawals

Create a new withdrawal

POST https://url.base/api/withdrawal/new

Endpoint to create a new withdrawal.

To create a new withdrawal request, the request must be built with the following parameters.


Parameters

* Information required.

Body

*amount Integer Transaction amount.
*document_id String Beneficiary's identity document.
*beneficiaryName String Beneficiary's full name.
*beneficiaryLastName String Beneficiary's last name.
*beneficiaryEmail String Beneficiary's Email.
*beneficiaryPhone String Beneficiary's phone number.
*accountNumber String Bank account number.
*accountType String Type of bank account.
*bankCode String Bank code
*data String Additional data for the transaction.
*confirmationURL Link URL for transaction confirmation.
*currency String ISO currency code. # Countries and currencies​
*country String International country format. # Countries and currencies​
*sign String Signature of the parameters..

Once the user has completed the withdrawal process, ProntoPaga will return the data to the URL you specified in the urlConfirmation

200: OK Retreat successfully created

{
    "uid" : [string] // Withdrawal identifier in the system,
    "status" : [string] // Withdrawal status,
    "data" : [string] // Extra transaction data
}
401: Unauthorized Permission denied

Withdrawal Confirm

Once the user has completed the withdrawal process, ProntoPaga will return the data to the URL you specified in the urlConfirmation


{
    "uid"    : [string] // Withdrawal identifier in the system,
    "status" : [string] // Withdrawal status,
    "data"   : [string] // Extra transaction data,
    "sing"   : [string] // Signature of the parameters.
}

Details of a withdrawal

GET https://url.base/api/withdrawal/data/{uid}

Endpoint to obtain the details of a withdrawal.


Parameters

Path

uid * String The identifier must be provided as part of the endpoint as
indicated in the path.

Responses

200: OK Transaction identifier
{
    "uid" : [string] // Transaction identifier.
    "status" : [tring] // Transaction status.
    "amount" : [integer] // Transaction amount.
    "data" : [string] // Extra transaction data.
    "currency" : [string] // ISO currency code.
    "country" : [string] // International country format.
    "sing" : [string] // Signature of the parameters.    
}
400: Bad Request Invalid ID provided
404: Not Found Payment not found

Withdrawals Status

New => Request has been received
Success => Request Approved
Canceled => Request Reject Learn about the types of cancelled withdrawals

Canceled Withdrawals

Here you will learn about the types of cancelled withdrawals

Option 1 - Client Blocked

This rejection corresponds to when blacklisting is blocked.


Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "El cliente se encuentra bloqueado",
    "errorCode": "1"
},

Option 2 - Limits Commerce

The customer has exceeded the limits set for the commerce.

Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Excede límite diario, 
                quedan disponibles 5.000.000,00 CLP para el dia,
                10.000.000,00 CLP para la semana,
                30.000.000,00 CLP para el mes.
                Depósito máximo por transacción 6.000.000,00 CLP",
    "errorCode": "2"
},

Option 3 - Balance available

No balance available for the selected currency

Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "El saldo a retirar excede el balance
                disponible en esta moneda",
    "errorCode": "3"
},

Option 4 - Rechazos bancarios

Responses

{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Cuenta ingresada no existe.",
    "errorCode": "4"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "El número de cuenta del destinatario 
                no corresponde al Rut ingresado.",
    "errorCode": "5"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Banco seleccionado no corresponde.",
    "errorCode": "6"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Cuenta con restricción de abono.",
    "errorCode": "7"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Banco de destino en mantención.",
    "errorCode": "8"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Rut Incorrecto.",
    "errorCode": "9"
},
{
    "uid": "01GMB3VVRB3QWYDKW6Z92W2T3B",
    "status": "canceled",
    "message": "Cuenta Rut Con Dígito Verificador.",
    "errorCode": "10"
},

Withdrawals PIX

Create a new withdrawal

POST https://url.base/api/withdrawal/pix/new

Endpoint to create a new withdrawal.

To create a new withdrawal request, the request must be built with the following parameters.


Parameters

* Information required.

Body

*amount Integer Transaction amount.
*beneficiaryName String Beneficiary's full name.
*beneficiaryLastName String Beneficiary's last name.
Type drop-down list It is a drop-down list where the customer chooses which one to use, it can be "document_id" , "beneficiaryEmail" , "beneficiaryPhone"..
*document_id Integer URL for transaction confirmation.# Must be "CPF"​
*beneficiaryEmail String Beneficiary's Email.
*beneficiaryPhone String Beneficiary's phone number.
*confirmationURL Link URL for transaction confirmation.
*data String Additional data for the transaction.
*currency String ISO currency code. # Must be “BRL"​
*country String International country format. # Must be “BR"​
*sign String Security hash parameter.

Once the user has completed the withdrawal process, ProntoPaga will return the data to the URL you specified in the urlConfirmation

200: OK Retreat successfully created
{
    "uid" : [string] // Withdrawal identifier in the system,
    "status" : [string] // Withdrawal status,
    "data" : [string] // Extra transaction data}
401: Unauthorized Permission denied

Withdrawal PIX Confirm

Once the user has completed the withdrawal process, ProntoPaga will return the data to the URL you specified in the urlConfirmation


{
    "uid" : [string] // Withdrawal identifier in the system,
    "status" : [string] // Withdrawal status,
    "data" : [string] // Extra transaction data}

Details of a withdrawal PIX

GET https://url.base/api/withdrawal/data/{uid}

Endpoint to obtain the details of a withdrawal.


Parameters

Path

uid * String The identifier must be provided as part of the endpoint as
indicated in the path.

Responses

200: OK Transaction identifier
{
    "uid"     : [string] // Transaction identifier.
    "status"  : [tring] // Transaction status.
    "amount" : [integer] // Transaction amount.
    "data"   : [string] // Extra transaction data.
    "currency" : [string] // ISO currency code.
    "country"  : [string] // International country format.
}
400: Bad Request Invalid ID provided
404: Not Found Payment not found

Specifications

Standards to validate country-specific data.


Countries and currencies

  • Country codes are in ISO 3166-1 alpha-2 format.
  • The coins are in ISO 4217 format.
Country Country code (ISO 3166-1 alpha-2) Currency code (ISO 4217)
Chile CL USD / CLP
Peru PE USD / PEN
Uruguay UY USD / UYU
Paraguay PY USD / PYG
Brazil BR USD / BRL
Ecuador EC USD
Mexico MX USD / MXN

Bank code

Check the requirements and validations performed on the allowed bank codes.


List of bank codes

In the following link you can download a json type list where you can find all the allowed bank codes.

Banks.json34KB
Code

Types of accounts

The accountType is specified with a single character as described below.

accountType Description
C Current
S Savings
V demand

Test cards

Here you will find test cards for the different payment methods.


WebPay

Card type Detail Result
VISA 4051 8856 0044 6623 CVV 123 any expiration date Generates approved transactions.
AMEX 3700 0000 0002 032 CVV 1234 any expiration date Generates approved transactions.
MASTERCARD 5186 0595 5959 0568 CVV 123 any expiration date Generates approved transactions.
Redcompra 4051 8842 3993 7763 Generates approved transactions (for transactions that allow Redcompra debit)
Redcompra 4511 3466 6003 7060 Generates approved transactions (for transactions that allow Redcompra debit)
Redcompra 5186 0085 4123 3829 Generates approved transactions (for transactions that allow Redcompra debit)
Prepago VISA 4051 8860 0005 6590 CVV 123 msg_testCard4 Generates approved transactions.
Prepago MASTERCARD 5186 1741 1062 9480 CVV 123 any expiration date Generates approved transactions.

When an authentication form appears with RUT and password, the RUT must be used. 11.111.111-1 and the key 123.


Our services

Here you will find all the services associated with our platform.