Skip to content

Xegora Integration API v1

Issue gift cards & eSIMs in one call

One request places an order, capped at the price you set. A signed webhook tells you when it's ready. Retries never create a second order.

API keys are issued and managed in the merchant dashboard once your workspace is approved.

The lifecycle

How an order flows

Three calls and one signed webhook, the same for gift cards, eSIMs and top-ups.

  1. Find a product

    GET /products

    Search one catalog of gift cards, eSIMs and top-ups, or refresh the products you sell by id.

  2. Place the order

    POST /orders

    Priced and ordered in one call, never above your ceiling. Replaying the same key returns the same order.

  3. Get the webhook

    order.fulfilled

    A signed event tells you the moment fulfillment completes. No polling loops.

  4. Reveal the code

    POST /orders/{id}/fulfillment

    Codes and PINs come from a separate, audited endpoint. Responses are never cached and every reveal is counted.

Quick start

Your language, plain HTTPS

REST and JSON with an X-Api-Key header. No SDK to install. Your first order takes three calls: find, order, reveal.

Base URL
https://myapi.xegora.com/api/v1
Authentication
X-Api-Key
Format
application/json
Rate limit
120 requests per minute per workspace
create-order.ts
const BASE = "https://myapi.xegora.com/api/v1";
const response = await fetch(`${BASE}/orders`, {
method: "POST",
headers: {
"X-Api-Key": process.env.XEGORA_API_KEY!,
"Content-Type": "application/json",
"Idempotency-Key": "order-10231",
},
body: JSON.stringify({
clientReference: "po-10231",
item: { productId, variantId, quantity: 1, currency: "USD" },
maximumTotal: 60.0, // the price your buyer saw
}),
});
const order = await response.json();
// 409 price_above_maximum carries quotedTotal — show the new price instead
console.log(order.status); // "reserved" — wait for "fulfilled", then reveal

API reference

Every core endpoint, with example responses

Example responses that follow the live contract. Pick a row to see one. The full reference is at docs.xegora.com.

Workspace

Catalog

Quotes and orders

POST/api/v1/orders

Order against your prepaid wallet: send the item to price and order it in one call (with an optional maximumTotal), or a quoteId. The Idempotency-Key header is required — a retry returns the same order. Scope: orders.create.

Example response202 Accepted
{
  "id": "0198e000-1111-7abc-9def-222233334444",
  "publicReference": "ord_0198e00011117abc9def222233334444",
  "clientReference": "po-10231",
  "status": "reserved",
  "total": 58.50,
  "currency": "USD",
  "lines": [
    { "productId": "0198d72d-99d6-75a6-9f12-971050ba7a5f", "variantId": "0198d72d-a15b-7cbf-…",
      "productName": "Everyday Digital Gift Card", "variantLabel": "50", "quantity": 1,
      "unitPrice": 58.50, "lineTotal": 58.50, "currency": "USD", "faceValue": 50, "faceCurrency": "EUR" }
  ],
  "createdAtUtc": "2026-09-05T12:01:02Z",
  "updatedAtUtc": "2026-09-05T12:01:02Z"
}

Wallet and deposits

Withdrawals

Everything else is on docs.xegora.com

Schemas for every endpoint, webhook signature checks in three languages, and the OpenAPI 3.1 file.

  • Getting started
  • Authentication
  • Orders & quotes
  • Webhooks
  • Go-live

Built for production

The boring infrastructure you actually want

Idempotent orders

Orders and reveals take an Idempotency-Key header. Send a request three times and you still get one order.

  • POST/api/v1/orders · Idempotency-Key: order-10231ord_0198e000…
  • POST/api/v1/orders · Idempotency-Key: order-10231ord_0198e000…
  • POST/api/v1/orders · Idempotency-Key: order-10231ord_0198e000…

Unified catalog

Gift cards, eSIM plans and top-ups share one schema, one price feed and one order flow.

Signed webhooks

Each event is signed with HMAC-SHA256 and delivered at least once. Deduplicate on its event id.

X-Xegora-Signature
HMAC-SHA256
X-Xegora-Event-Id
0198e000-…
  • order.processing
  • order.under_review
  • order.fulfilled
  • order.failed
  • order.refunded
  • wallet.credited

Least-privilege keys

Give each key only the scopes it needs, an IP allow-list and an expiry. Revoking a key takes effect immediately.

xeg_live_Q3m9TzK1pWbx · allowedCidrCount: 1

  • products.read
  • quotes.create
  • orders.create
  • orders.read
  • wallet.read
  • orders.reveal
  • wallet.deposit-address.write

Catalog built for selection

Filter by category, country or text. Every product comes with redemption steps, priced in your sell currency.

  • query=coffee
  • countryCode=FR
  • publicCategory=gaming
  • amountType=custom
  • sort
  • limit=50

Prefunded wallet

Orders reserve funds from your prepaid balance and capture them on fulfillment. A failed order releases its reservation.

availableBalance
1240.50 USD
reservedBalance
58.50 USD

Pricing

Wholesale prices, no surprises

The quote is the price. Everything else about your commercial terms is agreed when your merchant workspace is set up.

  1. 1. Wholesale prices in your sell currency: the quote's total is exactly what your wallet is charged
  2. 2. No hidden per-call fees; a flat 120 requests/minute rate limit per workspace
  3. 3. Your workspace plan (setup and terms) is agreed at merchant onboarding
  4. 4. Withdrawing unused funds shows the fee, the net amount and the payout date before you confirm
Not a developer?See Xegora for business

Your first order is three calls away

Apply for a workspace from your account. Once it's approved, create API keys in the merchant dashboard.