{
  "info": {
    "_postman_id": "2ca4083b-ef00-4227-a73e-0f77ca786a78",
    "name": "Tizon Mobile API",
    "description": "eSIMs and mobile top-ups, paid from a closed-loop USD wallet.\n\n**Setup**\n1. Sign up at https://tizon.mobile/dashboard and copy your test key (`tz_test_…`).\n2. Open this collection's **Variables** tab and paste it into `apiKey`.\n3. Send **Offers → List offers**.\n\nEvery request sends `Authorization: Bearer {{apiKey}}`. The key decides the mode, so the same `baseUrl` serves the sandbox and live money.\n\nRequests that move money send `Idempotency-Key: {{$guid}}`, a fresh value on every send. To see a retry return the original response, replace it with a fixed value.\n\nBuilt from https://docs.tizon.mobile/openapi.json (v0.4.0). Guides and the full reference: https://docs.tizon.mobile/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.tizon.mobile",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string",
      "description": "A tz_test_ key for the sandbox, or tz_live_ for real money."
    }
  ],
  "item": [
    {
      "name": "Offers",
      "description": "The catalog: eSIM plans and mobile top-ups, each with the price your wallet will\nbe debited. Prices are USD; ask for a `display_currency` to show an indicative\nlocal amount alongside.",
      "item": [
        {
          "name": "List offers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/offers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "offers"
              ],
              "query": [
                {
                  "key": "category",
                  "value": "esim",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "country",
                  "value": "JP",
                  "description": "ISO 3166-1 alpha-2, case-insensitive.",
                  "disabled": true
                },
                {
                  "key": "display_currency",
                  "value": "NGN",
                  "description": "Adds an indicative `display` amount in this currency to every offer.\nPresentation only, never a settlement amount. `USD` adds nothing, since\n`price` is already USD. A currency with no rate is\n`400 unsupported_display_currency`.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "The offers this key's mode can buy, paged. Filter by `category` and `country`.\nPrices already include Tizon's margin: `price` is what a quote will debit.\n\nAn offer the provider has stopped selling is left out of this list, but can\nstill be retrieved, so an old order can be explained."
          },
          "response": []
        },
        {
          "name": "Retrieve an offer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/offers/:offer_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "offers",
                ":offer_id"
              ],
              "query": [
                {
                  "key": "display_currency",
                  "value": "NGN",
                  "description": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "offer_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One offer, including one the provider has withdrawn (`status: withdrawn`), which\ncan no longer be bought."
          },
          "response": []
        },
        {
          "name": "List countries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/countries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "countries"
              ],
              "query": [
                {
                  "key": "category",
                  "value": "esim",
                  "description": "Count only offers in this category.",
                  "disabled": true
                }
              ]
            },
            "description": "Every country with an offer this key's mode can buy, A to Z, with how many\noffers it has. Build a country picker from it, then fetch a country's offers\nwith `GET /v1/offers?country=`. Not paged: there are at most a few hundred.\n\nA regional or global bundle covers no single country, so it counts towards\nnone here. It is still listed by `GET /v1/offers`, with `coverage: null`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Wallet",
      "description": "The account's closed-loop USD balance: what it holds, what it can spend, and\nevery movement. Funding credits it, purchases debit it, nothing else moves it.",
      "item": [
        {
          "name": "Retrieve the wallet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet"
              ]
            },
            "description": "The wallet for the account the API key belongs to, in the key's mode. Every\naccount has exactly one wallet per mode."
          },
          "response": []
        },
        {
          "name": "List wallet movements",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet/ledger",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet",
                "ledger"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Every credit and debit on the wallet, newest first, each with the balance it\nleft behind. This is the customer-facing view of the ledger entries that are\nthe source of truth for the balance."
          },
          "response": []
        },
        {
          "name": "Retrieve the wallet's aging",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet/aging",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet",
                "aging"
              ]
            },
            "description": "What the account owes and how old that debt is. Credits pay down debits oldest\nfirst (FIFO), so the oldest open debit is the first purchase the wallet's\ncredits have not fully covered yet. It is due `net_terms_days` after it was\nmade, and once it is past due the account is `overdue`. Paying down the\noldest debits clears it, even if the balance is still negative."
          },
          "response": []
        },
        {
          "name": "List funding destinations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet/addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet",
                "addresses"
              ],
              "query": [
                {
                  "key": "asset",
                  "value": "USDT",
                  "description": "With `network`, list only this asset's address on it.",
                  "disabled": true
                },
                {
                  "key": "network",
                  "value": "bep20",
                  "description": "With `asset`. USDC is not accepted on `trc20` (`400\nunsupported_network`); one without the other is `400\ninvalid_query_parameter`.",
                  "disabled": true
                }
              ]
            },
            "description": "The standing places this account pays into: a bank account and a stablecoin\naddress per accepted asset and network. They are the same for every payment,\nand anything sent to them credits the wallet. Test and live destinations are\ndifferent; never send real money to a test destination.\n\nDestinations are created on the first request. Naming an `asset` and a\n`network` asks for that one address alone and creates no other, which is the\nway to show a payer one address. If a destination cannot be created right\nnow, the response is `502 rail_unavailable`: retry shortly."
          },
          "response": []
        },
        {
          "name": "Create a Lightning invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 2000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/wallet/lightning_invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet",
                "lightning_invoices"
              ]
            },
            "description": "Mints a BOLT11 invoice to top the wallet up by any amount. Paying it credits the\nwallet in USD, and the credit then pays for whatever is waiting on it, exactly as\na stablecoin deposit does.\n\nThe invoice is denominated in USD by a USD-settling receiver: the payer sends\nsatoshis, and the wallet is credited `amount` whatever the rate does in between.\n`amount_sats` is indicative only.\n\nUnlike a funding destination, an invoice is for one amount and expires, so this\nmints a new one each time and takes an `Idempotency-Key`. To pay for a single\npurchase without topping up first, use `payment_source: lightning` on a quote\ninstead.\n\nIf no invoice can be minted right now, nothing is created and the response is\n`502 rail_unavailable`: retry shortly."
          },
          "response": []
        },
        {
          "name": "List deposits",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet",
                "deposits"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Money that arrived through a funding destination, newest first: stablecoin\ndeposits and bank transfers. A stablecoin deposit is `detected` once the\nprovider sees it and `credited` once it confirms; only then does it count\ntoward the balance. Until then it shows in the wallet's `pending_credit`. A\nbank transfer is credited on arrival."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Account",
      "description": "The account an API key belongs to, and its credit terms: how far below zero the\nwallet may go, and for how long.",
      "item": [
        {
          "name": "Retrieve the account",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/account",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "account"
              ]
            },
            "description": "The account the API key belongs to, with its credit terms in the key's mode.\nCredit terms are provisioned by Tizon, not through the API. An account that is\n`overdue` has its overdraft frozen until the debts past terms are paid down."
          },
          "response": []
        },
        {
          "name": "List the account's statement",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/account/ledger",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "account",
                "ledger"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Every movement on the account's two balances in the key's mode, newest first:\nthe wallet, which it spends from, and the Revenue Centre, which holds what it\nhas earned. Each line says which balance moved and what that balance was left\nat, so the statement reads the same way a bank statement does.\n\nA line that belongs to an order carries the order: what the account was\ncharged, what it earned on it and the rate that earned it. `earned` is this\naccount's own share of the price. What Tizon paid its supplier is not part of\nany response, here or anywhere else (adr/0033)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Quotes",
      "description": "A quote prices an offer and pays for it. Paying from the wallet debits it\nimmediately and creates an order, which is fulfilled in the background. Paying\nwith stablecoins or a bank transfer returns where to send the money, and the\nquote waits in `awaiting_funds` until a payment lets the wallet cover it, even\nwhen the wallet already holds enough.",
      "item": [
        {
          "name": "Buy an offer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"offer_id\": \"off_jp_5gb_30d\",\n  \"payment_source\": \"wallet\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/quotes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "quotes"
              ]
            },
            "description": "Prices the offer and pays for it.\n\n**`payment_source: wallet`.** If the wallet (including any overdraft) covers\nthe price, it is debited at once, the quote is `fulfilled`, and an order is\ncreated and fulfilled in the background: poll the order or wait for its\nwebhook. If not, nothing is charged and the response is `402`. While the\naccount is overdue its overdraft is frozen, and the response is\n`403 account_overdue` until the debits past their terms are paid down.\n\n**`usdt`, `usdc` or `bank_transfer`.** The quote is `awaiting_funds` and\n`payment` says where to send `price`. A stablecoin quote names the `network`\nit will be paid on, and `payment` gives the account's address on that network.\nIt waits even when the wallet already holds enough: money already there is\nspent only with `payment_source: wallet`. Every payment credits the wallet, and\nwaiting quotes are then paid from the balance (never from an overdraft): the\none priced exactly at what arrived first, then the oldest that fit.\nUnpaid by `expires_at`, it becomes `expired`; money that arrives later stays\nin the wallet.\n\nIf the offer cannot be priced right now, nothing is created or charged and the\nresponse is `502 fulfillment_unavailable`: retry shortly. If the rail fails\nwhile the quote is being readied (giving the account a deposit address, or\nminting a Lightning invoice), the response is `502 rail_unavailable`: retry\nshortly, or pick another `payment_source`."
          },
          "response": []
        },
        {
          "name": "Retrieve a quote",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/quotes/:quote_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "quotes",
                ":quote_id"
              ],
              "variable": [
                {
                  "key": "quote_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": ""
          },
          "response": []
        },
        {
          "name": "Cancel a quote",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/quotes/:quote_id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "quotes",
                ":quote_id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "quote_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Stops a quote waiting for funds. Money that arrives afterwards is credited to\nthe wallet as usual and simply does not pay for this quote. Cancelling a\ncancelled quote returns it unchanged. A paid quote is `409 already_fulfilled`;\na lapsed one is `409 quote_expired`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Orders",
      "description": "The fulfillment of a paid quote, and its eSIM or top-up receipt.",
      "item": [
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "orders"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Every order this account has placed, newest first, with its deliverable once it\nis fulfilled."
          },
          "response": []
        },
        {
          "name": "Retrieve an order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/orders/:order_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "orders",
                ":order_id"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "An order starts `pending` and ends `fulfilled`, with its deliverable, or\n`failed`, in which case the price has been credited back to the wallet."
          },
          "response": []
        },
        {
          "name": "Retrieve an eSIM's data usage",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/esims/:iccid/usage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "esims",
                ":iccid",
                "usage"
              ],
              "variable": [
                {
                  "key": "iccid",
                  "value": "",
                  "description": "The `iccid` from the order's eSIM profile."
                }
              ]
            },
            "description": "How much data is left on each active and queued plan on an eSIM, measured when\nyou ask. Nothing is pushed when usage changes, so call this when you need the\nfigure, such as when a customer opens their eSIM, rather than on a timer.\n\nThe eSIM must have been issued by one of this account's own orders. Any other\nICCID, including one this account has only topped up, is `404 esim_not_found`.\nIf usage cannot be read right now the answer is `502 fulfillment_unavailable`:\nretry shortly.\n\nIn sandbox the figures are simulated from what was bought: the oldest plan\nstill within its validity is `active` with a quarter of its data used, and any\nbought after it are `queued`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Test helpers",
      "description": "Sandbox tools that make things happen without real money. Test keys only; a live\nkey gets `403 test_mode_only`. Each one asks the sandbox provider for the signed\nwebhook it would have sent and runs it through the real ingestion path.",
      "item": [
        {
          "name": "Simulate a stablecoin deposit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 5000,\n  \"asset\": \"USDT\",\n  \"network\": \"bep20\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "deposits"
              ]
            },
            "description": "Pretends a stablecoin deposit arrived at this account's address. By default it\nis confirmed at once and credits the wallet; with `status: detected` it waits,\ncounted in `pending_credit`, until you confirm it."
          },
          "response": []
        },
        {
          "name": "Confirm a detected deposit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/deposits/:deposit_id/confirm",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "deposits",
                ":deposit_id",
                "confirm"
              ],
              "variable": [
                {
                  "key": "deposit_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The chain confirms a deposit that was only detected, which credits the wallet.\nA deposit that is already credited is `409 deposit_already_credited`."
          },
          "response": []
        },
        {
          "name": "Simulate a bank transfer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 5000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/bank_transfers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "bank_transfers"
              ]
            },
            "description": "Pretends a bank transfer landed in this account's virtual account. Bank\ntransfers are final on arrival, so the wallet is credited at once."
          },
          "response": []
        },
        {
          "name": "Pay a Lightning invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/lightning_invoices/:invoice_id/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "lightning_invoices",
                ":invoice_id",
                "pay"
              ],
              "variable": [
                {
                  "key": "invoice_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Pretends a customer's wallet paid this invoice. The wallet is credited the\ninvoice's USD amount and any quote it was minted for is settled, exactly as a\nreal payment would. Only a `pending` invoice can be paid.\n\n`invoice_id` is the invoice's `lni_` id: `id` on an invoice from\n`POST /v1/wallet/lightning_invoices`, or `payment.lightning.id` on a quote with\n`payment_source: lightning`. A `bolt11` or `payment_hash` is\n`404 invoice_not_found`."
          },
          "response": []
        },
        {
          "name": "Resolve a pending order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcome\": \"fulfilled\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/orders/:order_id/complete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "orders",
                ":order_id",
                "complete"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The provider resolves an order that is still `pending`, as the sandbox offer\n`off_test_stays_pending` always is. `failed` credits the price back to the\nwallet. An order that is already resolved is `409 order_already_resolved`."
          },
          "response": []
        },
        {
          "name": "Set sandbox credit terms",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"overdraft_limit\": {\n    \"amount\": 50000,\n    \"currency\": \"USD\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/credit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "credit"
              ]
            },
            "description": "Grants this account test-mode credit, as Tizon would in live: an overdraft\nlimit up to $10,000, and net terms (kept as they are when omitted, 30 days for\nan account with none). Zero net terms make any debt overdue at once, so the\noverdraft freeze can be tried without waiting. Every change is announced as\n`credit.updated`. Moves no money, so it takes no `Idempotency-Key`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Endpoints Tizon delivers events to. Register a URL, keep the secret it returns,\nand verify the `Tizon-Signature` header on every delivery.",
      "item": [
        {
          "name": "Register a webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://api.example.com/tizon/webhooks\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints"
              ]
            },
            "description": "Registers an HTTPS URL for this account and mode, and returns its signing\n`secret` once. Store the secret: it is never shown again, and every delivery is\nsigned with it.\n\nThe URL must be `https://` and publicly reachable, in test mode as well as live;\n`localhost` and private ranges are refused (`400 invalid_webhook_url`). Use a\ntunnel to receive sandbox events on a laptop. Registering the same URL twice for\none account is `409 webhook_url_in_use`."
          },
          "response": []
        },
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints"
              ]
            },
            "description": "This account's endpoints in this mode. Secrets are never listed."
          },
          "response": []
        },
        {
          "name": "Retrieve a webhook endpoint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": ""
          },
          "response": []
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Stops delivery to this endpoint. Its delivery history stays readable, and the\nsame URL can be registered again afterwards."
          },
          "response": []
        },
        {
          "name": "Rotate a webhook endpoint secret",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id/rotate_secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id",
                "rotate_secret"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Issues a new signing secret and returns it once. Deliveries are signed with the\nnew secret immediately, so deploy it before rotating."
          },
          "response": []
        },
        {
          "name": "List deliveries to an endpoint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id",
                "deliveries"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "What Tizon tried to send this endpoint and what it answered, newest first, with\nthe last ten attempts of each. Use it when an event did not arrive."
          },
          "response": []
        },
        {
          "name": "Send a test event",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id/ping",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id",
                "ping"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Delivers a `ping` event to this endpoint, whatever it subscribes to, so a new\nintegration can prove its receiver and its signature check work. Returns the\nevent; delivery happens in the background."
          },
          "response": []
        },
        {
          "name": "List events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "events"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "order.fulfilled",
                  "description": "One event type, for example `order.fulfilled`.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Everything that happened on this account in this mode, newest first, whether or\nnot an endpoint was subscribed at the time. Filter by `type`."
          },
          "response": []
        },
        {
          "name": "Retrieve an event",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/events/:event_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "events",
                ":event_id"
              ],
              "variable": [
                {
                  "key": "event_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The event as it was delivered, including its `data.object`."
          },
          "response": []
        },
        {
          "name": "Replay an event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/events/:event_id/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "events",
                ":event_id",
                "replay"
              ],
              "variable": [
                {
                  "key": "event_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Sends a stored event again. The event keeps its id, so a receiver that already\nprocessed it will recognise it; the deliveries are new. It goes to every\nendpoint subscribed now, so an endpoint registered after the fact can catch up,\nor to one endpoint if you name it."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Revenue",
      "description": "A partner's Revenue Centre: what they have earned on the orders they brought,\nand turning it into credit they can spend.",
      "item": [
        {
          "name": "Retrieve the Revenue Centre",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/revenue",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue"
              ]
            },
            "description": "Every account earns a share of the price of every order it has fulfilled,\naccrued as it is fulfilled. The rate is the volume tier the last 30 days\nearned — under $5,000 is Standard at 15%, $5,000 to $50,000 is Growth at\n17.5%, above that is Scale at 20% — and nobody at Tizon sets it.\n\n`balance` is what is owed right now; moving it into the wallet turns it into\ncredit that buys eSIMs like any other. An account that has bought nothing has\na Revenue Centre with nothing in it, not a missing one."
          },
          "response": []
        },
        {
          "name": "List what earned, and what was moved",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/entries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "entries"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Every accrual and every transfer out, newest first. An `earned` entry names\nthe order that earned it and the rate in force at the time, so a past number\nexplains itself."
          },
          "response": []
        },
        {
          "name": "Move earnings into the wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/transfers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "transfers"
              ]
            },
            "description": "Turns earned commission into spendable wallet credit. Omit `amount` to move\neverything. What Tizon owed the partner stops being a payable and becomes\ncredit the closed loop governs like any other: it buys eSIMs, and it does not\ncome back out. To be paid in bitcoin instead, use `POST /v1/revenue/payouts`."
          },
          "response": []
        },
        {
          "name": "Set where earnings are paid",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/payout_address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "payout_address"
              ]
            },
            "description": "Where payouts go: a Lightning address such as `you@getalby.com`, a stablecoin\naddress (`crypto_address`), or both. Send either to change only that one; the\nother is left as it is. A Lightning address is checked for shape and for\npointing somewhere public, and a stablecoin address for the shape its network\nuses; whether anything answers there is found out by the first payout. A payout\nalready asked for keeps the address it was asked for with. Moves no money, so\nit takes no `Idempotency-Key`."
          },
          "response": []
        },
        {
          "name": "Preview a payout",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/payout_quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "payout_quote"
              ],
              "query": [
                {
                  "key": "method",
                  "value": "lightning",
                  "description": "Which way to pay out; `lightning` when left out.",
                  "disabled": true
                }
              ]
            },
            "description": "What `POST /v1/revenue/payouts` would pay out by `method` right now: everything\npayable, the network fee taken from it, what arrives, and where. Asks the rail\nfor the fee, so it can be `502 rail_unavailable`; it moves nothing and reserves\nnothing, and the fee is quoted again when the payout is asked for. No address\nfor that method is `409 payout_address_required`."
          },
          "response": []
        },
        {
          "name": "Pay earnings out",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A client-generated key, unique per intended operation, that makes this request\nsafe to retry. The same key returns the original response; the same key with a\ndifferent request is rejected. Missing: `400 idempotency_key_required`."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "payouts"
              ]
            },
            "description": "Pays earnings out. Omit `amount` to pay out everything payable.\n\n`method` says where (adr/0056). `lightning`, the default, pays the account's\nLightning address in satoshis worth the amount when the invoice is made; the\nrouting fee is Tizon's, and the address receives the whole amount. `crypto`\nsends the stablecoin and network of the account's `crypto_address`, less the\nnetwork fee, which is quoted when the payout is asked for and shown as\n`network_fee`; `GET /v1/revenue/payout_quote` shows it beforehand. Lightning\npayouts start at $1.00 and stablecoin payouts at $10.00.\n\nWhat is payable is the Revenue Centre's balance less any overdraft the wallet\nhas drawn: Tizon never sends out money the account owes back.\n\nThe payout is taken from the balance at once, so it cannot be spent twice, and\ncomes back `awaiting_approval`: Tizon reviews every payout by hand and sends it\nwithin two business days (adr/0055). Once approved it is `pending` while it is\nsent, and ends `succeeded`, or `failed` with the money returned to the Revenue\nCentre; `payout.succeeded` and `payout.failed` say which. A payout turned down\nfails with `failure_reason` `rejected`, and its money is returned the same way.\nPayouts may be off on Tizon's side (`503 payouts_unavailable`), which never\ntouches what has been earned."
          },
          "response": []
        },
        {
          "name": "List payouts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "payouts"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Maximum items to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` from a previous page.",
                  "disabled": true
                }
              ]
            },
            "description": "Every payout this account has asked for, newest first."
          },
          "response": []
        },
        {
          "name": "Retrieve a payout",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/revenue/payouts/:payout_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "revenue",
                "payouts",
                ":payout_id"
              ],
              "variable": [
                {
                  "key": "payout_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": ""
          },
          "response": []
        }
      ]
    }
  ]
}
