Skip to main content
POST
/
api
/
commerce
/
merchant
/
carts
/
items
Add item to cart
curl --request POST \
  --url https://api-beta.pepay.io/api/commerce/merchant/carts/items \
  --header 'Content-Type: application/json' \
  --header 'x-commerce-api-key: <api-key>' \
  --data '
{
  "productId": "<string>",
  "retailer": "amazon",
  "title": "<string>",
  "price": 1.01,
  "wallet_address": "<string>",
  "wallet_network": "<string>",
  "customer_id": "<string>",
  "quantity": 50,
  "imageUrl": "<string>",
  "productUrl": "<string>",
  "numReviews": 123,
  "rating": 2.5
}
'
{
"success": true,
"message": "Item added to cart",
"data": {
"itemId": "123e4567-e89b-12d3-a456-426614174000",
"quantity": 1,
"updated": false
}
}

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
productId
string
required
retailer
enum<string>
required
Available options:
amazon,
walmart,
target,
ebay,
bestbuy,
other
title
string
required
price
number
required
Required range: x >= 0.01
wallet_address
string
wallet_network
string
customer_id
string
quantity
integer
Required range: 1 <= x <= 99
imageUrl
string
productUrl
string
numReviews
integer
rating
number
Required range: 0 <= x <= 5

Response

Item added to cart successfully

success
boolean
Example:

true

message
string
Example:

"Item added to cart"

data
object