Skip to content

Marketplace

It allows the registration of clients, to later carry out the distribution according to the assigned percentage.

Base URL: https://app.payku.cl/ (Default server) · https://des.payku.cl/ (Sandbox server)
POST/api/maclient

This method allows the insertion of client data.

Request body

ParameterTypeDescription
emailrequired string <email>

Client email.

maximum 50 characters
namerequired string

Client name

maximum 150 characters
Example: Joe Doe
phonerequired string

Client phone.

maximum 12 characters
Example: 923122312
bankrequired object
maximum 58 characters
sbifrequired string

Bank code to which the bank account belongs.

maximum 5 characters
Example: 0001
typerequired string

Account type.

  • 1 Checking account
  • 2 Vista/Cuenta RUT
  • 3 Saving account
maximum 1 character
Example: 1
numrequired string

Client's account number.

maximum 40 characters
Example: 12312313121
rutrequired string

Single Tax Registry.

12 characters required
Example: 111111111
curl -X POST \
https://BASE_URL/api/maclient \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \
-d {
"email": "[email protected]",
"name": "Joe Doe",
"phone": "923122312",
"bank": {
"sbif": "1234",
"type": "1",
"num": "12312313121",
"rut": "111111111"
}
}'

Responses

200
{
"id": "madb93fc00a2cf6f4449",
"status": "register",
"name": "Joe Doe",
"phone": "923122312",
"email": "[email protected]",
"bank": {
"sbif": "1234",
"type": "1",
"num": "12312313121",
"rut": "111111111"
},
"affiliations": 0,
"created_at": "2020-09-28 20:42:59",
"update_at": "null"
}
Response fields
ParameterTypeDescription
id string

Identifier created by payku.

Example: madb93fc00a2cf6f4449
status string

Client status.

Example: register
name string

Client name.

Example: Joe Doe
phone string

Client phone.

Example: 923122312
email string <email>

Client email.

bank object
sbif string

Bank code.

Example: 1234
type string

Account type.

  • 1 Checking account
  • 2 Vista/Cuenta RUT
  • 3 Saving account
Example: 1
num string

Client's account number.

Example: 12312313121
rut string

Single Tax Registry.

Example: 111111111
affiliations integer

Number of affiliations.

Example: 0
created_at string <datetime>

Registration date.

Example: 2020-09-28 20:42:59
update_at string <datetime>

Update date.

Example: null
GET/api/maclient/{idClient}

This method allows obtaining the details of a client.

Path parameters

ParameterTypeDescription
idrequired string

Unique identifier per payku.

maximum 20 characters
curl -X GET \
https://BASE_URL/api/maclient/id \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \

Responses

200
{
"id": "madb93fc00a2cf6f4449",
"status": "register",
"name": "Joe Doe",
"phone": "923122312",
"email": "[email protected]",
"bank": {
"sbif": "1234",
"type": "1",
"num": "12312313121",
"rut": "111111111"
},
"affiliations": 0,
"created_at": "2020-09-28 20:42:59",
"update_at": "null"
}
Response fields
ParameterTypeDescription
id string

Identifier created by payku.

Example: madb93fc00a2cf6f4449
status string

Client status.

Example: register
name string

Client name.

Example: Joe Doe
phone string

Client phone.

Example: 923122312
email string <email>

Client email.

bank object
sbif string

Bank code.

Example: 1234
type string

Account type.

  • 1 Checking account
  • 2 Vista/Cuenta RUT
  • 3 Saving account
Example: 1
num string

Client's account number.

Example: 12312313121
rut string

Single Tax Registry.

Example: 111111111
affiliations integer

Number of affiliations.

Example: 0
created_at string <datetime>

Registration date.

Example: 2020-09-28 20:42:59
update_at string <datetime>

Update date.

Example: null
PUT/api/maclient/{idClient}

This method allows updating the data of a client.

Path parameters

ParameterTypeDescription
idrequired string

Unique marketplace identifier.

maximum 20 characters

Request body

ParameterTypeDescription
name string

Client name

maximum 50 characters
Example: Joe Doe Doe
phone string

Client phone

maximum 50 characters
Example: 923122312
bank object

Client bank details

maximum 58 characters
sbif string

Code of the bank to which the bank account belongs.

maximum 5 characters
Example: 0001
type int

Account type.

  • 1 Checking account
  • 2 Vista/Cuenta RUT
  • 3 Saving account
maximum 1 character
Example: 3
num string

Client's account number.

maximum 40 characters
Example: 9999999
rut string

Single Tax Registry.

12 characters required
Example: 111111111
curl -X PUT \
https://BASE_URL/api/maclient/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 {
"name":"Joe Doe",
"phone":"923122312",
"bank": {
"sbif": "0001",
"type": "3",
"num": "9999999",
"rut": "261009617"
}
}'

Responses

200
{
"id": "cl0be4c8e623c167bc8b777",
"status": "register",
"name": "Joe Doe",
"phone": "923122312",
"email": "923122312",
"bank": {
"sbif": "0001",
"type": "3",
"num": "9999999",
"rut": "261009617"
},
"affiliations": 2,
"affiliations_details": [
[
{
"id": "s6df85b41df65b21se685",
"status": "register",
"token": "sgh65g1ns6fg5n1sfg2sr6j5nfg65shr6gh5s4r6h5fg6",
"name": "market1",
"percentage_affiliation": 1,
"percentage_client": 99
},
{
"id": "s6df85b41df65b21se685",
"status": "register",
"token": "sgh65g1ns6fg5n1sfg2sr6j5nfg65shr6gh5s4r6h5fg6",
"name": "market2",
"percentage_affiliation": 1,
"percentage_client": 99
}
]
]
}
Response fields
ParameterTypeDescription
id string

Marketplace identifier.

Example: cl0be4c8e623c167bc8b777
status string

Client status.

Example: register
name string

Client name.

Example: Joe Doe
phone string

Client phone.

Example: 923122312
email string

Client email.

Example: 923122312
bank object

Client bank details.

sbif string

Code of the bank to which the bank account belongs.

Example: 0001
type string

Client account type.

Example: 3
num string

Client bank account.

Example: 9999999
rut string

Client rut

Example: 261009617
affiliations number

Number of affiliations.

Example: 2
affiliations_details array of objects
id string

Afiliation identifier.

status string

Afiliation status:

  • not found
  • pending
  • liquidate
  • pending for deposit
  • paid
token string

Afiliation Token.

name string

Afiliation name.

percentage_affiliation string

Afiliation porcentage.

percentage_client string

Cliente porcentage.

DELETE/api/maclient/{idClient}

This method allows the removal of a client associated with an id.

Path parameters

ParameterTypeDescription
idrequired string

Unique customer identifier per payku.

maximum 20 characters
curl -X DELETE \
https://BASE_URL/api/maclient/id \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \

Responses

200
{
"status": "suspended",
"id": "madb93fc00a2cf6f4449"
}
Response fields
ParameterTypeDescription
status string

Client status.

Example: suspended
id string

Transaction identifier created by payku.

Example: madb93fc00a2cf6f4449
POST/api/maaffiliation

This method allows you to register the data for membership.

Request body

ParameterTypeDescription
namerequired string

Membership name.

maximum 80 characters
Example: name
percentagerequired string

Percentage corresponding to the payku user.

maximum 2 characters
Example: 20
affiliationrequired array of anys

Array containing customers, each customer is an array containing a customer identifier created by payku and the percentage that it will get.

maximum 25 characters
Example: [["madb93fc00a2cf6f4449","80"]]
curl -X POST \
https://BASE_URL/api/maaffiliation \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \
-d {
"name": "name",
"percentage": "20",
"affiliation": [
["ma9fd16221a9645b0036","80"]
]
}'

Responses

200
{
"id": "sucaab7865dceaff49d8b3",
"status": "register",
"name": "name",
"token": "eecd92fdbb8bf615e8215d6fbb30bb6ae6f82c9e1810f85b65bbeb472794c4a4",
"percentage": "20.00",
"affiliations": [
{
"id": "ma9fd16221a9645b0036",
"name": "name",
"percentage": "80.00"
}
]
}
Response fields
ParameterTypeDescription
id string

Unique subscription identifier for payku.

Example: sucaab7865dceaff49d8b3
status string

Status.

Example: register
name string

Membership name.

Example: name
token string

Affiliate Token that is entered into the merchant.

Example: eecd92fdbb8bf615e8215d6fbb30bb6ae6f82c9e1810f85b65bbeb472794c4a4
percentage string

Payku user affiliation percentage.

Example: 20.00
affiliations array of objects
id string

Identifier.

Example: ma9fd16221a9645b0036
name string

Affiliate name.

Example: name
percentage string

Percentage corresponding to each affiliate.

Example: 80.00
GET/api/maaffiliation/{idClient}

This method allows you to obtain the details of an membership.

Path parameters

ParameterTypeDescription
idrequired string

Unique membership identifier for payku.

maximum 20 characters
curl -X GET \
https://BASE_URL/api/maaffiliation/id \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \

Responses

200
{
"id": "sucaab7865dceaff49d8b3",
"status": "register",
"name": "name",
"token": "eecd92fdbb8bf615e8215d6fbb30bb6ae6f82c9e1810f85b65bbeb472794c4a4",
"percentage": "20.00",
"affiliations": [
{
"id": "ma9fd16221a9645b0036",
"name": "name",
"percentage": "80.00"
}
]
}
Response fields
ParameterTypeDescription
id string

Unique subscription identifier for payku.

Example: sucaab7865dceaff49d8b3
status string

Status.

Example: register
name string

Membership name.

Example: name
token string

Affiliate Token that is entered into the merchant.

Example: eecd92fdbb8bf615e8215d6fbb30bb6ae6f82c9e1810f85b65bbeb472794c4a4
percentage string

Payku user affiliation percentage.

Example: 20.00
affiliations array of objects
id string

Identifier.

Example: ma9fd16221a9645b0036
name string

Affiliate name.

Example: name
percentage string

Percentage corresponding to each affiliate.

Example: 80.00
DELETE/api/maaffiliation/{idClient}

This method allows the removal of an membership associated with an id.

Path parameters

ParameterTypeDescription
idrequired string

Unique client identifier per payku.

maximum 20 characters
curl -X DELETE \
https://BASE_URL/api/maaffiliation/id \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \

Responses

200
{
"status": "suspended",
"id": "eecd92fdbb8bf615e821"
}
Response fields
ParameterTypeDescription
status string

Membership status.

Example: suspended
id string

Transaction identifier created by payku.

Example: eecd92fdbb8bf615e821
POST/api/transaction/

This method allows to create a payment order to Payku and receives as a response the URL to redirect the payer's browser and the token that identifies the transaction. Once the payer makes the successful payment, Payku will notify the result to the page of the business that was sent in the urlnotify parameter.

Request body

ParameterTypeDescription
emailrequired string <email>

Client email.

maximum 50 characters
orderrequired string

Trade order.

maximum 40 characters
Example: 98745
subjectrequired string

Description of the order.

maximum 2000 characters
Example: test subject
amountrequired integer

Order amount.

maximum 14 digits
Example: 25000
payment integer

Identifier of the payment method. If the identifier is sent, the payer will be redirected directly to the indicated means of payment.

  • 1 Webpay
  • 4 Etpay (Transfer)
  • 6 Pago46
  • 9 Mach
  • 19 Fintoc (Transfer)
  • 23 Tenpo
  • 26 Floid (Transfer)
  • 99 All
maximum 2 characters
Example: 1
urlreturn string <url>

return url of the trade where payku will redirect the payer.

maximum 200 characters
Example: https://youwebsite.com/urlreturn?orderClient=123
urlnotify string <url>

Callback url of the business where payku will notify the payment.

maximum 600 characters
Example: https://youwebsite.com/urlnotify?orderClient=123
marketplace string

Mandatory attribute to make transactions to Marketplace affiliation, this consists of the token of the marketplace affiliation to which you want to carry out the transaction.

maximum 70 characters
Example: c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030
Ventana de terminal
curl -X POST \
https://BASE-URL/api/transaction \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer PUBLIC-TOKEN' \
-H 'Content-Type: application/json' \
-H 'Host: BASE-URL' \
-d '{
"email": "[email protected]",
"order": "5696"
"subject": "Cliente Test",
"amount": 25000,
"payment": 1,
"urlreturn": "https://youwebsite.com/urlreturn?orderClient=123",
"urlnotify": "https://youwebsite.com/urlnotify?orderClient=123",
"marketplace": "c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030"
}'

Responses

200
{
"status": "pending",
"id": "ma32cb779c0a777fc68",
"url": "https://BASE-URL/payment_url"
}
Response fields
ParameterTypeDescription
status string

Transaction status The possible statuses you can get are the following:

  • pending
  • success
  • rejected
  • refunded partial
  • refunded
Example: pending
id string

Transaction identifier created by payku.

Example: ma32cb779c0a777fc68
url string

URL to redirect the user.

Example: https://BASE-URL/payment_url