Skip to content
Guides

UCP cancel cart

POST/ucp/carts/{id}/cancel

UCP cancel cart. A successful request returns HTTP 200 with the documented response body.

Authorization

AuthorizationBearer <token>

OAuth2 access token issued by Ecomiq Auth.

In: header

Path Parameters

id*string

Unique identifier of the resource.

Header Parameters

Authorization*string

OAuth 2.0 bearer token.

x-Store-Domain*string

Store slug or configured domain that selects the UCP store context.

Length1 <= length <= 253
UCP-Agent*string

Agent profile binding in the form profile="https://agent.example/.well-known/ucp".

Length1 <= length
Idempotency-Key?string

Optional idempotency key for retry-safe UCP requests.

Length1 <= length <= 300

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/ucp/carts/7204558912004325301/cancel" \  -H "Authorization: Bearer <token>" \  -H "x-Store-Domain: my-store" \  -H "UCP-Agent: profile="https://agent.example/.well-known/ucp"" \  -H "Idempotency-Key: checkout-2026-0001"
{  "ucp": {    "version": "example",    "status": "example",    "capabilities": {      "key": [        {          "version": "example"        }      ]    },    "payment_handlers": {      "key": [        {          "id": "7204558912004325301",          "version": "example",          "spec": "example",          "schema": "example",          "available_instruments": [            {              "type": "example",              "constraints": {}            }          ],          "config": {}        }      ]    }  },  "id": "7204558912004325301",  "currency": "PEN",  "line_items": [    {      "item": {        "id": "7204558912004325301",        "title": "Example title",        "price": 1,        "quantity_unit": {          "unit": "example",          "display_text": "example",          "scale": 1,          "increment": 1        },        "unit_price": {          "amount": 1,          "currency": "PEN",          "measure": {            "value": 1,            "unit": "example",            "display_text": "example",            "scale": 1          },          "reference": {            "value": 1,            "unit": "example",            "display_text": "example",            "scale": 1          }        },        "image_url": "https://example.com/resource"      },      "quantity": 1,      "id": "7204558912004325301",      "totals": [        {          "type": "example",          "amount": 1,          "display_text": "example",          "lines": [            {              "display_text": "example",              "amount": 1            }          ]        }      ],      "parent_id": "7204558912004325301"    }  ],  "context": {    "currency": "PEN",    "address_country": "example",    "address_region": "example",    "postal_code": "example_code",    "intent": "example",    "language": "es",    "eligibility": [      "example"    ]  },  "buyer": {    "first_name": "Example resource",    "last_name": "Example resource",    "email": "andrea@example.com",    "phone_number": "+51987654321"  },  "totals": [    {      "type": "example",      "amount": 1,      "display_text": "example",      "lines": [        {          "display_text": "example",          "amount": 1        }      ]    }  ],  "messages": [    {      "type": "example",      "content": "example",      "code": "example_code",      "path": "example",      "content_type": "example",      "severity": "example"    }  ]}