Step 1 - Create checkout estimate (Enhanced)
Creates a checkout estimate with three operational modes:
Mode 1 - Direct Items: Provide items directly (original behavior)
- Use when: Guest checkout, quick buy buttons, one-time purchases
- Required:
itemsarray
Mode 2 - Cart-Based: Pull items from saved cart
- Use when: Standard checkout from shopping cart
- Required:
useCart: true - Cart fetched using customer identification
Mode 3 - Cart with Overrides: Pull from cart with modifications
- Use when: Last-minute adjustments, promotions
- Required:
useCart: trueanditemOverrides
Cart behavior (modes 2 & 3):
- Pepay does not remove items from the cart automatically.
validItems[]are eligible to be checked out.invalidItems[]are ineligible right now (e.g., no eligible offers). They stay in the cart unless you remove them.invalidItems[]intentionally contains the minimal identifiers + reason; match it back to your cart display byproductId(+retailerwhen relevant).
Customer identification is required: customer_id OR (wallet_address + wallet_network).
Authorizations
Legacy alias for commerce-scoped API keys. Prefer x-api-key with scope=commerce.
Body
- Option 1
- Option 2
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.
"cust_123456"
When true, items are loaded from the saved cart for the provided customer identifier.
Mode 1 only (direct items). Forbidden when useCart: true.
Mode 3 only. Requires useCart: true. Use quantity: 0 to exclude items for this estimate without mutating the cart.
Reserved for future shipping estimates; currently ignored.
Reserved for future shipping estimates; currently ignored.

