Create payment

Create a payment in Khipu and obtain the URLs to redirect the user to complete the payment.

SecurityApi-Key
Request
Request Body schema: application/json
amount
required
number <double>

The amount of the charge. Without thousands separator and using '.' as decimal separator. Up to 4 decimal places, depending on currency.

Example: 1000
currency
required
string <= 255 characters

The currency code in ISO-4217 format.

Enum: "CLP" "CLF" "ARS" "PEN" "MXN" "USD" "EUR" "BOB" "COP"
Example: "CLP"
subject
required
string <= 255 characters

Text to summarize the charge.

Example: "Cobro de prueba"
transaction_id
string <= 255 characters

Transaction's identifier. Ex: invoice or purchase order number.

Example: "zwo3wqz6uulcvajt"
custom
string <= 1073741824 characters

Parameter to send personalized transaction information. Ex: XML document with the shopping cart details.

Example: "<xml>...</xml>"
body
string <= 5120 characters

Description of the charge.

Example: "Cobro de orden de compra #123-abcdef"
bank_id
string <= 5 characters

Bank identifier to use in the payment.

Example: "SDdGj"
return_url
string <= 1024 characters

The URL to send the customer to while the payment is being verified.

Example: "https://micomercio.com/order/return_url"
cancel_url
string <= 1024 characters

The URL to send the customer to if they decide not to make the transaction.

Example: "https://micomercio.com/order/cancel_url"
picture_url
string <= 1024 characters

A URL of a photo of your product or service.

Example: "https://micomercio.com/picture_url"
notify_url
string <= 1024 characters

The address of the web-service that khipu will use to notify when the payment is reconciled.

Example: "https://micomercio.com/webhook/notify_url"
contract_url
string <= 1024 characters

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.

Example: "https://micomercio.com/contract_url"
notify_api_version
string <= 255 characters

Version of the notifications API to receive notifications by web-service.

Example: "3.0"
expires_date
string <date-time>

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.

Example: "2023-12-31T15:45:00-04:00"
send_email
boolean

If true, a collection request will be sent to the email specified in payer_email.

Example: false
payer_name
string <= 255 characters

Payer's name. It is required when send_email is true.

Example: "Nombre Pagador"
payer_email
string <email> <= 255 characters

Payer's email. Required when send_email is true.

Example: "pagador@email.com"
send_reminders
boolean

If true, collection reminders will be sent.

Example: true
responsible_user_email
string <email> <= 255 characters

Email of the person responsible for this collection, must correspond to a khipu user with permissions to collect using this collection account.

Example: "responsible@email.com"
fixed_payer_personal_identifier
string <= 255 characters

Personal identifier. If specified, payment can only be made using that identifier.

Example: "11.000.111-9"
integrator_fee
string <= 16 characters

Fee for the integrator. It is only valid if the collection account has an associated integrator account.

Example: "100"
collect_account_uuid
string <= 255 characters

For collection accounts with more own account. Allows you to choose the account where the transfer should occur.

Example: "007367340234"
confirm_timeout_date
string <date-time>

Collection submission date. It is also the final date to be able to refund the charge. ISO-8601 format.

Example: "2017-03-01T13:00:00Z"
mandatory_payment_method
string <= 255 characters

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.

Example: "simplified_transfer"
psp_client_merchant_name
string [ 3 .. 255 ] characters

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 '->'

Example: "PSP 1->PSP 2->Client Name"
Responses
200

Successful operation. Returns a JSON object with the information of the payment created.

Response Schema: application/json
payment_id
required
string

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).

Example: "gqzdy6chjne9"
payment_url
required
string

Main payment URL, if the user has not previously chosen a payment method, the options are shown.

Example: "https://khipu.com/payment/info/gqzdy6chjne9"
simplified_transfer_url
required
string

Simplified payment URL.

Example: "https://app.khipu.com/payment/simplified/gqzdy6chjne9"
transfer_url
required
string

Normal payment URL.

Example: "https://khipu.com/payment/manual/gqzdy6chjne9"
app_url
required
string

URL to invoke payment from a mobile device using the Khipu APP.

Example: "khipu:///pos/gqzdy6chjne9"
ready_for_terminal
required
boolean

It is true if the payment already has all the necessary data to directly open the Khipu payment application.

Example: false
400

Bad request

401

Unauthorized - Invalid or missing credentials

403

Forbidden

404

Not found - Resource not available

500

Internal server error

post/v3/payments
Request samples
application/json
{
  • "amount": 1000,
  • "currency": "CLP",
  • "subject": "Cobro de prueba"
}
Response samples
application/json
{}