MB Wallet Developers
API referenceV1Checkout_sessionsIdCancel

/v1/checkout_sessions/{id}/cancel

POST/v1/checkout_sessions/{id}/cancel

[checkout_api] cancel a pending checkout session

Security: gated; the registry declares no role list for this surface.

Path Parameters

id*string

Header Parameters

Idempotency-Key*string

Client-supplied idempotency key. Required on every registry-idempotent door.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/checkout_sessions/string/cancel" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "object": "checkout.session",  "mode": "test",  "ui_mode": "hosted",  "status": "string",  "payment_status": "string",  "currency": "string",  "amount": 0,  "amount_subtotal": 0,  "amount_discount": 0,  "amount_shipping": 0,  "amount_tax": 0,  "amount_total": 0,  "success_url": "string",  "cancel_url": "string",  "return_url": "string",  "notify_url": "string",  "description": "string",  "customer_email": "string",  "locale": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "expires_at": 0,  "created_at": 0,  "line_items": {    "object": "list",    "data": [      {        "product_name": "string",        "description": "string",        "images": [          "string"        ],        "tax_behavior": "inclusive",        "quantity": 0,        "unit_price": 0,        "currency": "string",        "amount_subtotal": 0,        "amount_discount": 0,        "amount_tax": 0,        "amount_total": 0      }    ]  }}