Create payment
Create and pay for an inline order with Purchase V2, or process an existing order token when your integration creates the order first.
Use this merchant-backend operation to create and pay for an inline order in one request. You can also provide the token of an order that already exists. DEUNA applies the payment connections, routing, risk, and capture behavior configured for the merchant.
Headers#
5YOUR_PRIVATE_API_KEYBearer USER_ACCESS_TOKENmain9f510c4a-0f7d-4c31-94c5-590b85e4d231application/json.Path parameters#
0Request body#
10Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
2022-06-03T22:09:09.086990957Zjhondoe@mail.com5411+59999999992022-06-03T22:09:09.086990957ZShow child attributes
Show child attributes
Show child attributes
012ABShow child attributes
Premium mealC00112345678911000MealShow child attributes
530AAAmerican AirlinesShow child attributes
2022-03-14JFK09:00Y123Show child attributes
2022-03-14JFK09:0012AJXXO44705305000Show child attributes
MX1990-01-011234567890IDjohn.d@email.comJohn1234567890SmithDoe+1234567890Mr.ADTADTCNNINFINSCHDSRCYTHMILSEASTUJCBLABZZZ123456ABC1231S012345678912345Show child attributes
12345612345678Agencia de ViajesShow child attributes
No tocar timbrehomehomeofficeotherAv. Eloy Alfaro 14, Quito 170515, EcuadorAv. Eloy Alfaro 14, Quito 170515, EcuadorQuitoECUECUBRAPERCOLCHLMEXARG2022-06-03T22:09:09.086990957Zfoo@Jhon18961234567891DNIfalseDoe-0.100032-78.46956+5999999999ECUQuito2022-06-03T22:09:09.086990957Zebd6105c-b2ae-11eb-8529-0242ac130003170515Show child attributes
Show child attributes
desktop_webdesktop_webmobile_webmobile_app_iosmobile_app_androidin_storephoneUSDUSDMXNCOPCLPBRLARSPENShow child attributes
754CuponTestTake 15% off of your order.https://your-ecommerce.com/discounts/#12345CuponShow child attributes
false100CuponTestshippingshippingitemfree_shippingfree_shippingorder_valueproduct2022-06-03T22:09:09ZShow child attributes
Show child attributes
ACCEPTEDlow_riskhigh_risklow_riskmedium_riskpending_riskmanual_reviewmanual_deniedmanual_approvedprocessor_name500bf377-799c-4e1d-8895-e69202b82f89ACCEPTEDlowlowmediumhigh75automatic_decisionautomatic_decisionmanual_reviewpending_analysisdeniedacceptedPOST-AUTHPOST-AUTHacceptedpendingacceptedrejectedin_reviewShow child attributes
Show child attributes
ACCEPTEDlow_riskhigh_risklow_riskmedium_riskpending_riskmanual_reviewmanual_deniedmanual_approvedprocessor_nameACCEPTEDlowlowmediumhigh75automatic_decisionautomatic_decisionmanual_reviewpending_analysisdeniedacceptedPOST-AUTHPOST-AUTHacceptedpendingacceptedrejectedin_reviewcustomermerchantcustomerShow child attributes
DEUNALimpiezaNaranjaLa mejor hamburguesa con quesohttps://your-ecommerce.com/inventory/hamburguesa/ensalada.pngShow child attributes
20001H10001https://your-ecommerce.com/inventory/hamburguesa/hamburguesa-queso.pngfalse978-3-16-148410-0Show child attributes
Peso del producto1200grDEUNAHamburguesa con queso1Show child attributes
FedExShow child attributes
Show child attributes
Piso 142022-06-03T22:09:09.086990957ZDEUNA6 Rotermanni 11343 TalinnShow child attributes
4.721245-74.04673Show child attributes
Jhon Doe5999999999SeattleMX2024-11-15T18:00:00Z3C, 4C, 5Cjhondoe@mail.commiami-01allShow child attributes
500USDUSDMXNCOPCLPBRLARSPENdeliverydeliverypickupXXLs123456electronicsShow child attributes
10USDUSDMXNCOPCLPBRLARSPEN$$S/.R$falseShow child attributes
299USDUSDMXNCOPCLPBRLARSPEN$$S/.R$299100physicalphysicaldigitaleventserviceShow child attributes
299USDUSDMXNCOPCLPBRLARSPEN$$S/.R$kg123456Show child attributes
kg225000ecommerceecommercemotoShow child attributes
2022-06-03T22:09:09.086990957Zjhondoe@mail.com5411+59999999992022-06-03T22:09:09.086990957Z{"device_id":"A1B2C3","key1":"value1","key2":"value1","kushki":{"merchant_id":"test-merchant","terminal_id":"virtual-pos-1"},"order_id":"456","store_id":"miami-01"}Show child attributes
Show child attributes
Test-12345Show child attributes
2025-03-24T17:29:58Zjhon.snow@deuna.com2025-03-24T17:29:58Zext-user-123NATURAL_PERSONNATURAL_PERSONLEGAL_PERSONShow child attributes
truefalseShow child attributes
Show child attributes
20001Show child attributes
No tocar timbrehomehomeofficeotherAv. Eloy Alfaro 14, Quito 170515, EcuadorAv. Eloy Alfaro 14, Quito 170515, EcuadorQuitoECUECUBRAPERCOLCHLMEXARG2022-06-03T22:09:09.086990957Z1234567891DNIfalse-0.100032-78.46956+5999999999Quito2022-06-03T22:09:09.086990957Z170515Show child attributes
FedExShow child attributes
Show child attributes
Piso 142022-06-03T22:09:09.086990957ZDEUNA6 Rotermanni 11343 TalinnShow child attributes
4.721245-74.04673Show child attributes
Jhon Doe5999999999SeattleMX2024-11-15T18:00:00Z3C, 4C, 5Cjhondoe@mail.commiami-01allShow child attributes
500USDUSDMXNCOPCLPBRLARSPENdeliverydeliverypickupMI NEGOCIOall4470America/Mexico_CityAmerica/Mexico_City5000100530Sin pepinillos.Show child attributes
https://{url_comercio}/api/v1/orders/{order_token}/coupons https://{url_comercio}/merchants/external-orders/{order_token}/shipping-methodshttps://{url_comercio}/api/v1/orders/notifyhttps://{url_comercio}/api/v1/orders/{order_token}/coupons/{coupon_code}https://{url_comercio}/api/v1/orders/{order_token}/shippinghttps://{url_comercio}/merchants/external-orders/{order_token}/shipping-methods/{code}xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxDEUNA_CHECKOUTDEUNA_CHECKOUTDEUNA_NOWPAYMENT_LINKAIRLINE_ORDERShow child attributes
2025-03-24T17:29:58Zjhon.snow@deuna.com2025-03-24T17:29:58Zext-user-123NATURAL_PERSONNATURAL_PERSONLEGAL_PERSONShow child attributes
Show child attributes
Avenida Mariano Acosta & Obispo Alejandro Pasquel Monge, Ibarra, Ecuador123VISA1234567891DNIxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx4111111111111111IbarraEcuadorgoogle_payapple_paygoogle_payclick_to_payShow child attributes
google_payapple_paygoogle_payclick_to_payShow child attributes
{"signature":"MEQCIB...","protocolVersion":"ECv2","signedMessage":"{...}"}Show child attributes
MFkwEw...EB8/Sy...MIAGCSqG...0a4e0d3...mobileDIRECT3112039Show child attributes
87309ea8-3942-4fdf-95ec-ce29a792aff26false+59123456789Show child attributes
AAABCZIhcQAAAABZlyFxAAAAAAA05challenge_requiredchallenge_requiredfrictionlessYYNUAYYNUAcreatedcreatedthree_ds_method_pendingthree_ds_method_completedthree_ds_challenge_pendingauthentication_completedauthentication_failedpsp_ownpsp_owndeunaff979317-f2d8-4c64-9549-5f2525acee97YYNU2MTU2Mzkznjil0Quito12345Show child attributes
87309ea8-3942-4fdf-95ec-ce29a792aff2credit_cardcredit_cardbank_transferreferenceShow child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
oxxo_referenceoxxo_referencebaz_referencesafetypay_expressShow child attributes
trueSend an installment selection#
When the customer selects an option returned by List installment options, preserve both values from that same option:
{
"payment_source": {
"method_type": "credit_card",
"card_info": {
"card_id": "CARD_ID",
"installments": 6,
"installment": {
"plan_option_id": "a4756a5f-7f9b-414d-8712-e3a9da2be337"
}
}
}
}The installment count and option ID must match. The option ID identifies DEUNA's resolved campaign/provider option; the count carries the selected number of installments into payment processing. See Installments for campaign eligibility and the end-to-end flow.
Send a recurring card payment#
Recurring fields belong inside the inline order. The initial cardholder-initiated transaction establishes the recurring credential:
{
"payer_info": {
"email": "buyer@example.com"
},
"payment_source": {
"method_type": "credit_card",
"payment_method": "TOKENIZED_PAYMENT_METHOD"
},
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "subscription-1001-initial",
"store_code": "main",
"currency": "USD",
"sub_total": 1000,
"total_tax_amount": 0,
"total_amount": 1000,
"initiator_type": "customer",
"recurrence": {
"first_time_use": true,
"scheduled": true,
"bill_reference": "subscription-1001"
}
}
}After the first successful charge, retain the returned order.recurrence.recurrence_id. Send that value with the later merchant-initiated charge:
{
"payer_info": {
"email": "buyer@example.com"
},
"payment_source": {
"method_type": "credit_card",
"payment_method": "STORED_PAYMENT_METHOD"
},
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "subscription-1001-002",
"store_code": "main",
"currency": "USD",
"sub_total": 1000,
"total_tax_amount": 0,
"total_amount": 1000,
"initiator_type": "merchant",
"recurrence": {
"first_time_use": false,
"scheduled": true,
"recurrence_id": "RECURRING_CREDENTIAL_ID",
"bill_reference": "subscription-1001"
}
}
}Use the exact field name recurrence_id; it is the public JSON contract used by Purchase V2. A subsequent charge without a valid identifier cannot be matched to the stored recurrence credential for the selected processor.
Choose how to provide the order#
| Option | Request fields | Result |
|---|---|---|
| Inline order · Recommended | Send order_type and order with payer_info and payment_source. | DEUNA creates and processes the order in this Purchase V2 request. No earlier Create Order call is required. |
| Existing order token · Optional | Send order_token with payer_info and payment_source. | DEUNA processes the order that the token identifies. |
Start with a complete industry order#
The order field accepts the same business context modeled by the Orders API. Each industry example opens with the recommended inline Purchase V2 request and also lets you inspect the optional create-order-first request.
Response#
Returns the processed order, including its order_token, order type, resulting status, payment information, and subscription information when applicable. Treat the returned state as authoritative. If it remains unresolved, retrieve the original order after DEUNA processes the asynchronous provider update.
Status codes
Retry-After when returned.Idempotency#
The Gateway applies idempotency to this purchase operation. Send a stable X-Idempotency-Key for the same business attempt and reuse the same key and body after a network timeout. Use a new key for a materially different attempt.
- Generate the key in the merchant backend, not in browser or mobile code.
- Never reuse a key with a different request body.
- Reconcile an uncertain outcome by retrieving the order before starting a new attempt.
See Idempotent requests for the 24-hour retention window, replay behavior, conflicts, and supported operations. Continue with the complete endpoint entry, Authentication, and Error codes.
Was this page helpful?