Get Checkout Status
Poll the status of a previously submitted checkout. Returns the latest CheckoutResult.
URL
GET /api/c2a/offer/checkout/{trackingId}/status
Request Parameters
| Name | Type | Description |
|---|---|---|
trackingId | string | Path parameter, required. The trackingNumber from the original Submit Checkout response. |
Response Parameters
CheckoutResult (HTTP 200). Same shape as the submit response. The status.messageCode is the source of truth.
messageCode | Stage | Action |
|---|---|---|
CHECK_OUT_PROCESSING | Worker still processing. | Keep polling, respect Retry-After. |
CHECK_OUT_3DS_REQUIRED | PSP requires 3DS challenge. | Present redirectInstructions.htmlContent or .redirectUrl to the end-user. |
CHECK_OUT_DONE | Payment captured, entitlements delivered. | Terminal success. |
CHECK_OUT_FAILED | Authorization, capture, or fulfilment failed. | Terminal failure. Inspect message. |
RedirectInstructions
Returned when status = CHECK_OUT_3DS_REQUIRED or any redirect-bound state.
| Name | Type | Description |
|---|---|---|
redirectUrl | string | Hosted page to navigate the user to. |
htmlContent | string | Inline HTML form to post (3DS step-up). |
threeDIdentifier | string | PSP-side 3DS reference. |
isRedirectRequired | boolean | Whether the client must act. |
hasNextSteps | boolean | More steps after this redirect (resume polling after the browser returns). |
showHtmlContent | boolean | Render htmlContent instead of a redirect. |
Sample Response — terminal success
{
"trackingNumber": "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB",
"status": { "messageCode": "CHECK_OUT_DONE" },
"followUpInstructions": { "canFollowUp": false }
}
3DS required
{
"trackingNumber": "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB",
"status": { "messageCode": "CHECK_OUT_3DS_REQUIRED" },
"redirectInstructions": {
"redirectUrl": "https://psp.example/3ds/abc",
"isRedirectRequired": true,
"hasNextSteps": true,
"showHtmlContent": false
},
"followUpInstructions": { "retryAfterSeconds": 3, "canFollowUp": true }
}
Not Found (HTTP 404)
trackingId unknown for this tenant.
{
"status": { "messageCode": "ORDERED_ITEM_NOT_FOUND" }
}
Conflict (HTTP 409)
State conflict (e.g. tracking belongs to another tenant). Body is ProblemDetails.
Polling Pattern
1. POST /checkout -> 202, trackingNumber, Retry-After: 2
2. wait `retryAfterSeconds`
3. GET /checkout/{trackingId}/status -> 200, status = CHECK_OUT_PROCESSING
4. repeat until status ∈ { CHECK_OUT_DONE, CHECK_OUT_FAILED, CHECK_OUT_3DS_REQUIRED }
5. if 3DS: drive the user through redirectInstructions, then resume polling
Sample Codes
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
curl --location \
'https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB/status' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789'
const trackingId = 'trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB';
const res = await fetch(
`https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/${trackingId}/status`,
{
headers: {
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
}
}
);
console.log(await res.json());
import { request } from 'undici';
const trackingId = 'trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB';
const { body } = await request(
`https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/${trackingId}/status`,
{
headers: {
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
}
}
);
console.log(await body.json());
import requests
tracking_id = "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB"
res = requests.get(
f"https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/{tracking_id}/status",
headers={
"x-tn": "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f",
"x-api-key": "sk_dev_acme_sample_123456789",
},
)
print(res.json())
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String trackingId = "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB";
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/"
+ trackingId + "/status"))
.header("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
.header("x-api-key", "sk_dev_acme_sample_123456789")
.GET()
.build();
HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
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");
string trackingId = "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB";
var res = await http.GetAsync(
$"https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/{trackingId}/status");
Console.WriteLine(await res.Content.ReadAsStringAsync());
<?php
$trackingId = 'trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB';
$ch = curl_init("https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/{$trackingId}/status");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key: sk_dev_acme_sample_123456789',
],
]);
echo curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
trackingId := "trk_01HZ9XPZ3K2A8E0VBVQH7N9XGB"
url := "https://acme.sandbox.azotte.com/api/v1/c2a/offer/checkout/" + trackingId + "/status"
req, _ := http.NewRequest("GET", url, nil)
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(string(out))
}