POST
/
v3
/
carts
Create Cart
curl --request POST \
  --url https://sandbox-api.cardcash.com/v3/v3/carts \
  --header 'Authorization: Bearer <token>'

Overview

Creates a new buy cart. If an active buy cart already exists, it is returned instead.

Request

curl -X POST https://sandbox-api.cardcash.com/v3/carts \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "action": "buy" }'

Body Parameters

ParameterTypeRequiredDescription
actionstringYesMust be "buy" for buy carts

Response

Status: 201 Created (or 200 if existing cart returned)
{
  "cartId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "cards": [],
  "couponData": null
}

Notes

  • Only one active buy cart per account
  • If a cart already exists, it is returned with its current cards
  • Save the cartId — you’ll need it for adding cards and checkout