Skip to main content
GET
/
api
/
commerce
/
merchant
/
carts
/
totals
Calculate cart totals
curl --request GET \
  --url https://api-beta.pepay.io/api/commerce/merchant/carts/totals \
  --header 'x-commerce-api-key: <api-key>'
{
  "success": true,
  "data": {
    "subtotal": 123,
    "shipping": 123,
    "tax": 123,
    "fees": {
      "fixed": 123,
      "percentage": 123,
      "percentageAmount": 123,
      "total": 123
    },
    "total": 123,
    "itemCount": 123,
    "zipCode": "<string>"
  }
}

Authorizations

x-commerce-api-key
string
header
required

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

Query Parameters

wallet_address
string
wallet_network
string
customer_id
string
zip_code
string

US zip code for shipping and tax calculation

Response

Cart totals calculated successfully

success
boolean
data
object