The Docs
API docs.
REST · MCP · A2A · OpenAPI 3.1
Everything to integrate SimPig: selling eSIMs from your app or assistant, reading your Piggyback sales into your own systems, and every endpoint with its fields. The overview is on the API page; the machine-readable copy is the OpenAPI document.
The API at a glance · The OpenAPI document · The agent guide
Contents
- The basics
- Authentication
- Errors and limits
- Selling eSIMs
- Callbacks
- Piggyback partners
- Checking our signatures
- MCP and A2A
- For tools and other platforms
- Reference: Catalogue
- Reference: Orders
- Reference: Piggyback partners
- Reference: Service
The basics
Every endpoint is under https://simpig.com/api/v1, over HTTPS, in JSON (a Piggyback export can be CSV). Field names are camelCase. Times are ISO 8601 in UTC.
Money is an integer in the currency’s minor unit, always beside its currency: 1999 with USD is US$19.99; yen have no minor unit, so 1200 with JPY is ¥1,200. Never divide by 100 without checking the currency.
Prices can be shown and charged in USD, AUD, NZD, EUR, GBP, CAD, SGD, JPY. Add ?currency= to a catalogue read and "currency" to an order; every plan also lists its price in all of them, and each is exactly what checkout charges in that currency, conversion included.
Try it: no key needed
curl https://simpig.com/api/v1/catalog/plans/japan?currency=USDAuthentication
There are no client registrations and no OAuth. Three cases:
- The catalogue, starting an order, a watch key and the service endpoints: nothing at all.
- Reading an order: the order token that starting it answered, as Authorization: Bearer <orderToken>. It is returned once, reads that one order for 14 days, and never goes in a URL.
- A Piggyback partner’s own data: a key they make on /me/piggyback (it starts pbk_), as Authorization: Bearer pbk_…. Up to three live keys, each read-only, each capped at 600 requests an hour. We keep only a hash, so a lost key is revoked and replaced, not recovered.
A partner key
curl -H "Authorization: Bearer pbk_…" https://simpig.com/api/v1/piggyback/partner/summaryErrors and limits
A failure answers an HTTP status and the same envelope every time: a human sentence, a broad code (validation, unauthorized, forbidden, not_found, conflict, rate_limited, server_error), the exact reason, and for a bad input which field and why.
Over a limit is 429 with Retry-After in seconds (60). Wait that long and resend; an order resent with the same idempotencyKey is the same order, never a second one.
- Orders: 5 eSIMs at most in one, 10 per email an hour, 200 per network address an hour. Unpaid orders have their own limit: 5 started in an hour per email with none paid, 30 per network address; over that is 429 TOO_MANY_UNPAID until the hour is out or one is paid.
- A pay link lasts 30 minutes; a watch key answers for 14 days.
- A partner key: 600 requests an hour; sales come 200 a page.
422
{
"error": "some of that is not right.",
"code": "validation",
"reason": "INVALID_INPUT",
"issues": [{ "path": ["email"], "message": "Invalid email" }]
}Selling eSIMs
Your code finds a plan and starts the order; the person pays on Stripe’s page; your code reads the eSIM back. You never handle a card, and the person never needs a SimPig password.
1. Find a plan
curl "https://simpig.com/api/v1/catalog/plans/JP?currency=AUD"
# or a trip: https://simpig.com/api/v1/catalog/trip?to=JP,KR,TH2. Confirm its price live
curl "https://simpig.com/api/v1/catalog/plan/<productId>?currency=AUD"3. Start the order
curl -X POST https://simpig.com/api/v1/agent/orders \
-H "Content-Type: application/json" \
-d '{ "email": "traveller@example.com", "productId": "<productId>", "qty": 1,
"currency": "AUD", "idempotencyKey": "order-8412",
"callbackUrl": "https://your.app/simpig-hook", "partner": "yourcode" }'4. Read it back once paid
curl -H "Authorization: Bearer <orderToken>" https://simpig.com/api/v1/agent/orders/<ref>The email must be the buyer’s real address: the eSIM is sent there and nowhere else. A placeholder (example.com, as in the request above, a name like test@…, or another reserved or made-up one) is refused with 422 before any pay link exists.
Step 3 answers the order (its ref, status and total), payUrl, statusUrl and orderToken. Give the person payUrl; it lasts 30 minutes, and they are emailed it too. Keep orderToken: it is returned only here.
The status moves pending_payment → paid → provisioning → fulfilled, usually within a minute of paying. Poll every 5 to 10 seconds, or give a callbackUrl. Once fulfilled the answer carries the install details (the activation code, the SM-DP+ address and the links that install it in one tap); the person gets the same by email. The activation code is theirs: show it to them, never log it.
eSIMs are final once delivered. Before the person pays, tell them so and check their phone supports eSIM.
Callbacks
Give a callbackUrl (https, a public host) and we POST { ref, status, statusUrl, fulfilledAt } to it when the order is fulfilled. It carries X-SimPig-Timestamp and X-SimPig-Signature: v1=<hex>, an HMAC-SHA256 over <timestamp>.<raw body>, keyed by the hex of SHA-256 of the order token. Check it, and ignore one more than a few minutes old.
Node
import { createHash, createHmac, timingSafeEqual } from 'node:crypto';
function fromSimPig(rawBody, headers, orderToken) {
const t = headers['x-simpig-timestamp'];
const sig = String(headers['x-simpig-signature'] ?? '').replace(/^v1=/, '');
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const key = createHash('sha256').update(orderToken).digest('hex');
const want = createHmac('sha256', key).update(`${t}.${rawBody}`).digest('hex');
return sig.length === want.length && timingSafeEqual(Buffer.from(sig), Buffer.from(want));
}Piggyback partners
A partner earns a share of every sale they bring (15% to start, up to 20%; the rules are on /piggyback). A program brings sales in two ways: send people to the partner link, or put the partner code on the order as "partner" (step 3 above). Add your own click id to a link as ?sub= and it comes back on the sale.
Then read the sales into your own systems with your key. Nothing names a buyer: each customer is a token that stays the same in your data and differs for every other partner. The token is derived from a secret only we hold. We change it only if we believe it has leaked, and we email partners first; after a change every customer has a new token, so tokens in exports taken before it will not match those after. Sales, amounts and commissions are unchanged by it.
Your standing
curl -H "Authorization: Bearer pbk_…" https://simpig.com/api/v1/piggyback/partner/summarySync sales: page with next
curl -H "Authorization: Bearer pbk_…" \
"https://simpig.com/api/v1/piggyback/partner/sales?updatedSince=2026-11-01T00:00:00Z"
# → { "sales": [...], "next": "<id>" }; ask again with &after=<id> until next is nullThe same as CSV
curl -H "Authorization: Bearer pbk_…" "https://simpig.com/api/v1/piggyback/partner/sales?format=csv" -o sales.csvBy day, and payouts
curl -H "Authorization: Bearer pbk_…" "https://simpig.com/api/v1/piggyback/partner/days?from=2026-10-01"
curl -H "Authorization: Bearer pbk_…" https://simpig.com/api/v1/piggyback/partner/transfersEach sale carries what you need to reconcile it on one row: the plan bought (plan: productId, title, dataBytes, daily, days, and items for an order with more than one), the final price the buyer paid after any discount (amountMinor, in currency, the minor unit: cents, or whole yen), when it was made and paid (createdAt, paidAt), and the commission (commission.amountMinor in the sale’s currency, commission.earnedAudMinor in AUD cents, which is what we pay out). A minimum per sale agreed with you shows as commission.minimumUsdMinor (US cents), and the commission is never below it, nor above the price paid.
The CSV has the same fields, one column each, in the order of the JSON: sale_id, created_at, paid_at, kind, destination_code, amount_minor, currency, source, sub, customer, rate_bps, state, reason, earned_aud_minor, owed_back_aud_minor, due_at, transfer_id, stripe_transfer_id, then plan_product_id, plan_title, plan_data_bytes, plan_days, commission_minor and minimum_usd_minor (added on 2026-11-20 at the end, so a reader that goes by position still works). The download on your partner page and the API give the same rows, as JSON or CSV.
Sync with updatedSince: a sale changes after it is made (pending, then due after the hold, then paid, or void after a refund), and updatedAt moves when it does. Commission is in AUD cents (earnedAudMinor) and in the sale’s own currency (commission.amountMinor); the sale itself is in the currency the buyer paid.
Each transfer carries Stripe’s own transfer id and the sales in it, so you can match it in your Stripe dashboard.
Checking our signatures
Every partner answer and export carries Piggyback-Signature: t=<unix seconds>,kid=<key id>,ed25519=<base64url>, an Ed25519 signature over <t>.<body>. The public key is at /.well-known/piggyback-keys.json (a JWK set). Keep the body and the header, and you can prove later exactly what we reported.
Node 20+
import { createPublicKey, verify } from 'node:crypto';
async function fromUs(body, header) {
const p = Object.fromEntries(header.split(',').map((x) => x.split('=')));
const { keys } = await (await fetch('https://simpig.com/.well-known/piggyback-keys.json')).json();
const jwk = keys.find((k) => k.kid === p.kid);
if (!jwk) return false;
const key = createPublicKey({ key: jwk, format: 'jwk' });
return verify(null, Buffer.from(`${p.t}.${body}`), key, Buffer.from(p.ed25519, 'base64url'));
}MCP and A2A
An assistant can use the same shop without REST. The MCP server is POST /api/mcp over Streamable HTTP, with no session and no auth; its tools are search_destinations, list_plans, plans_covering, get_plan, start_order and order_status. The A2A agent is POST /api/a2a (JSON-RPC 2.0) with the same skills. Both answer exactly what REST does.
Claude Code, Cursor or any MCP client
{ "mcpServers": { "simpig": { "type": "http", "url": "https://simpig.com/api/mcp" } } }The API guide (/agents.md) is the same reference as Markdown: every call and field, the refund rule word for word, and a whole A2A exchange.
For tools and other platforms
Point a tool at these and it knows the API without reading this page:
- /api/v1/openapi.json: OpenAPI 3.1, every endpoint, field and error. Import it into Postman, Insomnia or Bruno, or generate a client from it.
- /agents.md and /llms.txt: the guide and the short index, for language models.
- /discovery.json: every address a program can use, and whether each is live, cached or static.
- /.well-known/mcp/server-card.json and /.well-known/agent-card.json: the MCP server and the A2A agent described.
- /catalog.json: the whole catalogue in one read, cached for up to an hour. Find a plan with it; never price one.
- /api/v1/status: what works right now, component by component.
Reference
Every endpoint a partner or platform calls, with what it takes and what it answers. Generated from our OpenAPI document; the document itself has every customer endpoint too.
Catalogue
Public, cached at the edge, no key.
GET /api/v1/catalog/currencies
The currencies a price can be shown and paid in No key
The shop currency (`base`) and, when choosing is on, every currency on offer with its symbol and how many decimals its minor unit has (0 for yen). Pass one as `?currency=` to every catalogue read and to the order.
Answer (200)
basestring · requiredenabledboolean · requiredcurrenciesobject[] · requiredcurrencies[].codestring · requiredcurrencies[].namestring · requiredcurrencies[].symbolstring · requiredcurrencies[].exponentinteger · required
Statuses
200What is on offer.
GET /api/v1/catalog/destinations
Every destination with something to sell No key
Parameters
currencystring · query: A currency to price in (USD, AUD, NZD, EUR, GBP, CAD, SGD, JPY). Without it, or with one not on offer, the shop currency. GET /currencies lists what is on.
Answer (200)
destinationsobject[] · requireddestinations[].codestring · requireddestinations[].namestring · requireddestinations[].kind"country" | "region" | "global" · requireddestinations[].continentstring or null · requireddestinations[].slugstring · requireddestinations[].aliasesstring[] · requireddestinations[].memberCodesstring[] · requireddestinations[].popularityinteger · requireddestinations[].planCountinteger · requireddestinations[].fromPriceMinorinteger or null · requireddestinations[].currencystring · required
Statuses
200Destinations, most popular first.
GET /api/v1/catalog/plans/{destination}
The plans for one destination No key
A country lists its own plans first, then the regional and global plans that cover it (`isRegional`).
Parameters
destinationstring · path · required: A destination slug (japan, bali-indonesia, europe) or code (JP, EU-42).currencystring · query: A currency to price in (USD, AUD, NZD, EUR, GBP, CAD, SGD, JPY). Without it, or with one not on offer, the shop currency. GET /currencies lists what is on.
Answer (200)
destinationobject · requireddestination.codestring · requireddestination.namestring · requireddestination.kind"country" | "region" | "global" · requireddestination.slugstring · requireddestination.memberCodesstring[] · requireddestination.factsobject or nullcurrencystringplansobject[] · requiredplans[].productIdstring (uuid) · requiredplans[].titlestring · requiredplans[].subtitlestring or null · requiredplans[].destinationCodestring · requiredplans[].destinationNamestring · requiredplans[].destinationKind"country" | "region" | "global" · requiredplans[].isRegionalboolean · requiredplans[].volumeBytesnumber · requiredplans[].durationDaysinteger · requiredplans[].dataTypeinteger · requiredplans[].activeTypeinteger or null · requiredplans[].installWithinDaysinteger or nullplans[].fairUsestring or nullplans[].supportsTopupboolean · requiredplans[].speedstring or null · requiredplans[].priceMinorinteger · requiredplans[].currencystring · requiredplans[].compareAtMinorinteger or null · requiredplans[].badgestring or null · requiredplans[].isFeaturedboolean · requiredplans[].coverageCodesstring[] · requiredplans[].operatorsobject[] · requiredplans[].coverageobject[]plans[].breakoutobject or nullplans[].pricesobject[]
Statuses
200The destination and its plans.404No such destination, or nothing to sell there.422Malformed destination.
GET /api/v1/catalog/trip
Plans for a multi-stop trip No key
Pass the ISO country codes as `to=JP,KR,TH` (up to 8). `covering` lists every plan whose coverage includes all of them; `singles` lists each country’s own plans so a combination can be built when nothing covers the whole trip. Unknown codes are dropped; 404 when none is a country we sell.
Parameters
tostring · query · required: Comma-separated ISO 3166-1 alpha-2 codes.currencystring · query: A currency to price in (USD, AUD, NZD, EUR, GBP, CAD, SGD, JPY). Without it, or with one not on offer, the shop currency. GET /currencies lists what is on.
Answer (200)
currencystringdestinationsobject[] · requireddestinations[].codestring · requireddestinations[].namestring · requireddestinations[].slugstring · requiredcoveringobject[] · requiredcovering[].productIdstring (uuid) · requiredcovering[].titlestring · requiredcovering[].subtitlestring or null · requiredcovering[].destinationCodestring · requiredcovering[].destinationNamestring · requiredcovering[].destinationKind"country" | "region" | "global" · requiredcovering[].isRegionalboolean · requiredcovering[].volumeBytesnumber · requiredcovering[].durationDaysinteger · requiredcovering[].dataTypeinteger · requiredcovering[].activeTypeinteger or null · requiredcovering[].installWithinDaysinteger or nullcovering[].fairUsestring or nullcovering[].supportsTopupboolean · requiredcovering[].speedstring or null · requiredcovering[].priceMinorinteger · requiredcovering[].currencystring · requiredcovering[].compareAtMinorinteger or null · requiredcovering[].badgestring or null · requiredcovering[].isFeaturedboolean · requiredcovering[].coverageCodesstring[] · requiredcovering[].operatorsobject[] · requiredcovering[].coverageobject[]covering[].breakoutobject or nullcovering[].pricesobject[]singlesobject[] · requiredsingles[].codestring · requiredsingles[].plansobject[] · required
Statuses
200The trip’s plans.404None of the codes is a country on sale.422Malformed list of codes.
GET /api/v1/catalog/plan/{productId}
One plan No key
Parameters
productIdstring (uuid) · path · requiredcurrencystring · query: A currency to price in (USD, AUD, NZD, EUR, GBP, CAD, SGD, JPY). Without it, or with one not on offer, the shop currency. GET /currencies lists what is on.
Answer (200)
planobject · requiredplan.productIdstring (uuid) · requiredplan.titlestring · requiredplan.subtitlestring or null · requiredplan.destinationCodestring · requiredplan.destinationNamestring · requiredplan.destinationKind"country" | "region" | "global" · requiredplan.isRegionalboolean · requiredplan.volumeBytesnumber · requiredplan.durationDaysinteger · requiredplan.dataTypeinteger · requiredplan.activeTypeinteger or null · requiredplan.installWithinDaysinteger or nullplan.fairUsestring or nullplan.supportsTopupboolean · requiredplan.speedstring or null · requiredplan.priceMinorinteger · requiredplan.currencystring · requiredplan.compareAtMinorinteger or null · requiredplan.badgestring or null · requiredplan.isFeaturedboolean · requiredplan.coverageCodesstring[] · requiredplan.operatorsobject[] · requiredplan.coverageobject[]plan.breakoutobject or nullplan.pricesobject[]
Statuses
200The plan.404No such plan, or it is not on sale.422Malformed id.
Orders
Buying for a person: start an order with their email, read it back with the order token.
POST /api/v1/agent/orders
Start an order (no sign-in) No key
Starts an order for a buyer’s email and a plan (`productId`, as listed by `GET /api/v1/catalog/plans/{destination}`). The answer carries Stripe’s `payUrl`, where the buyer pays, a `statusUrl`, and an `orderToken` that is returned only here and is the one credential that reads the order back. Once paid and provisioned, the order carries the install details (one-tap links, the LPA activation code for a QR, the manual SM-DP+ entry), and the same are emailed to the buyer. A repeated `idempotencyKey` returns the same order. `poolCode` buys from a mates link: the card is held at full price and the mates rates price is taken when the link closes; there is no separate step to join. `startPool: true` starts a mates link with this purchase, hosted by the buyer; `order.pool.code` is its code. Rate-limited per network address and per email.
Body
emailstring (email) · requiredproductIdstring (uuid) · requiredqtyintegercallbackUrlstring (uri)idempotencyKeystringpoolCodestringdisplayNamestringstartPoolbooleanpayLinkEmailbooleancurrencystringwatchKeystringpartnerstringpartnerTypedbooleanpartnerSubstring
Answer (200)
orderobject · requiredorder.idstring (uuid) · requiredorder.refstring · requiredorder.status"pending_payment" | "paid" | "provisioning" | "fulfilled" | "partially_fulfilled" | "failed" | "refunded" | "cancelled" | … · requiredorder.kind"purchase" | "topup" · requiredorder.currencystring · requiredorder.subtotalMinorinteger · requiredorder.discountMinorinteger · requiredorder.taxMinorinteger · requiredorder.totalMinorinteger · requiredorder.paidMinorinteger or nullorder.captureState"auto" | "authorised" | "captured" | "released" | "expired"order.perk"simpig_paid" | "pool" | "saved_bacon" | "heist" | nullorder.poolobject or nullorder.createdAtstring · requiredorder.paidAtstring or null · requiredorder.fulfilledAtstring or null · requiredorder.failedReasonstring or null · requiredorder.itemsobject[] · requiredorder.esimsobject[] · requiredorder.payUrlstring (uri) or null · requiredorder.claimExpiresAtstring or null · requiredorderTokenstring or null · requiredstatusUrlstring (uri) · requiredexistingboolean · requirednextstring · required
Statuses
200The order, the pay link and the one-time token.422Unknown or unavailable plan, bad quantity or email.429Too many orders from this address or IP in an hour, or too many started and not paid for (TOO_MANY_UNPAID).503Payments not configured.
GET /api/v1/agent/orders/{ref}
The order’s progress and, once fulfilled, the install details Order token
Send the order token as `Authorization: Bearer <orderToken>`. An unknown ref, a wrong token and an expired token (14 days) all answer 404.
Parameters
refstring · path · required
Answer (200)
orderobject · requiredorder.idstring (uuid) · requiredorder.refstring · requiredorder.status"pending_payment" | "paid" | "provisioning" | "fulfilled" | "partially_fulfilled" | "failed" | "refunded" | "cancelled" | … · requiredorder.kind"purchase" | "topup" · requiredorder.currencystring · requiredorder.subtotalMinorinteger · requiredorder.discountMinorinteger · requiredorder.taxMinorinteger · requiredorder.totalMinorinteger · requiredorder.paidMinorinteger or nullorder.captureState"auto" | "authorised" | "captured" | "released" | "expired"order.perk"simpig_paid" | "pool" | "saved_bacon" | "heist" | nullorder.poolobject or nullorder.createdAtstring · requiredorder.paidAtstring or null · requiredorder.fulfilledAtstring or null · requiredorder.failedReasonstring or null · requiredorder.itemsobject[] · requiredorder.esimsobject[] · requiredorder.payUrlstring (uri) or null · requiredorder.claimExpiresAtstring or null · requirednextstring · required
Statuses
200The order.401No order token, or not one (`UNAUTHENTICATED`).404Not found (or not your token).
GET /api/v1/agent/watch/{key}
Where an order started from a link you shared has got to No key
For an assistant that sent a person a plan’s page and holds no order token. Make up a random key (16 to 64 characters of A–Z, a–z, 0–9, `-`, `_`), add it to the page’s address as `?watch=<key>` before sharing it, then read this address with the same key. The answer is the order’s status and when it started, was paid and was fulfilled: never the person’s email, the order’s reference, what was bought or how to install it. `not_started` until the person presses pay. A key answers for 14 days. Anyone holding the key can read the same, so make it long and random and share the link only with the person. Rate-limited per network.
Parameters
keystring · path · required
Answer (200)
status"not_started" | "pending_payment" | "paid" | "provisioning" | "fulfilled" | "partially_fulfilled" | "failed" | "refunded" | … · requiredstartedAtstring or null · requiredpaidAtstring or null · requiredfulfilledAtstring or null · requirednextstring · required
Statuses
200The status.422Not a watch key.429Too many reads from this network; ask less often.
Piggyback partners
A partner’s own data with their key, and what a partner code gives a buyer.
GET /api/v1/piggyback/partner/summary
Your standing: code, rate and money by state Partner key
For your own systems, with your API key. When we have configured our signing key, the answer carries `Piggyback-Signature: t=<unix seconds>,kid=<key id>,ed25519=<base64url>`: an Ed25519 signature over `<t>.<body>`, checkable with the public key at `/.well-known/piggyback-keys.json`.
Answer (200)
codestring · requiredstatus"active" | "paused" | "terminated" · requiredrateBpsinteger · requiredtenureDaysinteger · requiredwindowDaysinteger · requiredholdDaysinteger · requiredpayoutsEnabledboolean · requiredtotalsobject · requiredtotals.pendingAudMinorinteger · requiredtotals.dueAudMinorinteger · requiredtotals.paidAudMinorinteger · requiredtotals.owedBackAudMinorinteger · requiredasOfstring · required
Statuses
200Your standing.401No key, or not a live one (`INVALID_API_KEY`).429Over the key’s hourly cap.
GET /api/v1/piggyback/partner/sales
Your sales, oldest first, 200 a page Partner key
Every attributed sale: when, where to, the plan bought (`plan`: product, title, data and days), the final price paid (`amountMinor`) and in which currency, how it came (`link`, `code`, `agent`, or `tenure` for a returning customer), your `sub` (the click id you put on your link as `?sub=`), an anonymous `customer` token (stable in your data unless we rotate its secret, which we announce first), and the commission: rate, any agreed minimum per sale in US cents (`minimumUsdMinor`), state (`pending` inside the hold, `due`, `paid`, `void`), what it earns in the sale’s currency (`amountMinor`) and in AUD cents (`earnedAudMinor`, what we pay out), anything owed back after a refund, and the transfer that paid it with Stripe’s own id. Filter by `from`/`to` (when the sale was made) or `updatedSince` (to sync changes); page with `after=<next>`. `format=csv` answers the same rows as CSV. When we have configured our signing key, the answer carries `Piggyback-Signature: t=<unix seconds>,kid=<key id>,ed25519=<base64url>`: an Ed25519 signature over `<t>.<body>`, checkable with the public key at `/.well-known/piggyback-keys.json`.
Parameters
fromstring · querytostring · queryupdatedSincestring · queryafterstring (uuid) · querylimitinteger · queryformat"json" | "csv" · query
Answer (200)
salesobject[] · requiredsales[].idstring (uuid) · requiredsales[].createdAtstring · requiredsales[].updatedAtstring · requiredsales[].paidAtstring or null · requiredsales[].kind"purchase" | "topup" · requiredsales[].destinationCodestring or null · requiredsales[].destinationstring or null · requiredsales[].planobject or nullsales[].amountMinorinteger · requiredsales[].currencystring · requiredsales[].source"link" | "code" | "agent" | "tenure" | null · requiredsales[].substring or null · requiredsales[].customerstring · requiredsales[].discountBpsintegersales[].discountMinorintegersales[].commissionobject · requiredsales[].transferobject or null · requirednextstring (uuid) or null · required
Statuses
200A page of sales.401No key, or not a live one (`INVALID_API_KEY`).422A bad filter, or `after` is not one of your sales (`INVALID_CURSOR`).429Over the key’s hourly cap.
GET /api/v1/piggyback/partner/days
Clicks, sales and earnings by day (UTC) Partner key
From `from` to `to` (YYYY-MM-DD, at most 366 days; the last 30 by default). A click is a person who opened a page of ours through your link with scripts running; programs are not counted. When we have configured our signing key, the answer carries `Piggyback-Signature: t=<unix seconds>,kid=<key id>,ed25519=<base64url>`: an Ed25519 signature over `<t>.<body>`, checkable with the public key at `/.well-known/piggyback-keys.json`.
Parameters
fromstring · querytostring · query
Answer (200)
daysobject[] · requireddays[].daystring · requireddays[].clicksinteger · requireddays[].salesinteger · requireddays[].earnedAudMinorinteger · required
Statuses
200Day by day.401No key, or not a live one (`INVALID_API_KEY`).429Over the key’s hourly cap.
GET /api/v1/piggyback/partner/transfers
Your transfers, with Stripe’s ids and the sales in each Partner key
Newest first, 100 at most (narrow with `from`/`to`). Each names the sales it paid and any refunds it took back, and carries Stripe's transfer id: look it up in your own Stripe dashboard to see the same money arrive. When we have configured our signing key, the answer carries `Piggyback-Signature: t=<unix seconds>,kid=<key id>,ed25519=<base64url>`: an Ed25519 signature over `<t>.<body>`, checkable with the public key at `/.well-known/piggyback-keys.json`.
Parameters
fromstring · querytostring · query
Answer (200)
transfersobject[] · requiredtransfers[].idstring (uuid) · requiredtransfers[].createdAtstring · requiredtransfers[].settledAtstring or null · requiredtransfers[].state"pending" | "sent" | "failed" · requiredtransfers[].amountAudMinorinteger · requiredtransfers[].currency"AUD" · requiredtransfers[].stripeTransferIdstring or null · requiredtransfers[].saleIdsstring (uuid)[] · requiredtransfers[].salesAudMinorinteger · requiredtransfers[].clawbacksAudMinorinteger · required
Statuses
200Your transfers.401No key, or not a live one (`INVALID_API_KEY`).429Over the key’s hourly cap.
GET /api/v1/piggyback/offer/{code}
What a partner’s code gives a buyer No key
Public. Whether the code is a live partner’s, and the discount it gives a buyer, in basis points of the price (500 = 5 % off; 0 for none). The order’s answer and Stripe’s page carry the exact amount.
Parameters
codestring · path · required
Answer (200)
foundboolean · requiredcodestringdiscountBpsinteger · requiredownboolean
Statuses
200The offer.422Not a partner code.
Service
Whether it works, and what is deployed.
GET /api/v1/status
Service status No key
Each service the shop depends on (website, payments, eSIM delivery, catalogue, email, sign-in, API, MCP, A2A, site search): its state now, since when, and the last 60 days of checks. Checked once a minute; `unknown` when the checks are more than five minutes old.
Answer (200)
overall"operational" | "degraded" | "down" | "unknown" · requiredcheckedAtstring or null · requiredcomponentsobject[] · requiredcomponents[].idstring · requiredcomponents[].state"operational" | "degraded" | "down" | "unknown" · requiredcomponents[].sincestring or null · requiredcomponents[].checkedAtstring or null · requiredcomponents[].latencyMsinteger or null · requiredcomponents[].daysobject[] · required
Statuses
200The status.
GET /api/v1/health
Liveness No key
Answer (200)
okboolean · requiredbuildstring or null · required: A fingerprint of the build that is live (the first 12 hex characters of the SHA-256 of its commit), for a deploy check that already knows the commit; null on a build made elsewhere. Not the commit itself.
Statuses
200OK
Stuck?
Write to us with what you sent and what came back (never a key or an order token) and a person answers.