The Khipu Instant Payment API (version 3.0) enables merchants to initiate, query, confirm, refund, or delete real-time bank transfer payments. Key features include retrieving a list of available banks with their limits, fees, and logos; creating payments by specifying a bank or letting users choose; confirming or requesting a refund using the payment ID; and predicting a payment's status using machine learning. Authentication is handled via a secret key in the x-api-key header, without requiring signatures, and all communication is secured with extended validation SSL certificates.
https://payment-api.khipu.com/
https://payment-api.khipu.com/v3/banks
curl -i -X GET \
https://payment-api.khipu.com/v3/banks \
-H 'x-api-key: YOUR_API_KEY_HERE'
Successful operation. Returns a JSON object with the array of available banks.
Array with list of banks.
Message with bank details.
Identifier of the parent bank (if a bank has personal and business banking, the first will be the parent of the second).
{ "banks": [ { "bank_id": "SDdGj", "name": "Banco Estado", "message": "Tarifa de $300 de transferencia a otros bancos, usando CuentaRUT.", "min_amount": 1000, "type": "Persona", "parent": "", "logo_url": "https://s3.amazonaws.com/static.khipu.com/logos/bancos/chile/estado-icon.png" } ] }
https://payment-api.khipu.com/v3/payments/{id}/confirm
curl -i -X POST \
'https://payment-api.khipu.com/v3/payments/{id}/confirm' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "message": "Message." }
https://payment-api.khipu.com/v3/payments/{id}
curl -i -X GET \
'https://payment-api.khipu.com/v3/payments/{id}' \
-H 'x-api-key: YOUR_API_KEY_HERE'
Successful operation. Returns a JSON object with the payment information.
Unique identifier of the payment, it is a 12-character alphanumeric string. Because this identifier is unique, it can be used, for example, to avoid processing a repeated notification. (Khipu waits for a code 200 when notifying a payment, if this does not occur it retries for up to two days).
Main payment URL, if the user has not previously chosen a payment method, the options are shown.
Simplified payment URL.
Normal payment URL.
URL to invoke payment from a mobile device using the Khipu APP.
It is true
if the payment already has all the necessary data to directly open the Khipu payment application.
String of alphanumeric characters that uniquely identify the payment, it is the identifier that the Khipu server will send to the merchant server when notifying that a payment is reconciled.
Date and time of payment reconciliation. ISO-8601 format.
Payment status, it can be pending
(the payer has not yet started paying), verifying
(the payment is being verified) or done
, when the payment is already confirmed.
Detail of the payment status: pending
(the payer has not yet started paying), normal
(the payment was verified and was canceled by some standard payment method), marked-paid-by-receiver
(the merchant marked the charge as paid), rejected-by-payer
(the payer declared that they will not pay), marked-as-abuse
(the payer declared that they will not pay and that the charge was unsolicited), and reversed
(the payment was canceled by the merchant, the money was returned to the payer).
URL with image of the payment.
URL of the payment receipt.
URL where the payer is redirected after the payment is completed.
URL where the payer is redirected after they give up making the payment.
URL of the webservice where the payment will be notified.
Maximum date to execute the payment (in ISO-8601 format). The client may make several payment attempts until said date. Each attempt has an individual period of 3 hours for its execution.
Array of URLs of files attached to the payment.
It is true
if the payment reconciliation was made after the expiration date.
Payment identifier assigned by the merchant.
Generic field assigned by the merchant at the time of making the payment.
Email of the person responsible for the payment.
It is true
when this is an email collection and Khipu will send reminders.
Payment method used by the payer, it can be regular_transfer
or simplified_transfer
.
Source of funds used by the payer, it can be debit
for payment with debit, prepaid
for payment with prepaid, credit
for payment with credit, or empty in case it has been paid by bank transfer.
{ "payment_id": "gqzdy6chjne9", "payment_url": "https://khipu.com/payment/info/gqzdy6chjne9", "simplified_transfer_url": "https://app.khipu.com/payment/simplified/gqzdy6chjne9", "transfer_url": "https://khipu.com/payment/manual/gqzdy6chjne9", "app_url": "khipu:///pos/gqzdy6chjne9", "ready_for_terminal": false, "notification_token": "9dec8aa176c5223026919b3b5579a4776923e646ff3be686b9e6b62ec042e91f", "receiver_id": 985101, "conciliation_date": "2017-03-01T13:00:00.000Z", "subject": "Test", "amount": 1000, "currency": "CLP", "status": "done", "status_detail": "normal", "body": "Test", "picture_url": "https://micomercio.com/picture_url", "receipt_url": "https://micomercio.com/order/receipt_url", "return_url": "https://micomercio.com/order/return_url", "cancel_url": "https://micomercio.com/order/cancel_url", "notify_url": "https://micomercio.com/webhook/notify_url", "notify_api_version": "3.0", "expires_date": "2023-12-31T15:45:00-04:00", "attachment_urls": [ "https://micomercio.com/attachment1.pdf" ], "bank": "Banco de Chile (Edwards Citi)", "bank_id": "dfFbF", "payer_name": "Nombre Pagador", "payer_email": "pagador@email.com", "personal_identifier": "11.000.111-9", "bank_account_number": "001120490689", "out_of_date_conciliation": true, "transaction_id": "zwo3wqz6uulcvajt", "custom": "<xml>...</xml>", "responsible_user_email": "responsible@email.com", "send_reminders": true, "send_email": true, "payment_method": "simplified_transfer", "funds_source": "debit", "discount": 0, "third_party_authorization_details": "string" }
https://payment-api.khipu.com/v3/payments/{id}
curl -i -X DELETE \
'https://payment-api.khipu.com/v3/payments/{id}' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "message": "Message." }
The amount of the charge. Without thousands separator and using '.' as decimal separator. Up to 4 decimal places, depending on currency.
The currency code in ISO-4217 format.
Transaction's identifier. Ex: invoice or purchase order number.
Parameter to send personalized transaction information. Ex: XML document with the shopping cart details.
Description of the charge.
The URL to send the customer to while the payment is being verified.
The URL to send the customer to if they decide not to make the transaction.
A URL of a photo of your product or service.
The address of the web-service that khipu will use to notify when the payment is reconciled.
The URL address of the PDF file with the contract to be signed through this payment. The merchant must be enabled for this service and the fixed_payer_personal_identifier
field is required.
Version of the notifications API to receive notifications by web-service.
Maximum date to execute the payment (in ISO-8601 format). The client may make several payment attempts until said date. Each attempt has an individual period of 3 hours for its execution.
If true
, a collection request will be sent to the email specified in payer_email
.
Payer's name. It is required when send_email
is true
.
Payer's email. Required when send_email
is true
.
Email of the person responsible for this collection, must correspond to a khipu user with permissions to collect using this collection account.
Personal identifier. If specified, payment can only be made using that identifier.
Fee for the integrator. It is only valid if the collection account has an associated integrator account.
For collection accounts with more own account. Allows you to choose the account where the transfer should occur.
Collection submission date. It is also the final date to be able to refund the charge. ISO-8601 format.
The charge can only be paid using the specified payment method. Possible values for this field are found in the id
field of the response from the /api/3.0/merchants/paymentMethods
endpoint.
Name of the end merchant for whom a Payment Service Provider is processing a payment. Required for PSP client transactions; not applicable for others. In the case of a PSP of PSPs, they must be entered separated by '->'
https://payment-api.khipu.com/v3/payments
curl -i -X POST \
https://payment-api.khipu.com/v3/payments \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"amount": 1000,
"currency": "CLP",
"subject": "Cobro de prueba"
}'
Successful operation. Returns a JSON object with the information of the payment created.
Unique identifier of the payment, it is a 12-character alphanumeric string. Because this identifier is unique, it can be used, for example, to avoid processing a repeated notification. (Khipu waits for a code 200 when notifying a payment, if this does not occur it retries for up to two days).
Main payment URL, if the user has not previously chosen a payment method, the options are shown.
Simplified payment URL.
Normal payment URL.
URL to invoke payment from a mobile device using the Khipu APP.
{ "payment_id": "gqzdy6chjne9", "payment_url": "https://khipu.com/payment/info/gqzdy6chjne9", "simplified_transfer_url": "https://app.khipu.com/payment/simplified/gqzdy6chjne9", "transfer_url": "https://khipu.com/payment/manual/gqzdy6chjne9", "app_url": "khipu:///pos/gqzdy6chjne9", "ready_for_terminal": false }
https://payment-api.khipu.com/v3/payments/{id}/refunds
curl -i -X POST \
'https://payment-api.khipu.com/v3/payments/{id}/refunds' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{}'
{ "message": "Message." }
https://payment-api.khipu.com/v3/predict
curl -i -X GET \
'https://payment-api.khipu.com/v3/predict?amount=string&bank_id=string¤cy=string&payer_email=string' \
-H 'x-api-key: YOUR_API_KEY_HERE'
Successful operation. Returns a JSON object with the prediction along with additional information.
Maximum amount to transfer to a new recipient.
The result of the prediction.
{ "result": "ok", "max_amount": 5000000, "cool_down_date": "2024-06-21T11:23:09.123Z", "new_destinatary_max_amount": 100000 }
First name of the administrator of the collection account to be created.
Last name of the administrator of the collection account to be created.
Email of the administrator of the collection account to be created.
ISO 3166-1 two-character alphanumeric code of the country of the collection account to be created.
Tax identifier of the merchant associated with the collection account to be created.
Tax category or tax item of the merchant associated with the collection account to be created.
Tax name of the merchant associated with the collection account to be created.
Telephone of the merchant associated with the collection account to be created.
Address of the merchant of the collection account to be created.
Second line of the address of the merchant of the collection account to be created.
Third line of the address of the merchant of the collection account to be created.
Name of the merchant's contact.
Position of the merchant contact.
Email address of the merchant's contact.
Merchant's contact phone number.
Account type. It is required if the alternative trusted integrator model is used.
Personal identifier of the owner of the bank account.
Default URL for the webservice where the payment will be notified.
https://payment-api.khipu.com/v3/receivers
curl -i -X POST \
https://payment-api.khipu.com/v3/receivers \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"admin_first_name": "Nombre",
"admin_last_name": "Apellido",
"admin_email": "admin@email.com",
"country_code": "CL",
"business_identifier": "99.999.999-9",
"business_category": "VENTA AL POR MAYOR DE FRUTAS Y VERDURAS",
"business_name": "Nombre Tributario",
"business_phone": "+56988887777",
"business_address_line_1": "Calle principal 1111",
"business_address_line_2": "Oficina 3-A",
"business_address_line_3": "Santiago",
"contact_full_name": "Nombre Contacto",
"contact_job_title": "Tesorero",
"contact_email": "contacto@email.com",
"contact_phone": "+56955553333"
}'
{ "receiver_id": "934568", "secret": "b2025dc47a29a04592fa3c1191110370db0e208c" }
https://payment-api.khipu.com/v3/merchants/{id}/paymentMethods
curl -i -X GET \
'https://payment-api.khipu.com/v3/merchants/{id}/paymentMethods' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "paymentMethods": [ { "id": "simplified_transfer", "name": "simplified_transfer", "logo_url": "https://s3.amazonaws.com/static.khipu.com/buttons/2015/150x50-transparent.png" } ] }