Creating Orders
Once you have discovered the available gateways via Gateway Discovery, you can create an order to initiate a payment.Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Payment amount in the smallest currency unit (COP has no decimals). |
description | string | Yes | Description shown to the buyer during payment. |
currency | string | Yes | Currency code. Currently COP for Colombian gateways. |
shopper.first_name | string | Yes | Buyer’s first name. |
shopper.last_name | string | Yes | Buyer’s last name. |
shopper.email | string | Yes | Buyer’s email address. |
shopper.phone_number | string | Yes | Buyer’s phone number. Used as the payment identifier for Nequi. |
shopper.country | string | Yes | ISO country code, e.g. CO. |
shopper.id_number | string | Yes | Buyer’s national ID number (cedula). |
shopper.id_type | integer | Yes | Document type ID from Document Types endpoint. e.g. 1 for CC. |
payment_gateway.id_payment_gateway | number | Yes | Gateway ID from Gateway Discovery. |
order_key | string | No | Your unique reference for this order (idempotency key). |
redirect_link | string | No | URL to redirect buyer after successful payment. |
redirect_link_cancel | string | No | URL to redirect buyer if payment is cancelled. |
redirect_link_failure | string | No | URL to redirect buyer if payment fails. |
The API also accepts
national_id_number and id_national_document_type as aliases for id_number and id_type respectively. Both formats are interchangeable.Examples
The
id_payment_gateway value in these examples is a placeholder. Always retrieve the correct ID for each gateway from the Gateway Discovery endpoint (GET /v1/orders/paymentGateways) — do not hardcode it.- Nequi
- Daviplata
- Breb
Nequi uses the buyer’s Response:
phone_number to send a push notification. National ID fields are still required for compliance.Document types
ThePOST /orders response includes an allowed_documents array with the valid document types for the store’s country. Use this field instead of calling GET /v1/national-document-types/{countryCode} separately.
id_type field requires the integer ID (id_national_document_type) from this list. The legacy endpoint GET /v1/national-document-types/{countryCode} still works but is deprecated.
For Colombia, the most common types are:
| ID | Code | Description | Accepted by |
|---|---|---|---|
| 1 | CC | Cédula de Ciudadanía | All gateways |
| 2 | CE | Cédula de Extranjería | All gateways |
| 3 | TI | Tarjeta de Identidad | All gateways |
What happens next
After creating the order, the payment flow depends on the selected gateway:Nequi
Buyer receives a push notification and approves in the Nequi app.
Daviplata
Buyer receives an OTP via SMS and submits it to confirm.
Breb
Buyer completes a transfer using a QR code or transfer key.
Stripe
Buyer is redirected to complete the card payment.