Subscription
It allows the linking of a plan to Clients, to later make recurring charges automatically, as defined in each plan.
https://app.payku.cl/ (Default server) · https://des.payku.cl/ (Sandbox server)Insert data to a Client
Section titled “Insert data to a Client”/api/suclientThis method allows the insertion of Client data.
Request body
| Parameter | Type | Description |
|---|---|---|
emailrequired |
string <email> | Client email. |
namerequired |
string | Client name |
rut |
string | Single Tax Registry of the client, the entry of this data with or without a hyphen will be allowed. |
phonerequired |
string | Client phone. |
address |
string | Client address. |
country |
string | Client country. |
region |
string | Client region. |
city |
string | Client city. |
postal_code |
string | Client Zip Code. |
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Client additional parameter |
parameter_2 |
string | Client additional parameter |
curl -X POST \https://BASE_URL/api/suclient \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "email": "[email protected]", "name": "Joe Doe", "rut": "111111111", "phone": "923122312", "address": "Moneda 101", "country": "Chile", "region": "Metropolitana", "city": "Santiago", "postal_code": "850000, "additional_parameters":{ "parameter_1": "example", "parameter_2": "example 2", } }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/suclient', [ 'json' => [ 'name' => 'Joe Doe', 'rut' => '111111111', 'phone' => '923122312', 'address' => 'Moneda 101', 'country' => 'Chile', 'region' => 'Metropolitana', 'city' => 'Santiago', 'postal_code' => '850000', 'additional_parameters' => [ 'parameter_1' => 'example', 'parameter_2' => 'example 2' ] ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/suclient', { 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 = { name: "Joe Doe", rut: "111111111", phone: "923122312", address: "Moneda 101", country: "Chile", region: "Metropolitana", city: "Santiago", postal_code: "850000", additional_parameters:{ parameter_1: "example", parameter_2: "example 2", }};
request(data);Responses
{ "status": "active", "id": "cl0be4c8e623c167bc8b29", "rut": "11111111", "name": "Joe Doe", "phone": "923122312", "address": "Moneda 101", "country": "Chile", "region": "Metropolitana", "city": "Santiago", "postal_code": "850000", "create_at": "2020-09-29", "update_at": null, "subcriptions": null, "additional_parameters": { "parameter_1": "example", "parameter_2": "example" }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Client status. |
id |
string | Identifier of the transaction created by payku. |
rut |
string | Single Tax Registry of the client. |
name |
string | Client name. |
phone |
string | Client phone. |
email |
string | Client email. |
address |
string | Client address. |
country |
string | Client country. |
region |
string | Client region. |
city |
string | Client city. |
postal_code |
string | Client Zip Code. |
create_at |
string <datetime> | Registration date. |
update_at |
string <datetime> | Update date. |
subcriptions |
object | Client subscriptions. |
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Client additional parameter |
parameter_2 |
string | Client additional parameter |
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. |
Query Client data
Section titled “Query Client data”/api/suclient/{idClient} or {emailClient}This method allows obtaining the details of a client or the client's email.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier per payku. |
curl -X GET \https://BASE_URL/api/suclient/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "status": "active", "id": "cl0be4c8e623c167bc8b29", "rut": "11111111", "name": "Joe Doe", "phone": "923122312", "address": "Moneda 101", "city": "Santiago", "region": "Metropolitana", "country": "Chile", "postal_code": "850000", "create_at": "2020-09-29", "update_at": null, "active_cards": [ { "last_4_digits": "XXXXXXXXXXXX6622", "identifier": "surec804a8ed60c747cb8839", "card_type": "Visa", "register": "2022-07-26 08:00:19" }, { "last_4_digits": "XXXXXXXXXXXX1234", "identifier": "surec804a8ed60c747cb8843", "card_type": "MasterCard", "register": "2023-01-01 12:00:00" } ], "additional_parameters": { "parameter_1": "example", "parameter_2": "example" }, "subcriptions": { "id": "su867f07772aa5f5175527", "created_at": "2020-09-29 19:58:35", "status": "active", "amount": "15000", "plan": [ { "id": "pl9697fb170834ad42dd00", "name": "test plan", "currency": "CLP" } ], "cards": [ { "last_4_digits": "6622", "card_type": "Visa" } ], "transactions": [ { "created_at": "2020-09-30 19:58:35", "date_payment": "2020-09-30", "amount": "10000", "transaction": "204444", "authorization_code": "1234", "order": "001", "description": "description", "status": "success" } ] }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Client status. |
id |
string | Identifier of the transaction created by payku. |
rut |
string | Single Tax Registry of the client. |
name |
string | Client name. |
phone |
string | Client phone. |
email |
string | Client email. |
address |
string | Client address. |
city |
string | Client city. |
region |
string | Client region. |
country |
string | Client country. |
postal_code |
string | Client Zip Code. |
create_at |
string <datetime> | Registration date. |
update_at |
string <datetime> | Update date. |
active_cards |
array of objects | |
last_4_digits |
string | Last 4 digits of the affiliated carda. |
identifier |
string | id card. |
card_type |
string | card type. |
register |
string | Register date. |
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Client additional parameter |
parameter_2 |
string | Client additional parameter |
subcriptions |
object | |
id |
string | Subscription identifier created by payku. |
created_at |
string <datetime> | Registration date. |
status |
string | Subscription status. The possible statuses you can get are the following:
|
amount |
string | Subscription amount. |
plan |
array of objects | |
id |
string | Identifier of the plan created by payku. |
name |
string | Plan name. |
currency |
string | Currency. |
cards |
array of objects | |
last_4_digits |
string | Last 4 digits of the affiliated card. |
card_type |
string | Card type. |
transactions |
array of objects | |
created_at |
string | Transaction creation date. |
date_payment |
string | Date the transaction was made. |
amount |
string | Transaction amount. |
transaction |
string | Transaction number. |
authorization_code |
string | Authorization code. |
order |
string | Number of order. |
description |
string | Description. |
status |
string | Transaction status The possible statuses you can get are the following:
|
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. |
Update Client data
Section titled “Update Client data”/api/suclient/{idClient} or {emailClient}This method allows updating a Client's data.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier per payku. |
Request body
| Parameter | Type | Description |
|---|---|---|
email |
string <email> | Client email. |
name |
string | Client name |
phone |
string | Client phone. |
address |
string | Client address. |
country |
string | Client country. |
region |
string | Client region. |
city |
string | Client city. |
postal_code |
string | Client Zip Code. |
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Client additional parameter |
parameter_2 |
string | Client additional parameter |
curl -X PUT \https://BASE_URL/api/suclient/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "email": "[email protected]", "name": "Joe Doe Doe", "phone": "923122312", "address": "Moneda 121", "country": "Chile", "region": "Metropolitana", "city": "Santiago", "postal_code": "750000", "additional_parameters":{ "parameter_1": "example", "parameter_2": "example 2", } }'$client = new \GuzzleHttp\Client(); $body = $client->request('PUT', 'https://BASE_URL//api/suclient/cla90927fa9b30e1dfffa0', [ 'json' => [ 'name' => 'Joe Doe Doe', 'phone' => '923122312', 'address' => 'Moneda 121', 'country' => 'Chile', 'region' => 'Metropolitana', 'city' => 'Santiago', 'postal_code' => '750000', 'additional_parameters' => [ 'parameter_1' => 'example', 'parameter_2' => 'example 2' ] ], ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ]])->getBody();$response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/suclient', { method: 'PUT', 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 = { name: "Joe Doe Doe", phone: "923122312", address: "Moneda 121", country: "Chile", region: "Metropolitana", city: "Santiago", postal_code: "750000", additional_parameters:{ parameter_1: "example", parameter_2: "example 2", }};
request(data);Responses
{ "status": "active", "id": "cl0be4c8e623c167bc8b29", "name": "Joe Doe Doe", "phone": "923122312", "address": "Moneda 121", "city": "Santiago", "region": "Metropolitana", "country": "Chile", "postal_code": "750000", "create_at": "2020-09-29", "update_at": "2020-10-2 08:32:52", "additional_parameters": { "parameter_1": "example", "parameter_2": "example" }, "subcriptions": { "id": "su867f07772aa5f5175527", "created_at": "2020-09-29 19:58:35", "status": "active", "amount": "15000", "plan": [ { "id": "pl9697fb170834ad42dd00", "name": "test plan", "currency": "CLP" } ], "cards": [ { "last_4_digits": "6622", "card_type": "Visa" } ], "transactions": [ { "created_at": "2020-09-30 19:58:35", "date_payment": "2020-09-30", "amount": "10000", "transaction": "204444", "authorization_code": "1234", "order": "001", "description": "description", "status": "success" } ] }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Client status. |
id |
string | Transaction identifier created by payku. |
name |
string | Client name. |
phone |
string | Client phone. |
email |
string | Client email. |
address |
string | Client address. |
city |
string | Client city. |
region |
string | Client region. |
country |
string | Client country. |
postal_code |
string | Client Zip Code. |
create_at |
string <datetime> | Registration date. |
update_at |
string <datetime> | Update date. |
additional_parameters |
object | Client additional parameters |
parameter_1 |
string | Client additional parameter |
parameter_2 |
string | Client additional parameter |
subcriptions |
object | |
id |
string | Subscription identifier created by payku. |
created_at |
string <datetime> | Registration date. |
status |
string | Subscription status. The possible statuses you can get are the following:
|
amount |
string | Subscription amount. |
plan |
array of objects | |
id |
string | Identifier of the plan created by payku. |
name |
string | Plan name. |
currency |
string | currency. |
cards |
array of objects | |
last_4_digits |
string | Last 4 digits of the affiliated card. |
card_type |
string | Card type. |
transactions |
array of objects | |
created_at |
string | Transaction creation date. |
date_payment |
string | Date the transaction was made. |
amount |
string | Transaction amount. |
transaction |
string | Transaction number. |
authorization_code |
string | Authorization code. |
order |
string | Number of order. |
description |
string | Description. |
status |
string | Transaction status The possible statuses you can get are the following:
|
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. |
Delete Client
Section titled “Delete Client”/api/suclient/{idClient} or {emailClient}This method allows the elimination of a client associated with a user id.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier per payku. |
curl -X DELETE \https://BASE_URL/api/suclient/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('DELETE', 'https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', { method: 'DELETE', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "status": "success", "id": "cl0be4c8e623c167bc8b29"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Client status. |
id |
string | Transaction identifier created by payku. |
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 all Clients
Section titled “Get all Clients”/api/suclient/customersThis method allows to obtain all Clients.
curl -X GET \https://BASE_URL/api/suclient/customers \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/suclient/customers', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/suclient/customers', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
[ { "Customers": [ { "status": "active", "id": "cl0be4c8e623c167bc8b29", "rut": "11111111", "name": "Joe Doe", "phone": "923122312", "address": "Moneda 101", "city": "Santiago", "region": "Metropolitana", "country": "Chile", "postal_code": "850000", "create_at": "2020-09-29", "update_at": null, "active_cards": [ { "last_4_digits": "XXXXXXXXXXXX6622", "identifier": "surec804a8ed60c747cb8839", "card_type": "Visa", "register": "2022-07-26 08:00:19" }, { "last_4_digits": "XXXXXXXXXXXX1234", "identifier": "surec804a8ed60c747cb8843", "card_type": "MasterCard", "register": "2023-01-01 12:00:00" } ], "subcriptions": { "id": "su867f07772aa5f5175527", "created_at": "2020-09-29 19:58:35", "status": "active", "amount": "15000", "plan": [ { "id": null, "name": null, "currency": null } ], "cards": [ { "last_4_digits": null, "card_type": null } ], "transactions": [ { "created_at": null, "date_payment": null, "amount": null, "transaction": null, "authorization_code": null, "order": null, "description": null, "status": null } ] } } ] }]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. |
Insert data for subscription
Section titled “Insert data for subscription”/api/sususcriptionThis method allows the user of a Payku account to create a subscription to a fixed-amount subscription plan, a consumer plan subscription and a variable-amount subscription to one of its clients, for this last type of subscription it is necessary to send the amount that will be charged in the subscription, it is important to note that when making this request for the first time there will be a charge of $ 50 that allows verifying that the card is active and valid, in the case of a fixed subscription plan the service charge will be automatic From the month following the subscription date and in the event that the subscription is to a consumer plan, it will be necessary to use the api / sutransaction endpoint to generate the transaction.
Request body
| Parameter | Type | Description |
|---|---|---|
planrequired |
string | Plan id. |
clientrequired |
string | Client id. |
amountoneOf · option 1required |
string | This field will only be used in the case of variable amount subscription plans, it is important to note that the currency to be used in this type of plan is CLP. |
coupononeOf · option 2required |
string | Coupon code |
curl -X POST \https://BASE_URL/api/sususcription \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "plan": "pl9697fb170834ad42dd00", "client": "cl9b1e1dd988694f30fa30" }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/sususcription, [ 'json' => [ 'plan' => 'pl9697fb170834ad42dd00', 'client' => 'cl9b1e1dd988694f30fa30', ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/sususcription', { 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 = { plan: "pl9697fb170834ad42dd00", client: "cl9b1e1dd988694f30fa30",};
request(data);Responses
{ "status": "register", "id": "sucaab7865dceaff49d8b3", "url": "http://app.payku.cl/gateway/registrosuscripcion?tipoplan=2&plan=true&token=219&validacion=e6c50ba0e0"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status. |
id |
string | Unique subscription identifier for payku. |
url |
string | Url payment and subscription activation. |
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 all subscriptions
Section titled “Get all subscriptions”/api/sususcriptionThis method allows obtaining all the subscriptions associated with a user ID, this method allows a pagination with a maximum of 100 records per page, in addition, it has a date filter, if this parameter is not entered, the current date will be taken, for the pagination, it is necessary to add the following at the end of the endpoint? page = 1 & per_page = 100, the first parameter being the number of the page and the second the number of records per page. status: you can filter the search for subscriptions depending on the status you want to search for by adding the status to search equal to true. If none is added, by default all subscriptions will be searched without discrimination by status.
curl -X GET \https://BASE_URL/api/sususcription \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/sususcription', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/sususcription', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
[ { "subscriptions": [ { "id": "sucaab7865dceaff49d8b7", "status": "active", "last_status_current_payment": "pending", "start": "2019-07-22 18:34:49", "end": "2020-06-12 00:00:00", "client": { "id": "su7e5e1c0b1bd2e37ec557", "name": "name", "rut": "1.111.111-1", "phone": "56928265454", "parametros": [], "additional_parameters": "" }, "plan": { "id": "pl9697fb170834ad42dd00", "name": "test plan", "currency": "CLP" }, "cards": { "last_4_digits": "6622", "card_type": "Visa" }, "transactions": [ { "created_at": "2020-09-30 19:58:35", "amount": "10000", "transaction": "204444", "authorization_code": "1234", "order": "001", "description": "description", "status": "success" } ], "logs": { "status": [ { "change_date": null, "initial_status": null, "final_status": null } ] } } ] }]Error en la solicitud.
{ "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 subscriptions V3
Section titled “Get subscriptions V3”/api/sususcriptionv3This method allows obtaining all the subscriptions associated with a user ID, this method allows a pagination with a maximum of 4000 records per page, in addition, it has the following filters:
date_init: indicates the date from which you want to start the subscription search, if this parameter is not sent the search will start with the current date. date_end: indicates the date where you want the subscription search to end, if this parameter is not sent, the search will have the current date as the end date. estatus: you can filter the search for subscriptions depending on the status you want to search for by adding the status to search equal to true, if none is added, by default all subscriptions will be searched without discrimination by status.
For pagination it is necessary to add the following at the end of the endpoint ?page=1&per_page=100 the first parameter being the page number and the second the number of records per page. In case you want to search for the subscriptions between the dates 01-09-2021 and 15-09-2021, also that they are only active status subscriptions, the url to use would be the following: https://[URL_BASE]/api/sususcriptionv3?date_init=2021-09-01&date_end=2021-09-15&active=true.
curl -X GET \https://BASE_URL/api/sususcriptionv3 \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' \-H 'Authorization: Bearer PUBLIC-TOKEN' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/sususcriptionv3', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/sususcriptionv3', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
[ { "subscriptions": [ { "id": "sucaab7865dceaff49d8b7", "estatus": "active", "start": "2019-07-22 18:34:49", "end": "2023-06-12 00:00:00", "client": { "id": "su7e5e1c0b1bd2e37ec557", "name": "name", "rut": "11.111.111-1", "phone": "56928265454", "parametros": [], "additional_parameters": "" }, "plan": { "id": "pl9697fb170834ad42dd00", "name": "test plan", "currency": "CLP" }, "active_cards": { "last_4_digits": "XXXXXXXXXXXX6622", "card_type": "Visa" }, "logs": { "status": [ { "change_date": null, "initial_status": null, "final_status": null } ] }, "paid": [ { "payment_cycle_day": "2021-07-09", "payment_day": "2021-07-09", "status": "success", "amount_paid": 2500, "try_number": 1, "paid_number": 1, "transactions": [] } ] } ] }]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. |
Insert data for the transaction
Section titled “Insert data for the transaction”/api/sutransactionThis method allows the user of a Payku account to generate a unique transaction to one of his clients who are subscribed to a consumption plan.
Request body
| Parameter | Type | Description |
|---|---|---|
suscriptionrequired |
string | Unique subscription identifier for payku. |
amount |
string | Amount. |
order |
string | Order. |
description |
string | Description. |
curl -X POST \https://BASE_URL/api/sutransaction \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "suscription": "sucaab7865dceaff49d8b3", "amount": "10000", "order": "001", "description": "Description" }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/sutransaction, [ 'json' => [ 'suscription' => sucaab7865dceaff49d8b3, 'order' => '001', 'amount' => '10000', 'description' => 'descripcion' ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/sutransaction', { 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 = { suscription: "sucaab7865dceaff49d8b3", amount: "10000", order: "001", description: "Description"};
request(data);Responses
{ "status": "success", "order": "001", "amount": "10000", "transaction_id": "204444", "verification_key": "025dcad37e071daa8bfc2df35189009db65692a4ff766856108be1675e870839"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Transaction status. The possible statuses you can get are the following:
|
order |
string | Order. |
amount |
string | Amount. |
transaction_id |
string | Transaction number. |
verification_key |
string |
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. |
Check subscription data
Section titled “Check subscription data”/api/sususcription/{idSuscription}This method allows you to get the details of a subscription.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier per payku. |
curl -X GET \https://BASE_URL/api/sususcription/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "id": "sucaab7865dceaff49d8b7", "status": "active", "start": "2019-07-22 18:34:49", "end": "2020-06-12 00:00:00", "client": { "id": "su7e5e1c0b1bd2e37ec557", "name": "name", "rut": "1.111.111-1", "parametros": [], "additional_parameters": "" }, "plan": { "id": "pl9697fb170834ad42dd00", "name": "test plan", "currency": "CLP" }, "cards": { "last_4_digits": "6622", "card_type": "Visa" }, "active_cards": [ { "last_4_digits": "XXXXXXXXXXXX6622", "identifier": "surec804a8ed60c747cb8839", "card_type": "Visa", "register": "2022-07-26 08:00:19" }, { "last_4_digits": "XXXXXXXXXXXX1234", "identifier": "surec804a8ed60c747cb8843", "card_type": "MasterCard", "register": "2023-01-01 12:00:00" } ], "transactions": [ { "created_at": "2020-09-30 19:58:35", "amount": "10000", "transaction": "204444", "authorization_code": "1234", "order": "001", "description": "description", "status": "success" } ], "logs": { "status": [ { "change_date": "2021-02-17 16:11:53", "initial_status": "register", "final_status": "active" } ] }}Response fields
| Parameter | Type | Description |
|---|---|---|
id |
string | Subscription identifier created by payku. |
status |
string | Subscription status. The possible statuses you can get are the following:
|
start |
string | Subscription start date. |
end |
string | Subscription termination date. |
client |
object | |
id |
string | Client identifier created by payku. |
name |
string | Client name. |
email |
string | Client email. |
rut |
string | Unique Roll Tributary. |
phone |
string | Client phone. |
parametros |
array of anys | |
additional_parameters |
array of anys | Additional parameters that Payku can send. |
plan |
object | |
id |
string | Identifier of the plan created by payku. |
name |
string | Plan name. |
currency |
string | Currency. |
cards |
object | |
last_4_digits |
string | Last 4 digits of the affiliated card. |
card_type |
string | Card type. |
active_cards |
array of objects | |
last_4_digits |
string | Last 4 digits of the affiliated carda. |
identifier |
string | id card. |
card_type |
string | card type. |
register |
string | Register date. |
transactions |
array of objects | |
created_at |
string | Transaction creation date. |
amount |
string | Transaction amount. |
transaction |
string | Transaction number. |
authorization_code |
string | Authorization code. |
order |
string | Number of order. |
description |
string | Description. |
status |
string | Transaction status The possible statuses you can get are the following:
|
logs |
object | Object with information records about subscriptions |
status |
array of objects | Array containing the status changes that were made on the subscription |
change_date |
string | Date the change was made |
initial_status |
string | Initial subscription status |
final_status |
string | Final subscription 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. |
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. |
Remove subscription
Section titled “Remove subscription”/api/sususcription/{idSuscription}This method allows the removal of a subscription associated with a subscription id.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique transaction identifier per payku. |
curl -X DELETE \https://BASE_URL/api/sususcription/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('DELETE', 'https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b3, [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', { method: 'DELETE', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "id": "sucaab7865dceaff49d8b3", "status": "success"}Response fields
| Parameter | Type | Description |
|---|---|---|
id |
string | Transaction identifier created by payku. |
status |
string | 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. |
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. |
Afiliate card to subscription
Section titled “Afiliate card to subscription”/api/suinscriptionscardsThis method allows the insertion of the data of a subscription card.
Important
In case you need to renew your client's card. this method will allow you to add a new card to the subscription.
Immediately upon updating the card associated with the subscription, the system will be able to make the corresponding late charges according to the configuration of the subscribed plan!, That is, if the subscription is in a suspended status due to maximum collection attempts made, and the customer registers a new card, the system will be able to review pending payments, make the corresponding charge, and automatically activate the subscription.
Request body
| Parameter | Type | Description |
|---|---|---|
suscriptionrequired |
string | Subscription ID. |
curl -X POST \https://BASE_URL/api/suinscriptionscards \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer PUBLIC_TOKEN' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "suscription": "sucaab7865dceaff49d8b3" }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/suinscriptionscards', [ 'json' => [ 'suscription' => sucaab7865dceaff49d8b3, ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/suinscriptionscards', { 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 = { suscription: "sucaab7865dceaff49d8b3"};
request(data);Responses
{ "status": "success", "id": "sucaab7865dceaff49d8b3", "url": "https://BASE_URL/gateway/registrosuscripcion?plan=true&token=246&validacion=d6b32"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status. |
id |
string | Unique subscription identifier for payku. |
url |
string | URL paid and subscription activation. |
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. |
Remove card
Section titled “Remove card”/api/suscriptionsdeletecardsThis method allows you to delete a card associated with the subscription.
Request body
| Parameter | Type | Description |
|---|---|---|
suscriptionrequired |
string | ID of the associated card. |
curl -X POST \https://BASE_URL/api/suscriptionsdeletecards \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN' \-H 'Authorization: Bearer PUBLIC_TOKEN' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \-d { "card": "surec804a8ed60c0a8cb8839" }'$client = new \GuzzleHttp\Client(); $body = $client->request('POST', 'https://BASE_URL/api/suscriptionsdeletecards', [ 'json' => [ 'card' => surec804a8ed60c0a8cb8839, ], 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC_TOKEN' ] ])->getBody(); $response = json_decode($body);const request = async (data) => { const response = await fetch('https://BASE_URL/api/suscriptionsdeletecards', { 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 = { card: "surec804a8ed60c0a8cb8839"};
request(data);Responses
{ "status": "Delete", "card": "surec804a8ed60c0a8cb8839"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status. |
card |
string | Identificador único de La tarjeta asociada a la suscripción. |
Request failed.
{ "status": "failed", "type": "card", "message_error": "is not valid"}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Request status. |
type |
string | Type of error. |
message_error |
string | Mensaje de error |
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. |
Check plan data
Section titled “Check plan data”/api/suplan/{idPlan}This method allows to obtain the details of a plan.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired |
string | Unique plan identifier per payku. |
curl -X GET \https://BASE_URL/api/suplan/id \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/suplan/pl29f6ad69fbd594148c39', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/suplan/pl29f6ad69fbd594148c39', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "status": "success", "plans": { "id": "pl4293e97a87195bb9edcd", "status": "active", "name": "Test plan", "code": "001", "description": "Test Plan", "url_notify_payment": "", "url_notify_suscription": "", "total_suscription": 0, "total_suscription_active": 0 }}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status. |
plans |
object | |
id |
string | Unique plan identifier per payku. |
status |
string | Plan status. |
name |
string | Plan name. |
code |
string | Plan code. |
description |
string | Plan description. |
url_notify_payment |
string <url> | |
url_notify_suscription |
string <url> | |
total_suscription |
integer | Total subscriptions. |
total_suscription_active |
integer | Total active subscriptions. |
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. |
Check data from all plans
Section titled “Check data from all plans”/api/suplan/plansThis method allows to obtain the details of all the plans.
curl -X GET \https://BASE_URL/api/suplan/plans \-H 'Accept: application/json, text/plain, */*' \-H 'Sign: SIGN' \-H 'Authorization: Bearer TOKEN_PUBLICO' \-H 'Content-Type: application/json' \-H 'Host: BASE_URL' \$client = new \GuzzleHttp\Client(); $body = $client->request('GET', 'https://BASE_URL/api/suplan/plans', [ 'headers' => [ 'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization' => 'Bearer PUBLIC-TOKEN' ] ])->getBody();$response = json_decode($body);const request = async () => { const response = await fetch('https://BASE_URL/api/suplan/plans', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN', 'Authorization': 'Bearer PUBLIC-TOKEN' }, }); const result = await response.json(); console.log(result)}
request(data);Responses
{ "status": "success", "plans": [ { "id": "pl4293e97a87195bb9edcd", "status": "active", "name": "Test plan", "code": "001", "description": "Test Plan", "url_notify_payment": "", "url_notify_suscription": "", "total_suscription": 0, "total_suscription_active": 0 } ]}Response fields
| Parameter | Type | Description |
|---|---|---|
status |
string | Status. |
plans |
array of objects | |
id |
string | Unique plan identifier per payku. |
status |
string | Plan status. |
name |
string | Plan name. |
code |
string | Plan code. |
description |
string | Plan description. |
url_notify_payment |
string <url> | |
url_notify_suscription |
string <url> | |
total_suscription |
integer | Total subscriptions. |
total_suscription_active |
integer | Total active subscriptions. |
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. |
url Callback subscription notification
Section titled “url Callback subscription notification”/urlnotifysuscriptionAfter activating the subscription by the user, payku will notify the merchant, the result of the operation (status), making a post request to the subscription notification url previously provided in the creation of the subscription and in turn deliver a series of data for internal validations by the merchant application, the subscription id which corresponds to the unique identifier in payku. This data will allow the merchant to know the status of their subscriptions and back them up in their database.
Responses
{ "id": "su74866857980c7d2b4306", "status": "active"}Response fields
| Parameter | Type | Description |
|---|---|---|
id |
string | Subscription identifier created by Payku. |
status |
string | Subscription status. The possible statuses you can get are the following:
|
url Callback payment notification
Section titled “url Callback payment notification”/urlnotifypaymentAfter charging the subscription automatically, payku will notify the merchant, the result of the operation (status), making a post request to the payment notification url previously provided in the creation of the subscription and in turn deliver a data series for internal validations by the merchant application, the transactionn_id which corresponds to the unique identifier in payku and a verification_key, which corresponds to a unique validation hash per transaction. These data will allow the merchant to know the status of their transactions and back them up in their database.
Responses
{ "transaction_id": 9123123, "verification_key": "2ba83615f863e72sdca5dfd0a6df2782", "order": 1568041684, "status": "success"}Response fields
| Parameter | Type | Description |
|---|---|---|
transaction_id |
number | Unique transaction identifier by Payku. |
verification_key |
string | Unique transaction hash. |
order |
string | Unique transaction identifier sent by the merchant. |
status |
string | Transaction status The possible statuses you can get are the following:
|