Preview. The API is shared with design partners and may change before launch. Register interest for sandbox access.
Platforms and agencies
E-commerce platforms, marketplaces and agencies manage stores for many merchants. The Partner API lets you onboard them to Phew and run their integration with a single partner credential.
How it fits together
Section titled “How it fits together”- One partner account, with its own API keys or OAuth client.
- Many merchants, each with a
mer_ID. You create them withPOST /v1/merchants. - Act on behalf of a merchant by adding
Phew-Merchant: mer_…to any Checkout API call. Without the header, a partner credential can only call Partner API endpoints.
curl https://api.getphew.com/v1/offers \ -H "Authorization: Bearer $PHEW_PARTNER_KEY" \ -H "Phew-Merchant: mer_01JD7Z4K2Q8V6N3R5T7W9Y1A3C" \ --json @cart.jsonOnboarding a merchant
Section titled “Onboarding a merchant”-
Create the merchant with their company details and store URL. The merchant starts in
pendingstatus. -
Merchant accepts. The response contains a one-time
onboarding_url. Send the merchant there (or embed it in your admin); they confirm their details and accept the merchant terms. The link works once and expires after 7 days. -
Phew reviews the merchant and their catalogue. You get a
merchant.updatedevent when the status becomesactive, usually within one business day. -
Start offering. From then on, Checkout API calls with the merchant’s
Phew-Merchantheader return offers.
Commission
Section titled “Commission”Commission can go to the merchant, to you, or be split between you. The split is set per merchant when you create it
(commission.partner_share) within the limits in your partner agreement, and both parties see it on the
monthly statement.
Permissions
Section titled “Permissions”Restrict each key or OAuth client to what it needs. A typical platform setup:
| Credential | Scopes | Used by |
|---|---|---|
| Onboarding | merchants:write |
Your admin backend |
| Storefront | offers:write, policies:write, policies:cancel |
Your checkout service |
| Reporting | settlements:read, claims:read |
Your finance and support tools |
See API keys for how to create restricted keys.