Create Agentic Checkout Session
curl --request POST \
--url https://omnicommerce.sg/api/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"productId": "00000000-0000-4000-8000-000000000001",
"quantity": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{productId: '00000000-0000-4000-8000-000000000001', quantity: 1}]})
};
fetch('https://omnicommerce.sg/api/v1/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/checkout-sessions"
payload = { "items": [
{
"productId": "00000000-0000-4000-8000-000000000001",
"quantity": 1
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "agentic_checkout_v1",
"session": {
"id": "<string>",
"organizationId": "<string>",
"status": "ready_for_payment",
"paymentRail": "acp_stripe",
"currency": "<string>",
"totalAmount": 123,
"paymentRequirements": {},
"expiresAt": "<string>",
"subtotalAmount": 123,
"shippingAmount": 123,
"taxAmount": 123,
"discountAmount": 123,
"cartVersion": 123,
"buyer": {},
"shippingAddress": {},
"billingAddress": {},
"orderId": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"items": [
{
"id": "<string>",
"productId": "<string>",
"sku": "<string>",
"title": "<string>",
"quantity": 123,
"unitAmount": 123,
"currency": "<string>",
"imageUrl": "<string>",
"productSnapshot": {}
}
]
}Agentic Checkout
Create Agentic Checkout Session
Create a merchant-fulfilled checkout session, reserve inventory, and return rail-specific payment requirements. Requires an OAuth client token with checkout:write.
POST
/
api
/
v1
/
checkout-sessions
Create Agentic Checkout Session
curl --request POST \
--url https://omnicommerce.sg/api/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"productId": "00000000-0000-4000-8000-000000000001",
"quantity": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{productId: '00000000-0000-4000-8000-000000000001', quantity: 1}]})
};
fetch('https://omnicommerce.sg/api/v1/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/checkout-sessions"
payload = { "items": [
{
"productId": "00000000-0000-4000-8000-000000000001",
"quantity": 1
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "agentic_checkout_v1",
"session": {
"id": "<string>",
"organizationId": "<string>",
"status": "ready_for_payment",
"paymentRail": "acp_stripe",
"currency": "<string>",
"totalAmount": 123,
"paymentRequirements": {},
"expiresAt": "<string>",
"subtotalAmount": 123,
"shippingAmount": 123,
"taxAmount": 123,
"discountAmount": 123,
"cartVersion": 123,
"buyer": {},
"shippingAddress": {},
"billingAddress": {},
"orderId": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"items": [
{
"id": "<string>",
"productId": "<string>",
"sku": "<string>",
"title": "<string>",
"quantity": 123,
"unitAmount": 123,
"currency": "<string>",
"imageUrl": "<string>",
"productSnapshot": {}
}
]
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Headers
Optional idempotency key for create retries.
Maximum string length:
180Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Optional for OAuth clients bound to one organization; required when the caller can access multiple organizations.
Maximum string length:
120Available options:
acp_stripe, x402 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes