Skip to main content
The Sell Execution API lets you programmatically sell precious metals on the Pure marketplace. It follows the same quote-then-execute pattern as buying, using v2 resource-style routes. Instead of purchasing listings, you sell into existing buy offers on the marketplace.
Quote and execute endpoints require an Admin API key (stytch_admin). Payout methods use Member access (stytch_member). See Authentication for the full role split.

How It Works

1

Check Payout Methods

Call GET /execution/payout-methods/v1 to see your payout configuration and instant payout credit availability.
2

Get a Sell Quote

POST /execution/v2/sell/quotes with your items (offer IDs or product+variant pairs). You receive a quoteId, pricing breakdown, and optionals. Quotes expire in 60 seconds.
3

Select Optionals (Optional)

Inspect optionals[] on the quote, call GET /execution/v2/sell/quotes/:quoteId/optionals, or pass selectedOptionalIds when creating or refreshing a quote. See Optionals.
4

Check Listing Conflicts (Optional)

If you also have active listings for the same products, call GET /execution/v2/sell/quotes/:quoteId/listing-conflicts before executing.
5

Execute the Sell

POST /execution/v2/sell/quotes/:quoteId/execute with expectedTotal, expectedOptionalFees, and any selected optionals. Pure verifies the current total is not less than your expectedTotal.

Endpoints

All v2 sell routes require stytch_admin. Payout methods require stytch_member.

Sell Quotes

Sell quotes are pricing snapshots that expire in 60 seconds. Each sell quote includes:
  • Line items with per-item pricing, matched offers, and availability status
  • Fees (processing, shipping, etc.)
  • Optionals — add-on services like instant payout and overnight label (see Optionals)
  • Total in cents — pass this as expectedTotal when executing
Items in a sell quote can be specified by:
  • Offer ID — sell directly into a specific buy offer (offerId + quantity)
  • Product + Variant — let Pure match the best available offers (productId + variantId + quantity)
To refresh pricing or toggle optionals, call GET /execution/v2/sell/quotes/:quoteId with optional selectedOptionalIds as a repeatable query param (e.g. ?selectedOptionalIds=instant_payout&selectedOptionalIds=overnight_label) — not comma-joined.
Quotes can contain multiple items (up to 50 per quote). Each item is an offer ID or product+variant pair with a quantity. Offer IDs must be unique within a quote.

Optionals

Sell quotes include built-in optionals: instant payout (instant_payout) and overnight label (overnight_label). Fees on sell optionals are returned as negative values (they reduce your payout). See the Optionals guide for eligibility rules, catalog endpoints, and fee reconciliation.

Optional Fee Reconciliation

On execute, pass expectedOptionalFees — a map of optional ID to fee in cents from the quote response:
Pure validates that each optional’s fee still matches at confirm time. If a fee has drifted since the quote, you’ll receive 422 with errorCode: "optional_fee_mismatch". Refresh the quote and retry with updated fees.

Listing Conflicts

When selling items you also have listed on the marketplace, call GET /execution/v2/sell/quotes/:quoteId/listing-conflicts before execute. The response is { success: true, data: [...] } — an array of conflicts where your sell quantity overlaps with active listings for the same product and variant. At execute time, pass:
  • adjustListings: true — automatically decrements your active listings for the same products
  • confirmListingMismatch: true — skips the error when your sell quantity is less than listed quantity
Listing conflicts return 409 with errorCode: "listing_quantity_mismatch" or "listing_validation_failed".

Promotions

Promotion codes are not accepted when creating a quote. Preview with:
Pass promotionCode on execute to apply the promotion at checkout.

Payout Methods

Before selling, check your payout configuration:
The response includes:
  • payoutMethod — your configured payout method (electronic_check, teller_ach, or wire_transfer)
  • electronicCheckName / electronicCheckEmail — payee details for e-check payouts
  • instantPayout — your credit limit, outstanding balance, and available credit for instant payouts
Use the instant payout credit info to determine eligibility before selecting the instant payout optional.

Price Protection

When executing, pass expectedTotal — the total value from the quote. Pure rejects the order with 409 Conflict if the current total is less than your expectedTotal. This guarantees your payout is never less than what you agreed to.

Access and Roles

All execution routes (v1 and v2) are gated by an organization allowlist. If your organization is not allowlisted, every execution request returns 403 Forbidden. Contact support to request access.

Trading Halts

If trading is halted, execute may return 409 with errorCode: "system_check_failed". Poll GET /execution/v2/trading-status before submitting orders.

Error Handling

Error responses include error, code (HTTP status), suggestion, and optionally a machine-readable errorCode string. The execute response includes counterpartyOrderIds — the buy-side order IDs created as counterparties to your sell.
Use the Sandbox Environment to test the full sell flow without using real money.

Legacy v1 (Deprecated)

v1 sell endpoints remain available but are deprecated. Migrate to the v2 routes below. v2 adds optionals catalog, listing-conflicts pre-check, promotion preview, expectedOptionalFees reconciliation, counterpartyOrderIds on execute, and improved error codes. v1 uses comma-separated selectedOptionalIds on GET refresh; v2 uses repeatable array params.