Skip to main content
The Reseller Developer API lets a merchant or approved OAuth app manage reseller workflows without using the dashboard. Use it when you are building:
  • an internal reseller operations tool
  • a partner onboarding flow
  • a reseller analytics dashboard
  • a headless portal for stock requests and payout operations
Resellers are scoped to a merchant shop. Always treat reseller_relationship_id as a tenant boundary, not just a record ID.

Scopes

Use the smallest scope set your integration needs.

SDK Example

Enable Program

Invite Reseller

After the reseller accepts the invitation, Shoppex creates the reseller relationship and links it to reseller attribution.

Reseller Analytics

Use shop-wide analytics for overview screens:
Use relationship-specific analytics for detail screens:

Embed Campaigns

Create reseller-owned embed campaigns from your partner tooling:
Pause or revoke a campaign without deleting its reporting history:

Stock Purchase Flow

Stock Mode uses normal Shoppex invoice and payment infrastructure. The stock transfer is allocated only after payment.
Then create the invoice:
Merchant-side tools can mark a stock transfer paid and allocate inventory when payment confirmation is handled outside the normal checkout path:
Allocation is idempotent, but integrations should still send stable Idempotency-Key values for stock mutations.

Inventory Delivery

Deliver one allocated stock item to an end customer:

Reseller Fulfillment API

Reseller API keys are different from merchant Developer API keys. A merchant key starts with shx_ and can manage a shop. A reseller key starts with shr_ and can only operate one reseller relationship. Use this flow when a reseller sells through their own store and wants Shoppex to deliver merchant stock without showing Shoppex to their buyer.
  1. The reseller creates an API key in the Reseller Portal API tab.
  2. The reseller tops up prepaid balance.
  3. The external store calls the Reseller Fulfillment API after payment.
  4. Shoppex debits wholesale cost from the reseller balance and delivers merchant serial stock.
For tools that only support a dynamic URL, use the URL template from the Reseller Portal. The path is /reseller/v1/fulfillments/dynamic and the required query params are api_key, external_order_id, customer_email, product_id, and quantity.
Send a stable external_order_id or Idempotency-Key. Retries return the same fulfillment instead of debiting balance twice.
Check reseller prepaid balance:
Common errors:
  • 402 Insufficient reseller prepaid balance
  • 409 Fulfillment stock is unavailable
  • 401 Invalid or inactive reseller API key

Webhooks

Subscribe to reseller events to keep partner portals in sync. Important events:
  • reseller:invited
  • reseller:accepted
  • reseller:sale
  • reseller:embed_campaign_created
  • reseller:payout_requested
  • reseller:stock_purchase_requested
  • reseller:api_fulfillment_delivered
  • reseller:stock_purchase_paid
  • reseller:stock_allocated
  • reseller:stock_item_delivered
See Webhook Events for payload examples.

Endpoint Reference

The full generated endpoint reference is available in the Resellers group in the API Reference sidebar.