Submit Checkout
Submits an order built from a previously resolved purchase offer. Returns 202 Accepted with a trackingNumber and follow-up polling instructions.
URL
POST /api/c2a/offer/checkout
Request Parameters
Body: CheckoutRequest.
| Name | Type | Description |
|---|---|---|
order (alias ORD) | object (OrderCart) | Required. The cart, bound to a resolved offerIdentifier. |
paymentMethod (alias PMT) | object (PaymentMethodDto) | Required. Payment instrument or stored-method reference. |
OrderCart
| Name | Type | Description |
|---|---|---|
offerIdentifier (alias OID) | string | Required. Must come from a fresh POST /c2a/offer/bundles response and be non-expired. |
correlationId (alias CLD) | string | Caller-side correlation id (your order id) for log joining. Used for idempotency. |
installmentIdentifier | string | Optional installment selection. |
resellerID | integer | Reseller / partner attribution. |
items (alias ITM) | array (CheckoutOrderItem[]) | Required. Bundles + add-ons to buy. |
customer (alias CUST) | object (CustomerInfo) | Required. At minimum customerUrn; optionally ipAddress for risk scoring. |
CheckoutOrderItem
| Name | Type | Description |
|---|---|---|
itemIdentifier (alias ITM) | string | Required. The itemIdentifier from the offer's artifactGroups. |
parentItemIdentifier (alias PURN) | string | Conditional. For add-ons: parent bundle line. |
quantity (alias QTY) | integer | Default 1. |
PaymentMethodDto
| Name | Type | Description |
|---|---|---|
paymentChannel (alias TP) | string (EnPaymentChannel) | Required. CreditCard, PayPal, Klarna, SEPA, Bank. |
providerIdentifier (alias PI) | string | PSP key when the caller wants to force a specific PSP. Auto-resolved when null. |
useStoredMethod (alias UM) | boolean | If true, charge an already-tokenized card. |
creditCard (alias CC) | object (CreditCardDto) | Conditional. Card data (raw or stored-method reference). Required when paymentChannel = CreditCard. |
storeMethodSuccessPayment (alias SM) | string | Tokenize the card on a successful payment. |
CreditCardDto
| Name | Type | Description |
|---|---|---|
cardHolderName (alias CHN) | string | Conditional. Required for fresh-card flow. |
cardNumber (alias CN) | string | Conditional. Raw PAN. Required for fresh-card flow. Never logged. |
expireYear (alias EY) | string | Conditional. 4 digits. Required for fresh-card flow. |
expireMonth (alias EM) | string | Conditional. MM. Required for fresh-card flow. |
cvc (alias CVC) | string | Conditional. Required for fresh-card flow. |
cardAlias (alias CA) | string | Optional user-facing label. |
useStoredMethod (alias USM) | boolean | When true, use storedMethodUrn instead of PAN/CVC. |
storedMethodUrn (alias SMU) | string | Conditional. URN from /c2a/customer/payment/methods/list. Required when useStoredMethod = true. |
storedMethodToken (alias SMT) | string | PSP token (server-side use). |
Request Example — fresh card
{
"order": {
"offerIdentifier": "of_8z2k1q",
"correlationId": "shop-2026-0001",
"items": [ { "itemIdentifier": "it_ab1", "quantity": 1 } ],
"customer": { "customerUrn": "cu.00.482", "ipAddress": "84.118.92.180" }
},
"paymentMethod": {
"paymentChannel": "CreditCard",
"creditCard": {
"cardHolderName": "Jane Doe",
"cardNumber": "4111111111111111",
"expireMonth": "12",
"expireYear": "2029",
"cvc": "123"
},
"storeMethodSuccessPayment": "always"
}
}
Request Example — stored card
{
"order": {
"offerIdentifier": "of_8z2k1q",
"items": [ { "itemIdentifier": "it_ab1" } ],
"customer": { "customerUrn": "cu.00.482" }
},
"paymentMethod": {
"paymentChannel": "CreditCard",
"useStoredMethod": true,
"creditCard": {
"useStoredMethod": true,
"storedMethodUrn": "pm.00.482.7"
}
}
}
Response Parameters
CheckoutResult (HTTP 202 on accept).
| Name | Type | Description |
|---|---|---|
trackingNumber | string | Required for status polling. |
status | object (AzotteStatus) | Usually CHECK_OUT_PROCESSING at this stage. |
followUpInstructions | object (RetryInstruction) | Polling guidance. |
followUpInstructions.retryAfterSeconds | integer | Wait at least this long before next poll. Default 2. |
followUpInstructions.remainingRetryCount | integer | Suggested max retries left. |
followUpInstructions.currentRetryAttempt | integer | Echoes back across polls. |
followUpInstructions.followUpUrl | string | Absolute URL to the status endpoint. |
followUpInstructions.canFollowUp | boolean | false when order already terminal. |
redirectInstructions | object (RedirectInstructions) | Populated only if PSP needs 3DS / hosted page. |
message | string | Optional caller-facing message. |
Response Headers
| Header | Description |
|---|---|
Location | Status endpoint URL. |
Link | <{statusUrl}>; rel="status". |
Retry-After | Mirrors retryAfterSeconds. |
Sample Response
{
"trackingNumber": "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB",
"status": { "messageCode": "CHECK_OUT_PROCESSING" },
"followUpInstructions": {
"retryAfterSeconds": 2,
"remainingRetryCount": 30,
"currentRetryAttempt": 0,
"followUpUrl": "https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB/status",
"canFollowUp": true
}
}
Conflict at admission (HTTP 409)
Order rejected (expired offer, idempotency clash, invalid stored-method URN). Body is a CheckoutResult with a non-success status.
{
"trackingNumber": null,
"status": { "messageCode": "OFFER_EXPIRED" },
"followUpInstructions": { "canFollowUp": false }
}
Sample Codes
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
curl --location 'https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout' \
--header 'Content-Type: application/json' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789' \
--data '{
"order": {
"offerIdentifier": "of_8z2k1q",
"correlationId": "shop-2026-0001",
"items": [ { "itemIdentifier": "it_ab1", "quantity": 1 } ],
"customer": { "customerUrn": "cu.00.482" }
},
"paymentMethod": {
"paymentChannel": "CreditCard",
"useStoredMethod": true,
"creditCard": { "useStoredMethod": true, "storedMethodUrn": "pm.00.482.7" }
}
}'
const payload = {
order: {
offerIdentifier: 'of_8z2k1q',
correlationId: 'shop-2026-0001',
items: [{ itemIdentifier: 'it_ab1', quantity: 1 }],
customer: { customerUrn: 'cu.00.482' }
},
paymentMethod: {
paymentChannel: 'CreditCard',
useStoredMethod: true,
creditCard: { useStoredMethod: true, storedMethodUrn: 'pm.00.482.7' }
}
};
const res = await fetch('https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
},
body: JSON.stringify(payload)
});
console.log(res.status, await res.json());
import { request } from 'undici';
const payload = {
order: {
offerIdentifier: 'of_8z2k1q',
correlationId: 'shop-2026-0001',
items: [{ itemIdentifier: 'it_ab1', quantity: 1 }],
customer: { customerUrn: 'cu.00.482' }
},
paymentMethod: {
paymentChannel: 'CreditCard',
useStoredMethod: true,
creditCard: { useStoredMethod: true, storedMethodUrn: 'pm.00.482.7' }
}
};
const { statusCode, body } = await request(
'https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
},
body: JSON.stringify(payload)
}
);
console.log(statusCode, await body.json());
import requests
payload = {
"order": {
"offerIdentifier": "of_8z2k1q",
"correlationId": "shop-2026-0001",
"items": [{"itemIdentifier": "it_ab1", "quantity": 1}],
"customer": {"customerUrn": "cu.00.482"},
},
"paymentMethod": {
"paymentChannel": "CreditCard",
"useStoredMethod": True,
"creditCard": {"useStoredMethod": True, "storedMethodUrn": "pm.00.482.7"},
},
}
res = requests.post(
"https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout",
headers={
"Content-Type": "application/json",
"x-tn": "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f",
"x-api-key": "sk_dev_acme_sample_123456789",
},
json=payload,
)
print(res.status_code, res.json())
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String json = """
{
"order": {
"offerIdentifier": "of_8z2k1q",
"correlationId": "shop-2026-0001",
"items": [{"itemIdentifier":"it_ab1","quantity":1}],
"customer": {"customerUrn":"cu.00.482"}
},
"paymentMethod": {
"paymentChannel": "CreditCard",
"useStoredMethod": true,
"creditCard": {"useStoredMethod": true, "storedMethodUrn": "pm.00.482.7"}
}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout"))
.header("Content-Type", "application/json")
.header("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
.header("x-api-key", "sk_dev_acme_sample_123456789")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());
using System.Net.Http.Json;
var payload = new {
order = new {
offerIdentifier = "of_8z2k1q",
correlationId = "shop-2026-0001",
items = new[] { new { itemIdentifier = "it_ab1", quantity = 1 } },
customer = new { customerUrn = "cu.00.482" }
},
paymentMethod = new {
paymentChannel = "CreditCard",
useStoredMethod = true,
creditCard = new { useStoredMethod = true, storedMethodUrn = "pm.00.482.7" }
}
};
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f");
http.DefaultRequestHeaders.Add("x-api-key", "sk_dev_acme_sample_123456789");
var res = await http.PostAsJsonAsync(
"https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout",
payload);
Console.WriteLine($"{(int)res.StatusCode} {await res.Content.ReadAsStringAsync()}");
<?php
$payload = [
'order' => [
'offerIdentifier' => 'of_8z2k1q',
'correlationId' => 'shop-2026-0001',
'items' => [['itemIdentifier' => 'it_ab1', 'quantity' => 1]],
'customer' => ['customerUrn' => 'cu.00.482'],
],
'paymentMethod' => [
'paymentChannel' => 'CreditCard',
'useStoredMethod' => true,
'creditCard' => [
'useStoredMethod' => true,
'storedMethodUrn' => 'pm.00.482.7',
],
],
];
$ch = curl_init('https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key: sk_dev_acme_sample_123456789',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
echo curl_exec($ch);
curl_close($ch);
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]any{
"order": map[string]any{
"offerIdentifier": "of_8z2k1q",
"correlationId": "shop-2026-0001",
"items": []map[string]any{{"itemIdentifier": "it_ab1", "quantity": 1}},
"customer": map[string]string{"customerUrn": "cu.00.482"},
},
"paymentMethod": map[string]any{
"paymentChannel": "CreditCard",
"useStoredMethod": true,
"creditCard": map[string]any{
"useStoredMethod": true,
"storedMethodUrn": "pm.00.482.7",
},
},
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST",
"https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout",
bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
req.Header.Set("x-api-key", "sk_dev_acme_sample_123456789")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}