Transaction
https://app.payku.cl/ (Production) · https://des.payku.cl/ (Sandbox)Create
Section titled “Create”/api/transactionThis method allows you to create a payment order and returns the URL and TOKEN that identify the transaction.
Additional parameters:
- additional_parameters = Allows you to send additional information that will be recorded with the transaction:
IMPORTANT additional_parameters.gateway:
- Allows specifying the final payment method
- REQUIRED for merchants using the On-Site method
Request body
| Parameter | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
emailrequired |
string <email> | Payer's email |
||||||||||||||||||||||||||||
orderrequired |
string <uuid> | Merchant's order |
||||||||||||||||||||||||||||
subjectrequired |
string <text> | Order description |
||||||||||||||||||||||||||||
amountrequired |
integer <int32> | Order amount |
||||||||||||||||||||||||||||
currencyrequired |
string <currency> | VES |
||||||||||||||||||||||||||||
paymentrequired |
integer <int32> | 17 |
||||||||||||||||||||||||||||
urlreturn |
string <uri> | Merchant return URL where the payer will be redirected after the transaction result is obtained. |
||||||||||||||||||||||||||||
urlnotifyrequired |
string <uri> | Merchant callback URL where the payment result will be notified. Note: Once the client completes the payment process, the callback URL (urlnotify) will be notified with the result of the banking operation. Example of a successful response:
Example of a failed response:
|
||||||||||||||||||||||||||||
additional_parameters |
object | Additional merchant parameters. |
||||||||||||||||||||||||||||
gateway |
string | Select the desired payment method:
Note: For methods marked as "On-Site: YES", the response will include additional information:
Key fields in the On-Site response:
|
curl -X POST \https://BASE-URL/api/transaction \-H 'Accept: application/json, text/plain, */*' \-H 'Authorization: Bearer TOKEN-PUBLIC' \-H 'Content-Type: application/json' \-H 'Host: BASE-URL' \-d '{ "email": "[email protected]", "order": "order-commerce-999", "subject": "description of the order", "amount": 100, "currency": "VES", "payment": 17, "urlreturn": "https://youwebsite.com/return/client/order-commerce-999", "urlnotify": "https://youwebsite.com/callback/commerce/order-commerce-999", "additional_parameters": { "gateway":"GATEWAY_CODE" }}'$client = new \GuzzleHttp\Client();$body = $client->request('POST', 'https://BASE_URL/api/transaction', [ 'json' => [ 'order' => 'order-commerce-999', 'subject' => 'description of the order', 'amount' => 100, 'currency' => 'VES', 'payment' => 17, 'urlreturn' => 'https://youwebsite.com/return/client/order-commerce-999', 'urlnotify' => 'https://youwebsite.com/callback/commerce/order-commerce-999', 'additional_parameters' => [ 'gateway' => 'GATEWAY_CODE' ] ], 'headers' => [ 'Authorization' => 'Bearer TOKEN_PUBLIC' ]])->getBody();$response = json_decode($body);const data = { "order": "order-commerce-999", "subject": "description of the order", "amount": 100, "currency": "VES", "payment": 17, "urlreturn": "https://youwebsite.com/return/client/order-commerce-999", "urlnotify": "https://youwebsite.com/callback/commerce/order-commerce-999", "additional_parameters": { "gateway": "GATEWAY_CODE" }};const request = async (data) => { const response = await fetch('https://BASE_URL/api/transaction', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer TOKEN_PUBLIC' }, body: JSON.stringify(data) }); const result = await response.json(); console.log(result)}request(data);Responses
{ "status": "register", "id": "trx6...", "url": "https://[BASE_URL]/path?id=trx...&valid=e3c4...", "account_service": { "bank_method": "PA..", "bank_number": "04...", "bank_document": "J...", "bank_name": "Ban...", "bank_nameshort": "Ve...", "bank_code": "01...", "bank_linkqr": "ht..." }, "attributes_request": { "transaction": "tr...", "payer": { "phone_number": "string", "payment_reference": "required" } }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Transaction status. The possible status values are:
|
id |
string | Unique identifier of the transaction |
url |
string | URL to redirect the user. |
account_service |
object | [!ONLY FOR ON-SITE METHODS!] Banking service information required to make the payment. |
bank_method |
string | Bank payment method |
bank_number |
string | Mobile payment phone number |
bank_document |
string | Bank identification document |
bank_name |
string | Full name of the bank |
bank_nameshort |
string | Short name of the bank |
bank_code |
string | Bank code |
bank_linkqr |
string | URL of the QR code for payment |
attributes_request |
object | [!ONLY FOR ON-SITE METHODS!] Data required to complete and report the payment. |
transaction |
string | Transaction identifier |
payer |
object | Required payer information |
phone_number |
string | Payer's phone number |
payment_reference |
string | Payment reference |
Bad request.
{ "status": "failed", "type": "Unprocessable Entity", "message_error": "subject:invalid,amount:is empty,email:is empty,order:invalid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
message_error |
string | Error message. |
Confirm On-Site
Section titled “Confirm On-Site”/api/validonsiteThis method allows the payment to be confirmed on the merchant's website by sending payer information for verification. The result of the transaction will be reported via the [urlnotify] callback.
Request body
| Parameter | Type | Description |
|---|---|---|
transactionrequired |
string | Unique transaction identifier |
payerrequired |
object | Payer information |
phone_numberrequired |
string | Payer's phone number |
payment_referencerequired |
string | Payment reference issued by the banking entity |
id_numberrequired |
string | Payer's ID number |
bank_coderequired |
string | Payer's bank code |
payment_date |
string | Payment date (optional) |
curl -X POST \'https://BASE_URL/api/validonsite' \-H 'Accept: application/json, text/plain, */*' \-H 'Authorization: Bearer TOKEN-PUBLIC' \-H 'Content-Type: application/json' \-H 'Host: BASE-URL' \-d '{ "transaction": "trx2...", "payer": { "phone_number": "04129874563", "payment_reference": "12345600", "id_number": "V12987456", "bank_code": "0102", "payment_date": "2026-08-25" }}'$client = new \GuzzleHttp\Client();$body = $client->request('POST', 'https://BASE_URL/api/validonsite', [ 'json' => [ 'transaction' => 'trx2...', 'payer' => [ 'phone_number' => '04129874563', 'payment_reference' => '12345600', 'id_number' => 'V12987456', 'bank_code' => '0102', 'payment_date' => '2026-08-25' ] ], 'headers' => [ 'Authorization' => 'Bearer TOKEN_PUBLICO' ]])->getBody();$response = json_decode($body);const data = { "transaction": "trx2...", "payer": { "phone_number": "04129874563", "payment_reference": "12345600", "id_number": "V12987456", "bank_code": "0102", "payment_date": "2026-08-25" }};const request = async (data) => { const response = await fetch('https://BASE_URL/api/validonsite', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer TOKEN_PUBLICO' }, body: JSON.stringify(data) }); const result = await response.json(); console.log(result)}request(data);Responses
Successful response
{ "transaction": "trx24...", "status": "register", "message": "payment received and pending verification", "gateway": { "status": "successful" }}Response fields
| Parameter | Type | Description |
|---|---|---|
transactionrequired |
string | Unique transaction identifier |
statusrequired |
string | Transaction status |
messagerequired |
string | Descriptive status message |
gatewayrequired |
object | Payment gateway information |
status |
string | Gateway status |
Bad request
{ "transaction": "trx24...", "status": "failed", "message_error": "charge already used or consumed"}Response fields
| Parameter | Type | Description |
|---|---|---|
transactionrequired |
string | Unique transaction identifier |
statusrequired |
string | Transaction status |
message_errorrequired |
string | Descriptive error message |
/api/transaction/{id}This method allows you to obtain the information of a transaction
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier
|
Responses
{ "status": "success", "id": "10ac494c1d8da71d98ea", "created_at": "2019-10-25 14:10:03", "order": "1572023402", "subject": "1572023402", "amount": "98745", "payment": { "start": "2020-12-16 15:10:33", "end": "2020-12-16 15:10:36", "media": "VEPUY", "transaction_id": 107999, "transaction_key": null, "deposit_date": "2023-10-05", "verification_key": "666...", "authorization_code": "10...", "last_4_digits": "0000", "installments": 0, "card_type": "VN", "additional_parameters": { "gateway": "CODE_GATEWAY", "network": { "ip_address": "192.0.2.123" } }, "currency": "VES" }, "nullify": { "status": "complete" }, "gateway_response": { "status": "success", "message": "successful transaction" }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Transaction status The possible statuses you can get are the following:
|
id |
string | Transaction identifier created by Payku. |
created_at |
string | Registration date. |
order |
string | Number of order. |
email |
string | Client email. |
subject |
string | Description of the purchase order. |
amount |
string | Amount. |
payment |
object | |
start |
string | Inicio de la transacción. |
end |
string | Fin de la transacción. |
media |
string | Payment method, used by the user. |
transaction_id |
string | Identifier of the transaction created by payku. |
transaction_key |
string | Transaction identifier created by Payku. |
deposit_date |
string | Date on which the deposit will be made to the customer. |
verification_key |
string | Verification code generated by Payku. |
authorization_code |
string | Authorization code. |
last_4_digits |
string | Last 4 digits of the affiliated card. |
installments |
int | Installments. |
card_type |
string | Card type. |
additional_parameters |
object | Example of additional parameters that may be sent by Payku. |
gateway |
string | |
network |
object | User network data: |
ip_address |
string | Example of IP Address of the user: |
currency |
string | Currency. |
nullify |
object | Objeto que contiene información de la respuesta de la anulación |
status |
string | Estatus de anulación. Los posibles estados que puede obtener son los siguientes:
|
gateway_response |
object | Object containing transaction response information |
status |
string | Transaction status The possible statuses you can get are the following:
|
message |
string | Message describing the status.
|
Request failed.
{ "status": "failed", "type": "Unprocessable Entity", "message_error": "subject:invalid,amount:is empty,email:is empty,order:invalid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
message_error |
string | Error message. |
Identifier does not exist.
{ "status": "failed", "type": "Not Found", "id": "is not valid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
id |
string | Id information |
/api/transaction?success=trueThis method allows you to retrieve information about transactions made on Payku. It supports pagination with a maximum of 4000 records per page.
| Parameter | Description | Example |
|---|---|---|
| date_init | Start date for the transaction search. If not specified, the current date is used. | date_init=2025-01-01 |
| date_end | End date for the transaction search. If not specified, the current date is used. | date_end=2025-12-31 |
| success | Filters successful transactions. | success=true |
| pending | Filters pending transactions. | pending=true |
| rejected | Filters rejected transactions. | rejected=true |
| page | Page number for pagination. | page=1 |
| per_page | Number of records per page (max 4000). | per_page=100 |
Example of full URL:
https://[BASE_URL]/api/transaction?date_init=2025-01-01&date_end=2025-12-31&success=true&page=1&per_page=100
Responses
{ "status": "success", "id": "10ac494c1d8da71d98ea", "created_at": "2019-10-25 14:10:03", "order": "1572023402", "subject": "1572023402", "amount": "98745", "payment": { "start": "2020-12-16 15:10:33", "end": "2020-12-16 15:10:36", "media": "VEPUY", "transaction_id": 107999, "transaction_key": null, "deposit_date": "2023-10-05", "verification_key": "666...", "authorization_code": "10...", "last_4_digits": "0000", "installments": 0, "card_type": "VN", "additional_parameters": { "gateway": "CODE_GATEWAY", "network": { "ip_address": "192.0.2.123" } }, "currency": "VES" }, "nullify": { "status": "complete" }, "gateway_response": { "status": "success", "message": "successful transaction" }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Transaction status The possible statuses you can get are the following:
|
id |
string | Transaction identifier created by Payku. |
created_at |
string | Registration date. |
order |
string | Number of order. |
email |
string | Client email. |
subject |
string | Description of the purchase order. |
amount |
string | Amount. |
payment |
object | |
start |
string | Inicio de la transacción. |
end |
string | Fin de la transacción. |
media |
string | Payment method, used by the user. |
transaction_id |
string | Identifier of the transaction created by payku. |
transaction_key |
string | Transaction identifier created by Payku. |
deposit_date |
string | Date on which the deposit will be made to the customer. |
verification_key |
string | Verification code generated by Payku. |
authorization_code |
string | Authorization code. |
last_4_digits |
string | Last 4 digits of the affiliated card. |
installments |
int | Installments. |
card_type |
string | Card type. |
additional_parameters |
object | Example of additional parameters that may be sent by Payku. |
gateway |
string | |
network |
object | User network data: |
ip_address |
string | Example of IP Address of the user: |
currency |
string | Currency. |
nullify |
object | Objeto que contiene información de la respuesta de la anulación |
status |
string | Estatus de anulación. Los posibles estados que puede obtener son los siguientes:
|
gateway_response |
object | Object containing transaction response information |
status |
string | Transaction status The possible statuses you can get are the following:
|
message |
string | Message describing the status.
|
Request error.
{ "status": "failed", "type": "Unprocessable Entity", "message_error": "subject:invalid,amount:is empty,email:is empty,order:invalid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
message_error |
string | Error message. |
Identifier does not exist.
{ "status": "failed", "type": "Not Found", "id": "is not valid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
id |
string | Id information |