Skip to main content
POST
/
api
/
commerce
/
merchant
/
carts
Create or initialize cart
curl --request POST \
  --url https://api-beta.pepay.io/api/commerce/merchant/carts \
  --header 'Content-Type: application/json' \
  --header 'x-commerce-api-key: <api-key>' \
  --data '
{
  "wallet_address": "<string>",
  "wallet_network": "ethereum",
  "customer_id": "<string>",
  "item": {
    "productId": "<string>",
    "retailer": "<string>",
    "quantity": 123,
    "price": 123,
    "title": "<string>",
    "imageUrl": "<string>"
  }
}
'
{
"success": true,
"message": "Cart initialized",
"data": {
"merchantId": 123,
"customerId": "cust_123",
"walletAddress": null,
"walletNetwork": null,
"items": [],
"subtotal": 0,
"itemCount": 0,
"createdAt": null,
"updatedAt": null
}
}

Authorizations

x-commerce-api-key
string
header
required

Legacy alias for commerce-scoped API keys. Prefer x-api-key with scope=commerce.

Body

application/json
wallet_address
string
wallet_network
enum<string>
Available options:
ethereum,
bsc,
base,
solana
customer_id
string
Maximum string length: 255
item
object

Response

Cart created successfully

success
boolean
Example:

true

message
string
data
object

Initialized cart snapshot