Create UCP Checkout Session
curl --request POST \
--url https://omnicommerce.sg/ucp/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'UCP-Agent: <ucp-agent>' \
--data '
{
"line_items": [
{
"item": {
"id": "00000000-0000-4000-8000-000000000001"
},
"quantity": 1
}
]
}
'const options = {
method: 'POST',
headers: {
'UCP-Agent': '<ucp-agent>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
line_items: [{item: {id: '00000000-0000-4000-8000-000000000001'}, quantity: 1}]
})
};
fetch('https://omnicommerce.sg/ucp/v1/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/ucp/v1/checkout-sessions"
payload = { "line_items": [
{
"item": { "id": "00000000-0000-4000-8000-000000000001" },
"quantity": 1
}
] }
headers = {
"UCP-Agent": "<ucp-agent>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ucp": {},
"id": "<string>",
"line_items": [
{
"item": {
"id": "<string>",
"title": "<string>",
"price": 123,
"image_url": "<string>"
},
"quantity": 500
}
],
"status": "ready_for_complete",
"currency": "<string>",
"totals": [
{}
],
"buyer": {},
"fulfillment": {},
"payment": {},
"order": {},
"settlement": {}
}{
"ucp": {},
"messages": [
{}
]
}UCP
Create UCP Checkout Session
Create a UCP shopping checkout session against the authenticated organization. The facade translates UCP line items to native agentic checkout sessions, reserves inventory, and returns a UCP checkout resource. Requires UCP-Agent and OAuth checkout:write.
POST
/
ucp
/
v1
/
checkout-sessions
Create UCP Checkout Session
curl --request POST \
--url https://omnicommerce.sg/ucp/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'UCP-Agent: <ucp-agent>' \
--data '
{
"line_items": [
{
"item": {
"id": "00000000-0000-4000-8000-000000000001"
},
"quantity": 1
}
]
}
'const options = {
method: 'POST',
headers: {
'UCP-Agent': '<ucp-agent>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
line_items: [{item: {id: '00000000-0000-4000-8000-000000000001'}, quantity: 1}]
})
};
fetch('https://omnicommerce.sg/ucp/v1/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/ucp/v1/checkout-sessions"
payload = { "line_items": [
{
"item": { "id": "00000000-0000-4000-8000-000000000001" },
"quantity": 1
}
] }
headers = {
"UCP-Agent": "<ucp-agent>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ucp": {},
"id": "<string>",
"line_items": [
{
"item": {
"id": "<string>",
"title": "<string>",
"price": 123,
"image_url": "<string>"
},
"quantity": 500
}
],
"status": "ready_for_complete",
"currency": "<string>",
"totals": [
{}
],
"buyer": {},
"fulfillment": {},
"payment": {},
"order": {},
"settlement": {}
}{
"ucp": {},
"messages": [
{}
]
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Headers
UCP agent identity, for example agent.example/1.0.
Maximum string length:
240Optional idempotency key for safe retries.
Maximum string length:
180Body
application/json
Response
UCP checkout session created.