Skip to main content
POST

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

Step 1 request. Supports direct items (Mode 1) or cart-based estimation (Modes 2–3). When useCart: true, Pepay reads the saved cart but does not mutate it.

customer_id
string
required
Example:

"cust_123456"

useCart
boolean | null

When true, items are loaded from the saved cart for the provided customer identifier.

items
object[] | null

Mode 1 only (direct items). Forbidden when useCart: true.

itemOverrides
object[] | null

Mode 3 only. Requires useCart: true. Use quantity: 0 to exclude items for this estimate without mutating the cart.

addressId
string<uuid> | null

Reserved for future shipping estimates; currently ignored.

shipping_zip
string | null

Reserved for future shipping estimates; currently ignored.

Response

200 - application/json

Estimate created successfully

success
boolean
Example:

true

data
object

Step 1 estimate result (15 minute TTL). Use estimateId for subsequent Step 2 + Step 3 calls.