{
  "info": {
    "name": "Nasfam Business API (sandbox)",
    "description": "Every operation of contract 1.0.0-draft.10, against the sandbox host with test money. Set NASFAM_SANDBOX_KEY to a sandbox key, kept as a secret. Generated from openapi.json.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{NASFAM_SANDBOX_KEY}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://sandbox-api.nasfampay.com/v1"
    },
    {
      "key": "NASFAM_SANDBOX_KEY",
      "value": ""
    },
    {
      "key": "idempotencyKey",
      "value": "{{$guid}}"
    }
  ],
  "item": [
    {
      "name": "Products",
      "item": [
        {
          "name": "List products",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ]
            },
            "description": "listProducts."
          }
        }
      ]
    },
    {
      "name": "Prices",
      "item": [
        {
          "name": "The USD price book in effect, with indicative GRAM figures",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/prices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "prices"
              ]
            },
            "description": "listPrices. The packages GRAM is sold in, each with its USD price. `indicative_nanogram` is the package at the newest good GRAM/USD\nrate, labelled indicative: what an order charges is its quote's `settlement`. `display_currency` adds an estimated price\nin that currency at a display rate, never charged. A database with no book of its own answers `available: false`.\n`price_basis` says how these prices are set and when they can change; a quote carries its own."
          }
        },
        {
          "name": "The GRAM/USD reference rate GRAM quotes are priced at, and display rates",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rates"
              ]
            },
            "description": "getRates. `gram_usd` is the newest judgement of the GRAM/USD reference rate, as an exact fraction of USD micros per GRAM, with its\nsource time. A quote is priced only while `quotable` is true (before `valid_until`); otherwise quotes are refused\n`503 pricing_unavailable`. `display` rates are indicative and never charged. Each display rate is judged from two\nindependent sources (draft.6): `shown` is true only when it is fresh and they agree within `tolerance_bps`, and\n`judged` is then the figure to show, with its source and label. A page shows no figure when `shown` is false."
          }
        }
      ]
    },
    {
      "name": "Recipients",
      "item": [
        {
          "name": "Look up a Telegram recipient before quoting",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/recipient-lookups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "recipient-lookups"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product\": \"telegram_stars\",\n  \"telegram_username\": \"nasfam_test_ok\",\n  \"quantity\": 50\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createRecipientLookup. Resolves a username to the account the provider found there: its display name and photo, exactly as returned (null where the provider returned none), for your customer to confirm before you quote. Read-only: it never charges, reserves, prices or delivers anything. Cite the lookup's `id` as `recipient_lookup` in `POST /v1/quotes`; it is valid until `expires_at` (10 minutes) and only for the same username, product and selection.\n`found: true` means the provider found an account at that username. It does not verify who the account belongs to: show the name and photo and let your customer confirm. A provider that cannot answer is `503 provider_unavailable` (retry after Retry-After), never `recipient_not_found`.\nDraws on the `lookups` (per key), `lookups_org` and `lookups_daily` (per organisation) buckets, not on the quote buckets. No Idempotency-Key: a repeated lookup is answered from the organisation's own recent answer for the same username, product and selection (found within 30 seconds, not found within 60) without asking the provider again.\nIn the sandbox the nasfam_test_ names in `x-nb-sandbox-scenarios.lookups` choose the answer. In Live every nasfam_test_ name is refused 422 recipient_not_eligible.\nWhen Nasfam turns real lookups on in the sandbox, any other username is looked up through the provider's read-only search (`lookup_source: provider`), within tighter limits: 20 per key or member every 10 minutes, 60 per organisation an hour and 300 a day (`429 rate_limited` with Retry-After); the quote and the order that follow stay synthetic. Otherwise the sandbox's simulator answers (`lookup_source: simulated`).\nCall it from your server: the secret key never goes to a browser or an app."
          }
        },
        {
          "name": "Check a Telegram username before ordering (optional)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/recipients/lookup",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "recipients",
                "lookup"
              ]
            },
            "description": "lookupRecipient. Only a username and a product: whether an account was found at the username and whether the provider refused it for the product. Optional: an order never needs it and never cites it, and it returns no id.\n`product` is asked because the provider's search is per product (Telegram Stars or Premium), and it can refuse an account for one and not the other. `found: true` means an account is at the username, nothing more: it never verifies who owns it, and no Premium status is returned because the provider reports none.\nA definitive answer is 200: `found: false` with `reason: recipient_not_found`, or `found: true` with `eligibility: refused` and `reason: recipient_not_eligible`. A provider that cannot answer is `503 provider_unavailable` with Retry-After, never `found: false`.\nDraws on the same `lookups`, `lookups_org` and `lookups_daily` buckets as `POST /v1/recipient-lookups`; a repeated question is answered from this organisation's own recent answer (found within 30 seconds, not found within 60) without asking the provider again. In the sandbox the `nasfam_test_` names of `x-nb-sandbox-scenarios.lookups` choose the answer; Live refuses every one, 422 `recipient_not_eligible`.\nOn in the sandbox and in Live. Call it from your server."
          }
        }
      ]
    },
    {
      "name": "Quotes",
      "item": [
        {
          "name": "Verify a recipient and lock a price for up to 60 seconds",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/quotes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "quotes"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product\": \"telegram_stars\",\n  \"telegram_username\": \"nasfam_test_ok\",\n  \"quantity\": 50,\n  \"recipient_lookup\": \"rlk_01K7SAMP000000000000000090\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createQuote. Cite the recipient lookup your customer confirmed as `recipient_lookup` (recommended). The quote is then refused unless the lookup is this organisation's (`404 not_found` otherwise), unexpired (`409 lookup_expired`) and for the same username, product and selection, and the account the provider finds at the username now is the one the lookup found (`409 recipient_mismatch`). Without it the quote checks the recipient itself, as before. `recipient_lookup` is not part of the Idempotency-Key's request: a replay returns the first quote as it was made.\nIn the sandbox, nasfam_test_missing is refused 422 recipient_not_found and every other nasfam_test_ recipient chooses the order's outcome (x-nb-sandbox-scenarios). In Live every nasfam_test_ recipient is refused 422 recipient_not_eligible."
          }
        }
      ]
    },
    {
      "name": "Orders",
      "item": [
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ]
            },
            "description": "listOrders."
          }
        },
        {
          "name": "Create an order (funds are reserved before the response)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product\": \"telegram_stars\",\n  \"username\": \"nasfam_test_ok\",\n  \"quantity\": 50,\n  \"reference\": \"TEST-0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createOrder. Order from a quote (`quote_id`), or directly (`product`, `telegram_username`, `max_amount`). A direct order makes its own quote, so it draws on the organisation's `quotes` and `quotes_daily` buckets as well as `orders`, a replay of it included.\nThe quickest order (draft.10, a USD organisation): `{\"product\": \"telegram_stars\", \"username\": \"@customer\", \"quantity\": 100}` or `{\"product\": \"telegram_premium\", \"username\": \"@customer\", \"months\": 3}`, with an Idempotency-Key. Nothing else is needed: no quote, no lookup, no id. In one step the server checks the recipient, prices the order from the same price book and functions a quote uses, checks your limits and available balance, and holds the exact amount. A price it cannot determine from fresh figures is `503 pricing_unavailable` and nothing is held. `max_amount` (optional, USD in cents) is a ceiling: an order that would cost more is refused `409 price_changed` at `/max_amount` and nothing is held. The order answered is the one `GET /v1/orders/{id}` returns; its `product` is the full product id (`telegram_stars`, `telegram_premium`) whichever name you sent. It draws on the `quotes` buckets as a direct order does.\nRetrying with the same Idempotency-Key and the same order (the same product, normalised username and selection, `max_amount`, `reference` and `metadata`) returns the first order (200, Idempotent-Replayed) and never holds or delivers twice; the same key with a different order is `422 idempotency_key_reused`. On in the sandbox and in Live, for an organisation that spends USD or GRAM; one still on its legacy currency orders from a quote. The recipient is resolved inside the order, so it needs no lookup even where Nasfam requires one for quotes.\nThe safe flow: look the recipient up (`POST /v1/recipient-lookups`), let your customer confirm, quote citing the lookup, then order with an `Idempotency-Key`. The order shows its lookup as `recipient_lookup`. A lookup past `expires_at` refuses the order with `409 lookup_expired` and nothing is held; look the recipient up again. A retry with the same key and body returns the first order, however old its lookup.\nIn the sandbox, the recipient chooses the outcome: each `nasfam_test_` recipient's statuses, events and balance transactions are listed in `x-nb-sandbox-scenarios`. In Live every `nasfam_test_` recipient is refused `422 recipient_not_eligible`."
          }
        },
        {
          "name": "Retrieve an order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/orders/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "getOrder."
          }
        }
      ]
    },
    {
      "name": "Balance",
      "item": [
        {
          "name": "Available, held and pending-funding balances",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/balance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "balance"
              ]
            },
            "description": "getBalance. The authoritative figures are the ledger's, each in its own currency, and are unchanged by anything about display.\n`display` adds an indicative equivalent of the available balance in the display currency (the workspace default for\nan API key, then the declared country's currency when served, then USD), with the rates, sources and time it was\ndrawn from. It shows a figure only when every rate used is fresh and two independent sources agree."
          }
        },
        {
          "name": "Every movement on the balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/balance/transactions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "balance",
                "transactions"
              ]
            },
            "description": "listBalanceTransactions."
          }
        }
      ]
    },
    {
      "name": "Limits",
      "item": [
        {
          "name": "The platform's limits, the workspace's own spending limits and what they have used",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/limits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "limits"
              ]
            },
            "description": "getLimits. Needs `limits:read`. The platform's limits are set by Nasfam and count Africa/Lagos days whatever the workspace zone. The\nworkspace's limits count commitments: an order reserves its charge when it is accepted and gives it back only when it is\nreleased (failed with evidence, or never submitted). `enforced` is true only for a blocking limit while enforcement is on,\nin a USD workspace. An order a limit refuses answers 422 `spending_limit_reached`. Amounts are micro-dollars\n(1 USD = 1,000,000) as integer strings."
          }
        }
      ]
    },
    {
      "name": "Statements",
      "item": [
        {
          "name": "The workspace's statements, newest first",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/statements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "statements"
              ]
            },
            "description": "listStatements. Needs `statements:read`."
          }
        },
        {
          "name": "Request an account statement for whole local days",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/statements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "statements"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"2026-10-01\",\n  \"to\": \"2026-10-10\",\n  \"formats\": [\n    \"csv\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createStatement. Needs `statements:read`. `from` and `to` are local dates in the workspace's finance zone, `to` excluded and at most the current day,\nat most 366 days. The server prepares the statement once the period is complete and reconciles it before any file exists:\nopening plus every movement must equal the closing recomputed from the ledger, or it fails with `reconciliation_failed`.\nCSV always, PDF only where the server offers it. The files are downloaded from the dashboard. Amounts are micro-dollars (1 USD = 1,000,000) as integer strings, and\nexact dollars to six decimals in the CSV. A retry with the same Idempotency-Key answers the same statement."
          }
        },
        {
          "name": "One statement, its state and, once ready, its reconciled summary",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/statements/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "statements",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "getStatement. Needs `statements:read`. Another workspace's statement is 404, as an unknown one."
          }
        }
      ]
    },
    {
      "name": "Funding",
      "item": [
        {
          "name": "Incoming transfers and their state",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/fundings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "fundings"
              ]
            },
            "description": "listFundings."
          }
        },
        {
          "name": "Your organisation's Gram (GRAM) deposit address on the TON network",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/funding/deposit-address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "funding",
                "deposit-address"
              ]
            },
            "description": "getDepositAddress. One address per organisation, allocated on the first request and never changed. It is `preparing` until the server has recomputed it independently from the custody key and found it unused on chain, and only then shown, in its non-bounceable form (UQ on mainnet, 0Q on testnet). Send only native GRAM on TON: tokens, NFTs and other networks are not credited. A deposit is credited once the TON network has finalised it and two independent sources agree."
          }
        },
        {
          "name": "GRAM deposits to your address, and their state",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/funding/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "funding",
                "deposits"
              ]
            },
            "description": "listGramDeposits."
          }
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "Event log (30-day retention)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "events"
              ]
            },
            "description": "listEvents."
          }
        },
        {
          "name": "Retrieve an event",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/events/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "events",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "getEvent."
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints"
              ]
            },
            "description": "listWebhookEndpoints."
          }
        },
        {
          "name": "Create a webhook endpoint (the secret is returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/webhooks/nasfam\",\n  \"events\": [\n    \"order.succeeded\",\n    \"order.failed\",\n    \"order.under_review\",\n    \"funding.credited\"\n  ],\n  \"description\": \"Order updates\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createWebhookEndpoint."
          }
        },
        {
          "name": "getWebhookEndpoint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id"
              ]
            },
            "description": "getWebhookEndpoint."
          }
        },
        {
          "name": "updateWebhookEndpoint",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enabled\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "updateWebhookEndpoint."
          }
        },
        {
          "name": "deleteWebhookEndpoint",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id"
              ]
            },
            "description": "deleteWebhookEndpoint."
          }
        },
        {
          "name": "Issue a new secret. Both secrets sign for 24 hours.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id/rotate-secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id",
                "rotate-secret"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "rotateWebhookSecret."
          }
        },
        {
          "name": "listWebhookDeliveries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id",
                "deliveries"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "listWebhookDeliveries."
          }
        },
        {
          "name": "Resend the same event (same webhook-id). Never creates a financial event.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-deliveries/:id/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-deliveries",
                ":id",
                "replay"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "replayWebhookDelivery. Re-arms the same delivery: the same event and webhook-id, a new timestamp and signature, its attempts numbered on and\nits retry schedule started again. It never creates an event, an order or a balance movement. A delivery whose endpoint\nis disabled is `400 invalid_request` (nothing would be sent: enable the endpoint first), as a test event to it is; one of\nan event created more than 30 days ago is `400 invalid_request`, and an endpoint's deliveries are replayed at most 10 times in any hour\nand one delivery at most 3 times in any day (`429 rate_limited` with Retry-After). A delivery being attempted right\nnow is left to finish. Each replay is audited."
          }
        },
        {
          "name": "Send one test event of a type the endpoint subscribes to. It is marked and synthetic, and never a real order or funding.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"order.succeeded\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "sendWebhookTestEvent. The event is signed under the endpoint's secrets and delivered, retried and listed in its deliveries exactly as a real event is, so a receiver's signature verification is checked before a real order. Its envelope says `\"test\": true` and its id is an `evt_` ULID dated 1970-01-01 (`evt_0000000000...`), which no real event has. Its object is shaped as the event type's real object (the Order of an `order.*` event, the Funding of `funding.credited`) with the all-zero id (`ord_00000000000000000000000000`, `fnd_00000000000000000000000000`): fetching it is 404, so a receiver that fetches the object before releasing value releases nothing. `order.failed` carries `status_reason: provider_rejected` and `order.under_review` `outcome_unconfirmed`. It is not in the event log, reaches no other endpoint and creates no order, funding or balance movement. A type the endpoint does not subscribe to (`param: /type`), or a disabled endpoint, is `400 invalid_request`. An endpoint takes at most 20 test events in any hour; the next is `429 rate_limited` with Retry-After. Each request sends one test event: there is no Idempotency-Key."
          }
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "getAccount",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/account",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account"
              ]
            },
            "description": "getAccount."
          }
        }
      ]
    },
    {
      "name": "Sandbox",
      "item": [
        {
          "name": "Simulate a GRAM deposit to your address (sandbox host only; 404 in production)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/sandbox/funding/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "funding",
                "deposits"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount_nanogram\": \"5000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createSandboxGramDeposit. Synthetic money, on no chain. The deposit is judged by the same rules as a real one (below the minimum it needs attention and is not credited), then booked by the same journal. A retry with the same Idempotency-Key returns the original deposit and credits nothing."
          }
        },
        {
          "name": "Simulate a GRAM deposit to your address (sandbox host only; 404 in production)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/sandbox/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "deposits"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"asset\": \"GRAM\",\n  \"amount_nanogram\": \"5000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createSandboxDeposit. Synthetic money, on no chain. GRAM, judged by the same rules as a real deposit: below the minimum it needs attention and is not credited. It is then booked by the same journal as a real one. A retry with the same Idempotency-Key returns the original deposit and credits nothing."
          }
        },
        {
          "name": "The organisation's test runs, newest first (sandbox host only). Kept 30 days.",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/sandbox/test-runs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "test-runs"
              ]
            },
            "description": "listSandboxTestRuns. Needs `orders:read`."
          }
        },
        {
          "name": "Run a simulated order through the integration steps (sandbox host only; 404 in production). Writes no order and moves no money.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/sandbox/test-runs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "test-runs"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"scenario\": \"succeeded\",\n  \"order\": {\n    \"product\": \"telegram_stars\",\n    \"quantity\": 50,\n    \"reference\": \"TEST-0001\",\n    \"telegram_username\": \"nasfam_test_ok\",\n    \"max_amount\": {\n      \"amount\": 100,\n      \"currency\": \"USD\"\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "createSandboxTestRun. Needs `sandbox:write`. `order` is validated exactly as `createOrder` validates its body, so a malformed order is\nrefused `400` as an order would be, and no run is made. The key, the contract and the product's availability are\nchecked for real; acceptance, processing and the outcome are the scenario's, simulated, against the order id\n`ord_00000000000000000000000000`, which no order can have. No balance, statement, order list, provider or chain\nis touched. With `webhook_endpoint_id`, one test event of the outcome's type (`\"test\": true`, synthetic object) is\nsigned and delivered to that endpoint as any event is, and the run shows its real answer. Read the run back with\nthis key (`getSandboxTestRun`) to pass its status-retrieval step. At most 60 runs an hour per organisation; the\nwebhook part also spends the endpoint's 20 test events an hour."
          }
        },
        {
          "name": "One test run (sandbox host only). The first read with a key passes the run's status_retrieval step.",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/sandbox/test-runs/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "test-runs",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            },
            "description": "getSandboxTestRun. Needs `orders:read`. Another organisation's run is `404 not_found`, exactly like an unknown id."
          }
        }
      ]
    }
  ]
}
