Build with Nasfam Business
Order digital products, fund your balance with crypto, and follow every order, through one API.
Nasfam Business lets you order digital products for your customers, fund your balance with crypto, and follow every order to its end, through one integration.
It is for businesses that would otherwise integrate each provider themselves, reconcile funding by hand, and chase delivery status order by order.
This documentation is generated from contract 1.0.0-draft.10, so an endpoint, field or code on these pages exists in the contract.
What you can build
Digital Commerce APIs. Sell and deliver digital products without integrating each provider yourself.
| Service | Availability | What it does |
|---|---|---|
| Telegram Stars | Available | Resolve a username and let your customer confirm the account, order an amount of Stars, and follow the order to its end. |
| Telegram Premium | Available | The same flow for 3, 6 or 12 months. In Live, for a workspace allowed to buy it. |
| Quotes | Available | Check a recipient and hold a price for up to 60 seconds. |
| Order management | Available | Create, find and reconcile orders, with one order per idempotency key. |
| Delivery status and webhooks | Available | Read an order, or receive a signed event when it changes. |
| Other digital products | Planned | GET /products lists what can be ordered. The contract names two products. |
Blockchain Infrastructure APIs. Blockchain services through the same integration, as each one opens.
| Service | Availability | What it does |
|---|---|---|
| Reference rates and USD prices | Available | A price book in USD, and the reference rates a quote is priced at. |
| Crypto Payouts API | Sandbox | Send crypto from your USD balance to an approved wallet, checking the address against its network's rules first, through the same account and integration. The sandbox simulates it once Nasfam switches it on there. Live: not yet available. |
Availability labels
| Label | What it means |
|---|---|
| Available | Live and verified in production. |
| Sandbox | Built for the sandbox, on synthetic money. Not live. |
| Beta | Available, and still being tested. |
| Coming soon | Announced. Not available yet. |
| Planned | On the roadmap, with no launch date. |
How it works
- Create a workspace and an API key in your dashboard.
- Fund your account with crypto. Once your deposit is verified, your available balance is updated. In the sandbox it holds test money.
- Quote a recipient, then create an order. Its amount is held on your balance before the response is sent.
- Follow the order to
succeeded,failedorunder_review, by reading it or by webhook.
The API takes no payment from your customer. Orders are paid from your own prepaid balance. Your balance is prepaid service credits in USD. See Funding your account.
Base URL
Every path on these pages is relative to the host of the environment your key belongs to. The examples use https:/, which takes nbk_test_ keys and holds test money only, so no example can reach a real balance. Each environment's host, keys and money are set out in Environments.
How every request works
- Authentication. A bearer token in the
Authorizationheader. See Authentication and keys. - Strict requests. An unknown request field is rejected with
unknown_field. - Extensible responses. Ignore response fields, enum values and event types you do not know; new ones will appear.
- Money. Every figure is exact and its field names its unit: an
amountof 750 is $7.50 in cents, a_microsfield is micro-dollars, a_usdfield is the same figure as a dollar string. Never read one unit as another. Money fields lists them. - Idempotency. A request that changes your balance requires an
Idempotency-Key, bound permanently to the operation it creates. See Idempotency and safe retries. - Unknown outcomes. A timeout means unknown, never failed. Send the same request with the same key. See Recovering from failures.
- Errors. Every error is an RFC 9457 problem with a stable
codeand arequest_id. See Errors. - Lists. Newest first, paged with
limit(1 to 100, default 20) andcursor; the answer carrieshas_moreandnext_cursor. - Ordering. Order events are ordered by the order's
version, which increases by one on every state change, not by timestamps.
Related guides
- Getting started: your first sandbox order, in four steps.
- Orders and statuses: the four states of an order and where your money is in each.
- API reference: every operation, parameter and response.
