Wallet
Lets you generate bank transactions from your payku virtual wallet.
https://app.payku.cl/ (Default server) · https://des.payku.cl/ (Sandbox server)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 the funds in your wallet virtual payku.
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> | Client email |
phone |
string | Client phone. Format: 519YYYYYYYY |
subjectrequired |
string | Order Description |
currencyrequired |
string | Currency description (ISO format) |
orderrequired |
string | E-commerce order |
amountrequired |
integer | Order amount. Note: the minimum amount is 5 soles (PEN) and the maximum amount is 30000 soles (PEN). |
accountbank_namerequired |
string | Name of the destination account holder |
accountbank_rutrequired |
string | Identity document of the destination account holder in Peru: DNI, Cédula de Extranjería (CE) or passport. The field name is kept for backwards compatibility. Example (DNI): 47566578 |
accountbank_sbifrequired |
string | Code of the bank to which the bank account belongs. |
accountbank_typerequired |
string | Account type.
|
accountbank_numrequired |
string | Customer's CCI (Interbank Account Code) number. Note: The interbank CCI is a number composed of 20 digits. Only for YAPE, you may provide the associated phone number. Format: 519YYYYYYYY |
url_notify |
string | url where the result of the payment will be notified.
|
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Parameter name given by user payku |
parameter_2 |
string | Parameter name given by user payku |
order_ext |
string | Name of the external order given by the user payku (Optional) |
curl -X POST \https://BASE-URL/api/wallet/payout \-H 'Accept: application/json, text/plain, */*' \-H 'Authorization: Bearer PUBLIC-TOKEN' \-H 'Sign: SIGN' \-H 'Content-Type: application/json' \-H 'Host: BASE-URL' \-d '{ "email": "[email protected]", "phone": "51906310864", "subject": "test Gmoney peru", "currency": "PEN", "order": "0011010101777", "amount": 1, "accountbank_name": "PAYKU PERU SAC", "accountbank_rut": "47566578", "accountbank_sbif": "011", "accountbank_type": "1", "accountbank_num": "01128901338000251968", "url_notify": "https://www.youwebsite.com/urlnotify?orderClient=98745", "additional_parameters": { "parameter_1": "keyValue", "parameter_2": "keyValue", "order_ext": "fff-777" } }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/wallet/payout', [ 'json' => [ "phone" => "51906310864", "subject" => "test Gmoney peru", "currency" => "PEN", "order" => "0011010101777", "amount" => 1, "accountbank_name" => "PAYKU PERU SAC", "accountbank_rut" => "47566578", "accountbank_sbif" => "011", "accountbank_type" => "1", "accountbank_num" => "01128901338000251968", "url_notify" => "https://www.youwebsite.com/urlnotify?orderClient=98745", "additional_parameters" => [ "parameter_1" => "keyValue", "parameter_2" => "keyValue", "order_ext" => "fff-777" ] ], 'headers' => [ 'Authorization' => 'Bearer PUBLIC-TOKEN', 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/wallet/payout', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, body: JSON.stringify(data) }); const result = await response.json(); console.log(result)}
let data = { "phone": "51906310864", "subject": "test Gmoney peru", "currency": "PEN", "order": "0011010101777", "amount": 1, "accountbank_name": "PAYKU PERU SAC", "accountbank_rut": "47566578", "accountbank_sbif": "011", "accountbank_type": "1", "accountbank_num": "01128901338000251968", "url_notify": "https://www.youwebsite.com/urlnotify?orderClient=98745", "additional_parameters": { "parameter_1": "keyValue", "parameter_2": "keyValue", "order_ext": "fff-777" } };
request(data);Responses
{ "status": "success", "identifier_wallet": "wab5f7232dafff18f9", "identifier_payout": "mpe33e36b01e8a11b9ee"}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 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. |
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/mpe33e36b01e8a11b9ee.
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": "111111111111", "accountbank_name": "test", "accountbank_type": 1, "accountbank_num": "00328901338000251968", "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 | Identity document of the destination account holder: DNI, Cédula de Extranjería (CE) or passport. |
accountbank_name |
string | Name of the destination account holder. |
accountbank_type |
integer | Type of account of the destination bank. |
accountbank_num |
integer | Destination bank's CCI (Interbank Account Code) number or in case of YAPE, the beneficiary's mobile phone 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 |