Skip to main content

Overview

Merchant carts are designed for server-managed commerce flows where the merchant backend controls cart state (customerId, wallet, items) and later creates an invoice/checkout.

Authentication

Requires a commerce-scoped API key: x-commerce-api-key: ck_....

Request

Endpoints:
  • GET /api/commerce/merchant/carts
  • POST /api/commerce/merchant/carts
  • POST /api/commerce/merchant/carts/items
  • PUT /api/commerce/merchant/carts/items/{itemId}
  • DELETE /api/commerce/merchant/carts/items/{itemId}
  • DELETE /api/commerce/merchant/carts
  • POST /api/commerce/merchant/carts/validate
  • GET /api/commerce/merchant/carts/totals
Example (create a merchant cart):

Response

Representative GET /api/commerce/merchant/carts response:

Errors

  • 401 missing/invalid commerce API key
  • 400 validation or business rule violation (invalid wallet, item schema, etc.)

Examples

After validating a cart, create a Checkout invoice to start payment and order processing. Next: Products