v1
latestOpenAPI 3.1.02026-07-245178279.0 KBOrden
Create Order
Generate a tokenized order in DEUNA, which should be used for the rest of the requests and to initialize the checkout
post/merchants/orders
Headers
X-API-KEYstring required
<a href="https://docs.deuna.com/reference/checkout-deuna#autenticaci%C3%B3n" target="_blank">Llave privada</a> del comercio
X-Idempotency-Keystring uuid
Example:550e8400-e29b-41d4-a716-446655440000
Opcional. UUID v4 que permite reintentar la misma solicitud de forma segura sin duplicar la operación: si se reenvía con la misma clave, se devuelve la respuesta original junto con el header de respuesta X-Idempotency-Replay: true. Si no se envía el header, el endpoint funciona con el comportamiento por defecto (sin idempotencia). Más detalles en <a href="https://docs.deuna.com/reference/idempotent-requests" target="_blank">Idempotent Requests</a>.
Request body
Example request
{
"order": {
"airline_information": {
"booking_items": [
{
"airline_3_digit_code": "012",
"airline_iata_designator": "AB",
"ancillaries": [
{
"description": "Premium meal",
"service_category": "C",
"ticket_number": "0011234567891",
"total_amount": 1000,
"type": "Meal"
}
],
"legs": [
{
"airport_tax_amount": 530,
"carrier_code": "AA",
"carrier_name": "American Airlines",
"destination": {
"date": "2022-03-14",
"iata_code": "JFK",
"time": "09:00"
},
"fare_basis_code": "Y",
"flight_number": "123",
"origin": {
"date": "2022-03-14",
"iata_code": "JFK",
"time": "09:00"
},
"seat_location": "12A",
"service_class": "J",
"stopover_code": "X",
"sub_total_amount": 4470,
"tax_amount": 530,
"total_amount": 5000
}
],
"passenger": {
"country_code": "MX",
"date_of_birth": "1990-01-01",
"document_number": "1234567890",
"document_type": "ID",
"email": "john.d@email.com",
"first_name": "John",
"frequent_flyer_code": "1234567890",
"last_name": "Smith",
"middle_name": "Doe",
"phone": "+1234567890",
"title": "Mr.",
"user_id": "123456"
},
"pnr": "ABC123",
"reservation_system_code": "1S",
"ticket_number": "012345678912345",
"ticketing_travel_agency": {
"agency_invoice_number": "123456",
"iata_code": "12345678",
"name": "Agencia de Viajes"
}
}
]
},
"billing_address": {
"additional_description": "No tocar timbre",
"address_type": "home",
"address1": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"address2": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"city": "Quito",
"country": "ECU",
"created_at": "2022-06-03T22:09:09.086990957Z",
"email": "foo@",
"first_name": "Jhon",
"id": 1896,
"identity_document": "1234567891",
"identity_document_type": "DNI",
"last_name": "Doe",
"lat": -0.100032,
"lng": -78.46956,
"phone": "+5999999999",
"state_code": "ECU",
"state_name": "Quito",
"updated_at": "2022-06-03T22:09:09.086990957Z",
"user_id": "ebd6105c-b2ae-11eb-8529-0242ac130003",
"zipcode": "170515"
},
"currency": "USD",
"discounts": [
{
"amount": 754,
"code": "CuponTest",
"description": "Take 15% off of your order.",
"details_url": "https://your-ecommerce.com/discounts/#12345",
"discount_category": "Cupon",
"free_shipping": {
"maximum_cost_allowed": 100
},
"reference": "CuponTest",
"target_type": "shipping",
"type": "free_shipping"
}
],
"expired_at": "2022-03-14T19:18:31Z",
"expires_at": "2022-03-14T19:18:31Z",
"include_payment_options": [
{
"payment_method": "credit_card",
"processors": [
"ADDI",
"ADYEN"
]
}
],
"initiator_type": "customer",
"items": [
{
"brand": "DEUNA",
"category": "Limpieza",
"color": "Naranja",
"description": "La mejor hamburguesa con queso",
"details_url": "https://your-ecommerce.com/inventory/hamburguesa/ensalada.png",
"discounts": [
{
"amount": 2000,
"ref_idx": 1
}
],
"id": "H10001",
"image_url": "https://your-ecommerce.com/inventory/hamburguesa/hamburguesa-queso.png",
"isbn": "978-3-16-148410-0",
"item_details": [
{
"label": "Peso del producto",
"priority": 1,
"value": "200gr"
}
],
"manufacturer": "DEUNA",
"name": "Hamburguesa con queso",
"quantity": 1,
"size": "XXL",
"sku": "s123456",
"tax_amount": {
"amount": 10,
"currency": "USD",
"currency_symbol": "$"
},
"total_amount": {
"amount": 299,
"currency": "USD",
"currency_symbol": "$",
"original_amount": 299,
"total_discount": 100
},
"unit_price": {
"amount": 299,
"currency": "USD",
"currency_symbol": "$"
},
"uom": "kg",
"upc": "123456",
"weight": {
"unit": "kg",
"weight": 22
}
}
],
"items_total_amount": 5000,
"market_type": "ecommerce",
"metadata": {
"device_id": "A1B2C3",
"key1": "value1",
"key2": "value1",
"kushki": {
"merchant_id": "test-merchant",
"terminal_id": "virtual-pos-1"
},
"order_id": "456",
"store_id": "miami-01"
},
"order_id": "Test-12345",
"payer_info": {
"date_of_birth": "2025-03-24T17:29:58Z",
"email": "jhon.snow@deuna.com",
"external_registration_date": "2025-03-24T17:29:58Z"
},
"recurrence": {
"first_time_use": true
},
"redirect_url": "http://example.com",
"shipping": {
"discounts": [
{
"amount": 2000,
"ref_idx": 1
}
]
},
"shipping_address": {
"additional_description": "No tocar timbre",
"address_type": "home",
"address1": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"address2": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"city": "Quito",
"country": "ECU",
"created_at": "2022-06-03T22:09:09.086990957Z",
"identity_document": "1234567891",
"identity_document_type": "DNI",
"lat": -0.100032,
"lng": -78.46956,
"phone": "+5999999999",
"state_name": "Quito",
"updated_at": "2022-06-03T22:09:09.086990957Z",
"zipcode": "170515"
},
"shipping_amount": 500,
"shipping_method": {
"scheduler": [
{
"date": "2022-03-14",
"end_time": "20:00",
"start_time": "09:00",
"steps_minutes": 15
}
]
},
"shipping_options": {
"details": {
"additional_details": {
"address_notes": "Piso 14",
"pickup_time": "2022-06-03T22:09:09.086990957Z",
"stock_location": "DEUNA"
},
"address": "6 Rotermanni 11343 Talinn",
"address_coordinates": {
"lat": 4.721245,
"lng": -74.04673
},
"contact": {
"name": "Jhon Doe",
"phone": "5999999999"
},
"store_name": "all"
},
"type": "delivery"
},
"statement_descriptor": "MI NEGOCIO",
"store_code": "all",
"sub_total": 4470,
"timezone": "America/Mexico_City",
"total_amount": 5000,
"total_discount": 100,
"total_tax_amount": 530,
"user_instructions": "Sin pepinillos.",
"webhook_urls": {
"apply_coupon": "https://{url_comercio}/api/v1/orders/{order_token}/coupons",
"get_shipping_methods": " https://{url_comercio}/merchants/external-orders/{order_token}/shipping-methods",
"notify_order": "https://{url_comercio}/api/v1/orders/notify",
"remove_coupon": "https://{url_comercio}/api/v1/orders/{order_token}/coupons/{coupon_code}",
"shipping_rate": "https://{url_comercio}/api/v1/orders/{order_token}/shipping",
"update_shipping_method": "https://{url_comercio}/merchants/external-orders/{order_token}/shipping-methods/{code}"
}
}
}Response
Respuesta de una orden tokenizada en el Checkout API.
Example response
{
"captures": [
{
"capture_id": "1234567890",
"captured_amount": 1000,
"captured_on": "2022-06-03T22:09:09.086990957Z",
"external_transaction_id": "1234567890",
"status": "captured"
}
],
"order": {
"airline_information": {
"booking_items": [
{
"airline_3_digit_code": "012",
"airline_iata_designator": "AB",
"ancillaries": [
{
"description": "Premium meal",
"service_category": "C",
"ticket_number": "0011234567891",
"total_amount": 1000,
"type": "Meal"
}
],
"legs": [
{
"airport_tax_amount": 530,
"carrier_code": "AA",
"carrier_name": "American Airlines",
"destination": {
"date": "2022-03-14",
"iata_code": "JFK",
"time": "09:00"
},
"fare_basis_code": "Y",
"flight_number": "123",
"origin": {
"date": "2022-03-14",
"iata_code": "JFK",
"time": "09:00"
},
"seat_location": "12A",
"service_class": "J",
"stopover_code": "X",
"sub_total_amount": 4470,
"tax_amount": 530,
"total_amount": 5000
}
],
"passenger": {
"country_code": "MX",
"date_of_birth": "1990-01-01",
"document_number": "1234567890",
"document_type": "ID",
"email": "john.d@email.com",
"first_name": "John",
"frequent_flyer_code": "1234567890",
"last_name": "Smith",
"middle_name": "Doe",
"phone": "+1234567890",
"title": "Mr.",
"user_id": "123456"
},
"pnr": "ABC123",
"reservation_system_code": "1S",
"ticket_number": "012345678912345",
"ticketing_travel_agency": {
"agency_invoice_number": "123456",
"iata_code": "12345678",
"name": "Agencia de Viajes"
}
}
]
},
"billing_address": {
"additional_description": "No tocar timbre",
"address_type": "home",
"address1": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"address2": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"city": "Quito",
"country": "ECU",
"created_at": "2022-06-03T22:09:09.086990957Z",
"email": "foo@",
"first_name": "Jhon",
"id": 1896,
"identity_document": "1234567891",
"identity_document_type": "DNI",
"last_name": "Doe",
"lat": -0.100032,
"lng": -78.46956,
"phone": "+5999999999",
"state_code": "ECU",
"state_name": "Quito",
"updated_at": "2022-06-03T22:09:09.086990957Z",
"user_id": "ebd6105c-b2ae-11eb-8529-0242ac130003",
"zipcode": "170515"
},
"currency": "USD",
"discounts": [
{
"amount": 754,
"code": "CuponTest",
"description": "Take 15% off of your order.",
"details_url": "https://your-ecommerce.com/discounts/#12345",
"discount_category": "Cupon",
"free_shipping": {
"maximum_cost_allowed": 100
},
"reference": "CuponTest",
"target_type": "shipping",
"type": "free_shipping"
}
],
"expired_at": "2022-03-14T19:18:31Z",
"expires_at": "2022-03-14T19:18:31Z",
"fraud": {
"analysis": {
"details": "ACCEPTED",
"fraud_decision": "low_risk",
"processor": "processor_name",
"processor_response": "ACCEPTED",
"risk_level": "low",
"score": 75,
"status": "automatic_decision",
"type": "POST-AUTH"
},
"status": "accepted"
},
"fraud_shadowmode": [
{
"analysis": {
"details": "ACCEPTED",
"fraud_decision": "low_risk",
"processor": "processor_name",
"processor_response": "ACCEPTED",
"risk_level": "low",
"score": 75,
"status": "automatic_decision",
"type": "POST-AUTH"
},
"status": "accepted"
}
],
"initiator_type": "customer",
"items": [
{
"brand": "DEUNA",
"category": "Limpieza",
"color": "Naranja",
"description": "La mejor hamburguesa con queso",
"details_url": "https://your-ecommerce.com/inventory/hamburguesa/ensalada.png",
"discounts": [
{
"amount": 2000,
"ref_idx": 1
}
],
"id": "H10001",
"image_url": "https://your-ecommerce.com/inventory/hamburguesa/hamburguesa-queso.png",
"isbn": "978-3-16-148410-0",
"item_details": [
{
"label": "Peso del producto",
"priority": 1,
"value": "200gr"
}
],
"manufacturer": "DEUNA",
"name": "Hamburguesa con queso",
"quantity": 1,
"size": "XXL",
"sku": "s123456",
"tax_amount": {
"amount": 10,
"currency": "USD",
"currency_symbol": "$"
},
"total_amount": {
"amount": 299,
"currency": "USD",
"currency_symbol": "$",
"original_amount": 299,
"total_discount": 100
},
"unit_price": {
"amount": 299,
"currency": "USD",
"currency_symbol": "$"
},
"uom": "kg",
"upc": "123456",
"weight": {
"unit": "kg",
"weight": 22
}
}
],
"items_total_amount": 5000,
"metadata": {
"device_id": "A1B2C3",
"key1": "value1",
"key2": "value1",
"kushki": {
"merchant_id": "test-merchant",
"terminal_id": "virtual-pos-1"
},
"order_id": "456",
"store_id": "miami-01"
},
"payment": {
"data": {
"amount": {
"amount": 2990,
"currency": "USD"
},
"authorization_code": "123456",
"capture_cutoff_at": "2026-06-03T22:09:09.086990957Z",
"customer": {
"email": "jhondoe@mail.com",
"id": "145662365566466"
},
"data_sync": {
"iso8583_processing_code": "000000",
"iso8583_response_code": "00",
"iso8583_response_code_description": "Transacción aprobada",
"switch_name": "Prosa"
},
"external_transaction_id": "123456",
"from_card": {
"card_brand": "Visa",
"expiry_month": "11",
"expiry_year": "2039",
"first_six": "451152",
"holder_name": "Jhon Snow",
"installments": {
"installment_amount": 5999,
"installment_rate": 0.12,
"installment_type": "MSI",
"installments": 3,
"plan_id": "7471ed27-094d-44c4-a62d-225644b782f7",
"plan_option_id": "87309ea8-3942-4fdf-95ec-ce29a792aff2"
},
"last_four": "4558"
},
"installments": {
"installment_amount": 5999,
"installment_rate": 0.12,
"installment_type": "MSI",
"installments": 3,
"plan_id": "7471ed27-094d-44c4-a62d-225644b782f7",
"plan_option_id": "87309ea8-3942-4fdf-95ec-ce29a792aff2"
},
"merchant": {
"affiliation_code": "APP_12345",
"id": "96",
"mcc": "5411",
"store_code": "all"
},
"merchant_payment_processor_id": "500bf377-799c-4e1d-8895-e69202b82f89",
"merchant_payment_processor_name": "processor_name",
"nsu": "123456",
"status": "processing",
"tid": "123456"
}
},
"payment_link": "https://buy.deuna.com/checkout/order_{order_token}",
"recurrence": {
"first_time_use": true
},
"shipping_address": {
"additional_description": "No tocar timbre",
"address_type": "home",
"address1": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"address2": "Av. Eloy Alfaro 14, Quito 170515, Ecuador",
"city": "Quito",
"country": "ECU",
"created_at": "2022-06-03T22:09:09.086990957Z",
"identity_document": "1234567891",
"identity_document_type": "DNI",
"lat": -0.100032,
"lng": -78.46956,
"phone": "+5999999999",
"state_name": "Quito",
"updated_at": "2022-06-03T22:09:09.086990957Z",
"zipcode": "170515"
},
"shipping_amount": 500,
"shipping_method": {
"scheduler": [
{
"date": "2022-03-14",
"end_time": "20:00",
"start_time": "09:00",
"steps_minutes": 15
}
]
},
"shipping_options": {
"details": {
"additional_details": {
"address_notes": "Piso 14",
"pickup_time": "2022-06-03T22:09:09.086990957Z",
"stock_location": "DEUNA"
},
"address": "6 Rotermanni 11343 Talinn",
"address_coordinates": {
"lat": 4.721245,
"lng": -74.04673
},
"contact": {
"name": "Jhon Doe",
"phone": "5999999999"
},
"store_name": "all"
},
"type": "delivery"
},
"status": "pending",
"sub_total": 4470,
"total_amount": 5000,
"user_instructions": "Sin pepinillos."
},
"refunds": [
{
"external_transaction_id": "1234567890",
"refund_amount": 1000,
"refund_id": "1234567890",
"refunded_on": "2022-06-03T22:09:09.086990957Z",
"status": "refunded"
}
]
}