How It Works
Get a Quote
Send your desired items and payment method to the quote endpoint. You’ll
receive a
quoteId along with a full pricing breakdown — line items, fees,
and total. The payment method is needed so the quote includes accurate
payment-method-specific fees. Quotes expire in 30 seconds.Review Pricing
Inspect the quote response to confirm line items, fees, and total. If
needed, call the GET endpoint with your
quoteId to refresh pricing at
current spot rates — this also resets the 30-second expiration window.Execute the Buy
Send your
quoteId, the total from the quote as expectedTotal, your
payment method, and shipping address to the execute endpoint. Pure verifies
the current total does not exceed your expectedTotal — if the price has
increased, the request is rejected with a 409 so you are never charged
more than you agreed to.Quotes
Quotes are pricing snapshots that include accurate fees based on the payment method you provide. Each quote includes:- Line items with per-item pricing and availability status
- Fees (processing, shipping, etc.) — calculated for your chosen payment method
- Total in cents — pass this as
expectedTotalwhen executing - Expiration timestamp — quotes expire in 30 seconds
paymentMethod. This ensures the quoted total matches what you’ll be charged at execution time.
If you need different items, create a new quote. If you need refreshed pricing on the same items, call GET /execution/buy/quote/v1 with your quoteId — this returns a fresh pricing snapshot and a new 30-second window.
Quotes can contain multiple items (up to 50 per quote). Each item is a
listing ID and quantity pair.
Price Protection
When executing a buy, you must passexpectedTotal — the total value from the quote response. Pure will reject the order with a 409 Conflict if the current total exceeds your expectedTotal. This guarantees you are never charged more than the price you agreed to.
If you receive a 409, create a new quote to get updated pricing and retry.
Payment Methods
Before executing a buy, you’ll need a valid Stripe payment method. Use the List Payment Methods endpoint to retrieve your organization’s payment methods. Each method includes:id— the Stripe payment method ID to pass when executingpaymentMethod— the payment method type (stripe_ach,stripe, orwire_transfer) to pass when executingisDefault— whether this is your organization’s default
Sandbox Environment
Pure provides a sandbox environment for testing the Execution API without using real money.Sandbox API
Base URL:
https://sandbox.api.collectpure.comAll sandbox requests use the same endpoints and schemas as production — just point to the sandbox base URL.Sandbox API Keys
Generate a sandbox API key from your API Keys dashboard.Select Sandbox environment when creating the key.
Getting Started with Sandbox
Create a Sandbox API Key
Go to
collectpure.com/dashboard/api-keys
and create a new API key. Select the Sandbox environment.
Sandbox Data is Created For You
When you create a sandbox key, Pure automatically provisions test data for
your organization — including products, listings, and payment methods. You
can start making API calls immediately.
Use the Sandbox Base URL
Point all your requests to
https://sandbox.api.collectpure.com instead of
the production URL. Use your sandbox API key in the x-api-key header.Sandbox Endpoints
The sandbox environment exposes additional endpoints to help you discover test data. These endpoints are only available in sandbox and do not exist in production.GET /sandbox/listings/get/v1 — Get Test Listings
Returns active listings available for testing. Use the listingId from the response to create quotes.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Max listings to return (1–250) |
offset | number | 0 | Number of listings to skip (pagination) |
| Field | Type | Description |
|---|---|---|
listingId | string | The listing ID — pass this to the quote endpoint |
productId | string | The product ID |
variantId | string | The variant ID |
productTitle | string | Product name |
sku | string | Product SKU |
material | string | Material (Gold, Silver, etc.) |
quantity | number | Available quantity |
price | number | Price in cents |
priceDollars | number | Price in dollars |
spotPremium | number | Premium over spot (%) |
spotPremiumDollar | number | Premium over spot ($) |
expiresAt | string | ISO 8601 listing expiration |
Sandbox Example
Error Handling
The Execution API returns structured errors. Common scenarios:| Status | Meaning | What to Do |
|---|---|---|
404 | Quote not found or expired | Create a new quote |
409 | Price increased beyond expectedTotal | Create a new quote to get updated pricing, then retry |
410 | Quote has expired | Create a new quote |
422 | Validation failed (listing unavailable, insufficient inventory) | Check the error message and adjust your request |
500 | Processing failed | Retry with a new quote. If unrecoverable, contact support |
"partial" status with the order IDs for the items that were processed.