Wallet
https://app.payku.cl/ (Production) · https://des.payku.cl/ (Sandbox)Make payments to third parties from my wallet
Section titled “Make payments to third parties from my wallet”/api/wallet/payoutThis method allows you to create a payment order to a third party using funds from your Payku virtual wallet.
Note: For testing purposes (Development environment only), specific amounts will be processed automatically:
• Amounts 1000, 2000, 3000: Will be marked as approved automatically.
• Amounts 1500, 2500, 3500: Will be marked as rejected automatically.
Request body
| Parameter | Type | Description |
|---|---|---|
emailrequired |
string <email> | User's email |
phone |
string | User's phone number |
subjectrequired |
string | Description of the order |
currencyrequired |
string | Currency type (ISO format) |
orderrequired |
string | Merchant order |
amountrequired |
integer | Order amount |
accountbank_namerequired |
string | Account holder's name |
accountbank_rutrequired |
string | ID number of the account holder Format: (V/E/J) VXXXXXXXX |
accountbank_sbifrequired |
string | Bank code of the destination account.
|
accountbank_typerequired |
string | Type of account.
|
accountbank_numrequired |
string | Customer's account number in Venezuela Format: (0412 / 0414 / 0424 / 0426 / 0416) 9876543 |
url_notify |
string | Callback where the result of the payment will be notified.
|
additional_parameters |
object | Optional customer additional parameters. |
parameter_1 |
string | Custom parameter name defined by Payku user |
parameter_2 |
string | Custom parameter name defined by Payku user |
curl -X POST \https://BASE-URL/api/wallet/payout \-H 'Accept: application/json, text/plain, */*' \-H 'Authorization: Bearer PUBLIC-TOKEN' \-H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' \-H 'Content-Type: application/json' \-H 'Host: BASE-URL' \-d '{ "email": "[email protected]", "phone": "04149876543", "subject": "payOut description 9876", "currency": "VES", "order": "9876", "amount": 1000, "accountbank_name": "Jhon Doe", "accountbank_rut": "V23654789", "accountbank_sbif": "0102", "accountbank_type": "1", "accountbank_num": "04149876543", "url_notify": "https://youwebsite.com/urlnotify?orderClient=9876", "additional_parameters": { "custom_parameter_1": "keyValue", "custom_parameter_2": "SpecificValue2", "external_reference": "REF-777" }}'$client = new \GuzzleHttp\Client();$body = $client->request('POST', 'https://BASE_URL/api/wallet/payout', [ 'json' => [ 'phone' => '04149876543', 'subject' => 'payOut description 9876', 'currency' => 'VES', 'order' => '9876', 'amount' => 1000, 'accountbank_name' => 'Jhon Doe', 'accountbank_rut' => 'V23654789', 'accountbank_sbif' => '0102', 'accountbank_type' => '1', 'accountbank_num' => '04149876543', 'url_notify' => 'https://youwebsite.com/urlnotify?orderClient=9876', 'additional_parameters' => [ 'custom_parameter_1' => 'keyValue', 'custom_parameter_2' => 'SpecificValue2', 'external_reference' => 'REF-777' ] ], 'headers' => [ 'Authorization' => 'Bearer PUBLIC_TOKEN', 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' ]])->getBody();$response = json_decode($body);const data = { "phone": "04149876543", "subject": "payOut description 9876", "currency": "VES", "order": "9876", "amount": 1000, "accountbank_name": "Jhon Doe", "accountbank_rut": "V23654789", "accountbank_sbif": "0102", "accountbank_type": "1", "accountbank_num": "04149876543", "url_notify": "https://youwebsite.com/urlnotify?orderClient=9876", "additional_parameters": { "custom_parameter_1": "keyValue", "custom_parameter_2": "SpecificValue2", "external_reference": "REF-777" }};const request = async (data) => { const response = await fetch('https://BASE_URL/api/wallet/payout', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer PUBLIC_TOKEN', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' }, body: JSON.stringify(data) }); const result = await response.json(); console.log(result)}request(data);Responses
{ "status": "success", "identifier_wallet": "wvb5f7232dafff18f9", "identifier_payout": "mv40746ab8eff910f41e"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status of the load to the wallet. The possible statuses that can be obtained are the following:
|
identifier_wallet |
string | payku virtual wallet movement identifier. |
identifier_payout |
string | Third party payment identifier. |
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. |
Get payout V3
Section titled “Get payout V3”/api/payoutv3/{identificadorPayout}This method allows you to obtain a movement of payments to third parties from your payku virtual wallet using an identifier:
To perform the query it is necessary to add the following at the end of the endpoint /{identificadorPayout} for example: api/payoutv3/wa24bg36767.
curl -X GET \https://BASE-URL/api/payoutv3/{identificadorPayout} \-H 'Accept: application/json, text/plain, */*' \-H 'Authorization: Bearer PUBLIC-TOKEN' \-H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' \-H 'Content-Type: application/json' \-H 'Host: BASE-URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/payoutv3/{identificadorPayout}', [ 'headers' => [ 'Authorization' => 'Bearer PUBLIC-TOKEN', 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/payoutv3/{identificadorPayout}', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer PUBLIC-TOKEN', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' }, }); const result = await response.json(); console.log(result)}
request();Responses
{ "payout": { "id": "war3999847529816f2", "phone": "111111111", "subject": "subject order", "amount": "3680", "accountbank_rut": "111111111", "accountbank_name": "test", "accountbank_type": 1, "accountbank_num": 123123123, "accountbank_sbif": "0001", "status": "pending", "update_at": "2022-06-09 21:10:46", "origin_wallet": "wa1933f37cdaf7d1c6", "reason_rejection": " Error CCA 51. Cuenta Beneficiario no Existe, error_creditor_account_not_found" }}Response fields
| Parameter | Type | Description |
|---|---|---|
payout |
object | Destination account identifier. |
id |
string | Destination account identifier. |
phone |
string | Telephone of the destination account holder. |
email |
string | Destination account holder's email. |
subject |
string | Application Status. |
amount |
string | Amount to be deposited in the destination account. |
accountbank_rut |
string | Rut of the destination account holder. |
accountbank_name |
string | Name of the destination account holder. |
accountbank_type |
integer | Type of account of the destination bank. |
accountbank_num |
integer | Destination bank account number. |
accountbank_sbif |
string | Code of the bank to which the bank account belongs. |
status |
string | Movement status.
|
update_at |
string | Date the request was made. |
origin_wallet |
string | Id de la wallet origen. |
reason_rejection |
string | Reason for rejection. |
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. |
Incorrect public token.
{ "type": "Unauthorized", "message_error": { "error": "waiting token public" }}Response fields
| Parameter | Type | Description |
|---|---|---|
type |
string | Request status. |
message_error |
object | |
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 |