Skip to content
Nasfam Business

Appearance

Security

How we protect access to your account, the money behind every order and the systems that run them. Every safeguard on this page is in our code and covered by a test.

01API security

Every request proves itself.

A key is checked before anything else runs, and checked again inside the transaction that does the work.

  • Test and Live never meet

    They never share a database or a key. A Live key is refused by the test API, and every database connection checks which environment it serves.

  • A secret is shown once

    You see a key's secret when you create it. We keep only a keyed hash of it, compared in fixed time.

  • A key holds only what you give it

    You choose its permissions when you create it. There is no wildcard, and an operation is refused to a key without the permission it needs.

  • A revoked key stops at once

    It is refused from its very next request.

  • A request matches the contract, or it is refused

    A body over 16 KB, an unknown field or a value of the wrong type is refused, never dropped or guessed at.

  • Requests are rate limited

    Per key and per business across every server, and repeated wrong secrets for one key are cut off from every address at once.

A request through its checksExampleAn order request, checked in the order the API checks it. A check that fails ends the request there, and no order is made.
POST /v1/ordersAuthorization: Bearer nbk_test_…
  1. Key format and environment

    Read before the database is asked. A Live key stops here in test.

  2. Matches the contract

    At most 16 KB, with no unknown field and no value guessed.

  3. Key verified, within its limit

    The database checks the key's hash and takes one request from its allowance.

  4. Permission held

    Placing an order needs orders:write.

  5. One transaction

    The key is verified again, then the order is written and its amount held, together.

202Accepted

A key limited to what it needsExampleA key made for reporting can read orders. Asked to place one, it is refused before any work.

ReportingTest key

  • orders:read
  • balance:read
  1. GET /v1/orders200OK
  2. POST /v1/orders403insufficient_scope

    This key lacks orders:write. Nothing is held.

02Account and team

Your team gets in, and only as far as its role.

Sign-in, sessions and permissions are decided by the server on every request, never by the browser.

  • Every sign-in is verified

    Each one is checked with our identity provider, a new account needs a verified email, and attempts are limited per address and per person.

  • Sessions end on time

    Sign-in uses a cookie that page scripts cannot read. A session ends after 30 minutes idle or 12 hours, and signing out ends it on the server.

  • Changes come only from your dashboard

    Every change carries a token bound to your session, and a request from any other site is refused.

  • Sensitive changes ask you to sign in again

    Creating or rotating a key, changing a webhook endpoint, and inviting, changing or removing a member each need a sign-in from the last five minutes.

  • Five roles, checked every time

    Owner, Admin, Developer, Finance and Viewer. The role is read from the database on each request, so a change applies at the very next one.

  • A removed member is out at once

    Their next request is refused, and the invitations they sent stop working.

  • Each business sees only its own data

    The database enforces it on every row, and takes the business from the verified key or session, never from the request.

03Orders and money

An order is paid for once.

Its amount is held before it runs, and taken or returned only once the result is known.

  • The price is ours, in whole units

    A request cannot set an amount. Money is counted in whole minor units, a quote is used once and expires, and an order above your maximum is refused.

  • The amount is set aside first

    An order holds its amount before it runs. A balance can never go below zero, even under many requests at once.

  • A retry never places a second order

    The same Idempotency-Key returns the first order, and a different request under it is refused.

  • An unclear result is never sent again

    The amount stays set aside until the result is confirmed, and the order is never placed a second time.

  • A finished order never changes

    Once an order has succeeded or failed, nothing can change it, and its held amount is taken or returned exactly once.

  • Conflicting answers go to review

    If a provider's answers disagree, the order is held for review and its amount stays set aside until it is settled.

One Idempotency-Key, one orderExampleThe same order request sent three times under one key. Only the first makes an order.

Idempotency-Key 7f3a9c2e41b84d06

  1. First request

    202Accepted

    The order is made and its amount held.

  2. The same request, retried

    200Replayed

    The same order, with Idempotent-Replayed: true. Nothing runs twice.

  3. Another body, same key

    422idempotency_key_reused

    Refused. No second order exists.

One order, one hold.

An order from start to finishExampleThe events your system receives as an order moves, and where its amount is at each. Once it has succeeded or failed, it never changes.
  1. Accepted order.accepted

    The order exists and its amount is held.

  2. Processing order.processing

    Sent to the provider once. Still held.

Then one of these

  • Succeeded

    order.succeeded

    Delivered. The held amount is taken.

  • Failed

    order.failed

    Not delivered, for certain. The amount returns once.

  • Under review

    order.under_review

    The answer is unclear. Still held, until it succeeds or fails.

04Blockchain

Payouts open only when they are ready.

Crypto Payouts is coming soon. Until it opens, nothing here can send a transfer, and every payout shown on this site is an example.

  • No payout can be sent today

    The API has no payout endpoint, and it answers only the operations its published contract lists.

When Crypto Payouts opens

  • Blockchain transaction trackingWill follow a transaction on its network until it is final.
  • Address checksWill check an address against its network's rules before you send to it.

Wallet Address Validation & Screening will tell these apart

  • Address formatWhether the address is well formed for its network, checksum included. A valid format says nothing about who holds the wallet.
  • Network compatibilityWhether the address can be used on the network you pay on. It cannot tell which network the recipient expects.
  • Token compatibilityWhether the token you send is carried on that network.
  • Risk screeningWhether the wallet appears on sanctions or risk lists. This needs a screening provider, and there is none yet.

05Monitoring

When something is wrong, money stops first.

Checks run all the time, an alert reaches our team, and a written runbook says what to do next.

  • The ledger checks itself

    If an amount does not balance, or the audit log has been changed, money stops moving until our staff release it.

  • Settlement waits for a passing check

    If the checks cannot run, no order is settled or refunded until one passes.

  • The checks are watched too

    A separate process raises an alert if they have not run for five minutes.

  • Alerts reach a person

    Each alert goes to our team's channel and is tried again until it is delivered. None is dropped.

  • A log that can only be added to

    Staff and account actions, key changes included, are recorded in order, each entry linked to the one before, so a change or a deletion is found.

  • Every request has an id

    Every answer, an error included, carries a request id, so one request can be followed from your system to ours.

  • Your request log

    Your dashboard lists each API request with its time, operation, status and duration. Its body and any secret are never recorded.

06Practices and reporting

How we build and run it.

The habits behind the controls above, and how to tell us about a concern.

  • Secrets stay in a secret manager

    Our keys and passwords are held in Google Cloud Secret Manager, and each service reads only the ones it needs.

  • HTTPS only

    The API accepts TLS 1.2 or newer and refuses plain HTTP.

  • Logs never hold a secret

    They record what happened by its code, and never a key, a token or a request body.

  • Every webhook is signed

    Under Standard Webhooks v1, so your system can check an event came from us before acting on it.

  • Webhooks never reach a private network

    An endpoint on a private or internal address is refused when you add it, and again before each delivery.

Report a security concern

Write to us through the contact page and say it is about security. Tell us what you found and how to reproduce it, with a request id if you have one.

  • Never send a secret key, a password or a customer's data.
  • If a key may be exposed, revoke it in your dashboard first. It stops at its next request.
Go to the contact page

Your data

This website is served by Vercel, and the dashboard and the API run on Google Cloud. What they record about you, and for how long, is in the privacy notice.

Read the privacy notice

Create your Nasfam Business account.

Manage your API services, business transactions and account balance in one place.