Developer reference

Amanah Service API

Record bank-confirmed donations on the Amanah Ledger and retrieve their status and proof.

Version 1.0.0. OpenAPI 3.1.0. Base URL: https://api.amanah-ledger.com

openapi.yamlopenapi.jsonRequest a key

Amanah Service is the backend API that donation platforms integrate with. A platform submits each donation that its bank has confirmed; Amanah Service validates it, queues it, and records a tamper-evident commitment on the Solana blockchain. Donors and anyone else can then look the record up in Amanah Explorer.

This reference documents the public, platform-facing /v1 routes only. Operator and registry routes (/admin, /internal) are not part of the public API and are not documented here.

Getting access

Keys are issued by the Amanah Ledger team, not self-served. Use "Register interest" on the landing page (https://amanah-ledger.com/#interest) or write to [email protected]. You receive a key id and a secret; the secret is shown once and cannot be retrieved again. Your platform must also be registered and active on-chain, and every recipient wallet you donate to must be a verified recipient in Amanah Registry (otherwise 422).

Authentication: signed requests

Every request carries four headers and is authenticated with HMAC-SHA256 over the exact request. There is no bearer token.

HeaderValue
X-Key-IdYour key id, for example k_AbC... (at most 128 characters).
X-TimestampCurrent Unix time in whole seconds (1 to 12 digits).
X-NonceA fresh unique string per request, 16 to 64 characters of A-Z a-z 0-9 _ -.
X-SignatureLowercase hex (64 characters) of the HMAC-SHA256 described below.

The signed string (the "canonical string") is five fields joined with |:

METHOD|PATH_AND_QUERY|TIMESTAMP|NONCE|SHA256_HEX_OF_BODY
  • METHOD is upper case (GET, POST).
  • PATH_AND_QUERY is the request target exactly as it goes on the wire: the path plus the query string if any, not decoded and not normalised (for example /v1/donations/0b6c.../proof).
  • TIMESTAMP and NONCE are the same strings you send in the headers.
  • SHA256_HEX_OF_BODY is the lowercase hex SHA-256 of the exact body bytes you send. For a request with no body it is the hash of the empty string, e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

The signature is hex( HMAC_SHA256( key = secret as a UTF-8 string, message = canonical string ) ). The secret is used as the literal string you were given (do not base64-decode it).

Sign the bytes you send: do not re-serialise the JSON after signing.

// Node.js
import { createHash, createHmac, randomBytes } from "node:crypto";
const body = JSON.stringify(payload);                       // send exactly these bytes
const ts = String(Math.floor(Date.now() / 1000));
const nonce = randomBytes(16).toString("hex");
const canonical = ["POST", "/v1/donations", ts, nonce, createHash("sha256").update(body).digest("hex")].join("|");
const signature = createHmac("sha256", secret).update(canonical, "utf8").digest("hex");
// headers: X-Key-Id, X-Timestamp: ts, X-Nonce: nonce, X-Signature: signature, Content-Type: application/json

Server-side checks, in order: header format, key and signature, key not disabled or expired, timestamp within 300 seconds of server time, per-platform front-door rate limit, nonce not seen before, platform active, source IP allowlist (only if one is configured for your platform).

  • A request rejected with IP_NOT_ALLOWED has already consumed its nonce.
  • An unknown key, a revoked key and a wrong signature are indistinguishable: all return 401 AUTH_BAD_SIGNATURE. The disabled/expired state of a key is revealed (403) only to a caller whose signature is valid.
  • A nonce can be used once. It is remembered until 600 seconds after its timestamp. Reusing it returns 401 AUTH_REPLAY. Use a new nonce for every attempt, including retries.
  • Clock drift beyond 300 seconds returns 401 AUTH_STALE. Keep your server clock in sync (NTP).

Idempotency

There is no Idempotency-Key header. Idempotency is keyed on the bank transaction: the pair (bankCode, normalised bankReference). Submitting the same bank transaction again from the same platform returns 202 with the original donationId, provided every bound field matches: platformReference, recipientWallet, amountMinor, currency, paidAt (to the second), category (omitted equals 0) and metadataHash (absent equals absent). If any differ, the answer is 409 REFERENCE_CONFLICT. If a different platform has already recorded the same bank transaction, the answer is 409 DUPLICATE. An idempotent repeat consumes no create-rate-limit token and no daily-cap slot.

bankReference is normalised before use (ASCII whitespace trimmed at both ends, ASCII letters upper-cased), so case and surrounding spaces do not make a different transaction. JSON key order and whitespace do not matter either, but remember each attempt needs a fresh nonce and a new signature.

Rate limits

Two limits apply per platform, both continuous-refill token buckets (the capacity equals the per-minute limit).

  • Front door: every authenticated /v1 request (create, status, proof) takes one token. The default is 6000 per minute per platform (operator-configured; may be off). Requests that fail authentication never use your budget. A replayed request still takes a token before it is rejected.
  • Create limit: a per-platform value set by the Amanah Ledger team. Only requests that reach the insert stage take a token.

A platform whose create limit is unset (null) has no create limit. Over a limit returns 429 RATE_LIMITED. No Retry-After header is sent; back off and retry with a new nonce. A platform may also have a daily cap on new donations per platform-local day: 429 DAILY_CAP_EXCEEDED.

A third limit sits in front of the API, at the edge (nginx), and is per client IP address, not per platform: about 50 requests per second with a burst of 100. Excess requests get a plain 429 from nginx (see "Errors" below), before they reach the API. Concurrent connections per IP are also capped (40).

Errors

Errors produced by the API are JSON of the form { "error": { "code": "...", "message": "..." } }. The code is stable and meant for programs; the message is for humans and may change. Validation errors name the offending fields and never echo values.

Errors produced at the edge are not necessarily JSON. The reverse proxy in front of the API answers some requests itself, with its own (HTML or empty) body and no error.code: 429 when one client IP exceeds the edge rate limit, 400 for a path containing .., %2e, %2f, %5c or %00 (the signature covers the exact path, so such paths are refused outright), 413 for bodies over 64 KiB (the API itself limits to 16 KiB), 404 for any path outside /v1/, and 503 when one client IP exceeds the connection cap (40), 502/504 when the backend is down or slow, and Cloudflare's own 52x pages when the origin is unreachable. Clients must therefore branch on the HTTP status first and parse a JSON error body only when the response is application/json.

Lifecycle of a donation

RECEIVED is only ever the status in the 202 response to a create call. After that a donation is QUEUED (accepted, waiting for the on-chain worker), then SUBMITTED (a transaction has been sent), then CONFIRMED, then FINALIZED (final on Solana). Do not assume statuses only move forward: while the worker retries (a transaction expired, a temporary RPC failure, an operational hold) a SUBMITTED donation can go back to QUEUED and be sent again, and an operator can re-queue a DEAD one. Treat CONFIRMED and FINALIZED as the success states and poll until you see one; FINALIZED is final. DEAD means the worker gave up after retries or a terminal on-chain error; contact the Amanah Ledger team.

Request limits

JSON bodies only (Content-Type: application/json), at most 16 KiB (16384 bytes).

Endpoints

POST /v1/donations

Record a donation

Submits one bank-confirmed donation. On success the donation is accepted and queued (202); it is written on-chain asynchronously, so poll GET /v1/donations/{id} for progress.

Processing order: authentication, body validation (including that bankCode is a known bank), same-platform lookup (idempotent repeat or REFERENCE_CONFLICT), cross-platform lookup (DUPLICATE), recipient check, platform on-chain check, create rate limit, daily cap, insert. An idempotent repeat is answered before the recipient check, the rate limit and the cap.

The recipient (recipientWallet) must be a verified recipient in Amanah Registry and registered on-chain, and must not be in the process of being suspended; otherwise 422 RECIPIENT_NOT_VERIFIED.

Parameters

NameInRequiredDescription
X-Key-Idheaderyes

Your API key id.

length 0..128

X-Timestampheaderyes

Current Unix time in whole seconds. Must be within 300 seconds of server time.

pattern ^[0-9]{1,12}$

X-Nonceheaderyes

A unique value per request (a replay returns AUTH_REPLAY). Remembered until 600 seconds after the timestamp.

pattern ^[A-Za-z0-9_-]{16,64}$

X-Signatureheaderyes

Lowercase hex HMAC-SHA256 of METHOD|PATH_AND_QUERY|TIMESTAMP|NONCE|SHA256_HEX_OF_BODY, keyed with your secret.

pattern ^[0-9a-f]{64}$

Request body (application/json)

FieldTypeRequiredDescription
platformReferencestringyes

Your own reference (at most 128 characters, counted as UTF-16 code units by the server) for this donation. Unique per platform: reusing it for a different bank transaction is REFERENCE_CONFLICT.

length 1..128

bankCodestringyes

Code of the bank that confirmed the payment. Must be one of the banks Amanah Ledger supports, otherwise VALIDATION_FAILED (field bankCode). Ask the Amanah Ledger team for the list.

pattern ^[A-Z0-9]{1,11}$

bankReferencestringyes

The bank's reference for the transaction. Must not be empty after normalisation (trim ASCII whitespace, upper-case ASCII letters). Stored and proven in normalised form. Together with bankCode it identifies the bank transaction for idempotency and duplicate detection.

length 0..128

amountMinorstringyes

Amount in minor units (for example sen) as a decimal string, 1 to 18446744073709551615 (2^64-1). A JSON number is rejected.

pattern ^[1-9][0-9]{0,19}$

currencystringyes

Three upper-case letters.

pattern ^[A-Z]{3}$

recipientWalletstringyes

Solana address (base58, 32 bytes, canonical form) of a verified recipient.

paidAtstringyes

When the donor paid, RFC 3339 with an explicit offset (Z or +hh:mm) and whole seconds, for example 2026-11-22T11:58:30+08:00. Fractional seconds are rejected. Must be after the Unix epoch and at most 240 seconds in the future.

pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$

categoryintegerno

Optional category code, 0 to 65535. Omitted means 0.

0..65535; default 0

metadataHashstringno

Optional 32-byte hash (64 hex characters) of your own metadata for this donation. Stored as bytes; the metadata itself is not sent.

pattern ^[0-9a-fA-F]{64}$

{
  "platformReference": "INV-2026-000123",
  "bankCode": "MBBEMYKL",
  "bankReference": "ib-20261122-7788",
  "amountMinor": "50000",
  "currency": "MYR",
  "recipientWallet": "7tBntpS9MYMo4koekTWqHXyewJFUkPzyL5finB2GMtjU",
  "paidAt": "2026-11-22T11:58:30+08:00",
  "category": 0
}

Responses

  • 202

    Accepted and queued. Also the answer to an idempotent repeat, with the original donationId.

    {
      "donationId": "0b6c2f3e-8d4a-4b8e-9c1e-5a7f1d2e3c4b",
      "status": "RECEIVED"
    }
  • 400

    VALIDATION_FAILED: the body is not valid JSON, has an unknown field, or a field is invalid. The message lists the field names (for example Invalid request: amountMinor, paidAt), never the values.

    {
      "error": {
        "code": "VALIDATION_FAILED",
        "message": "Invalid request: amountMinor"
      }
    }
  • 401

    AUTH_BAD_SIGNATURE: missing or malformed auth headers, unknown or revoked key, or wrong signature (all identical). AUTH_STALE: timestamp more than 300 seconds from server time. AUTH_REPLAY: nonce already used.

    {
      "error": {
        "code": "AUTH_BAD_SIGNATURE",
        "message": "Authentication failed"
      }
    }
    {
      "error": {
        "code": "AUTH_STALE",
        "message": "Timestamp outside the allowed window"
      }
    }
    {
      "error": {
        "code": "AUTH_REPLAY",
        "message": "Nonce already used"
      }
    }
  • 403

    Returned only for a valid signature. KEY_DISABLED: the key is disabled. KEY_EXPIRED: the key has expired. PLATFORM_INACTIVE: the platform is deactivated. IP_NOT_ALLOWED: your platform has an IP allowlist and the source address is not on it.

    {
      "error": {
        "code": "KEY_DISABLED",
        "message": "API key is disabled"
      }
    }
  • 409

    REFERENCE_CONFLICT: the same bank transaction was already recorded by your platform with different details (amount, recipient, currency, paidAt, category, metadataHash or platformReference), or your platformReference was already used for a different bank transaction. DUPLICATE: another platform already recorded this bank transaction (no identifiers are returned).

    {
      "error": {
        "code": "REFERENCE_CONFLICT",
        "message": "platformReference or bank transaction already used with different details"
      }
    }
    {
      "error": {
        "code": "DUPLICATE",
        "message": "This bank transaction has already been recorded"
      }
    }
  • 413

    The body is larger than 16 KiB. Answered before authentication. (Above 64 KiB the edge answers first, with a non-JSON 413.)

    {
      "error": {
        "code": "PAYLOAD_TOO_LARGE",
        "message": "Request body too large"
      }
    }
  • 415

    The content type is not application/json. Answered before authentication.

    {
      "error": {
        "code": "UNSUPPORTED_MEDIA_TYPE",
        "message": "Content-Type must be application/json"
      }
    }
  • 422

    RECIPIENT_NOT_VERIFIED: the recipient wallet is unknown, not verified, not registered on-chain, or is being suspended. PLATFORM_NOT_ONCHAIN: your platform is not active on-chain.

    {
      "error": {
        "code": "RECIPIENT_NOT_VERIFIED",
        "message": "Recipient is not verified"
      }
    }
    {
      "error": {
        "code": "PLATFORM_NOT_ONCHAIN",
        "message": "Platform is not active on-chain"
      }
    }
  • 429

    RATE_LIMITED (front-door or create limit) or DAILY_CAP_EXCEEDED (your platform's daily cap of new donations for the platform-local day). No Retry-After header is sent.

    {
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded"
      }
    }
    {
      "error": {
        "code": "DAILY_CAP_EXCEEDED",
        "message": "Daily donation cap reached"
      }
    }
  • 500

    Unexpected server error. The body is generic; retry later with a new nonce and contact the Amanah Ledger team if it persists.

    {
      "error": {
        "code": "INTERNAL",
        "message": "Internal server error"
      }
    }

GET /v1/donations/{id}

Get a donation's status

Returns the current status of one of your platform's donations. A donation that belongs to another platform, does not exist, or whose id is not a UUID returns the same 404.

signature appears once a transaction signature is known. It is the signature of the latest attempt and can change if the donation is re-queued and sent again; only a CONFIRMED or FINALIZED donation has a signature you should rely on. recordAddress (the Solana account holding the record) is returned only when status is CONFIRMED or FINALIZED.

Parameters

NameInRequiredDescription
X-Key-Idheaderyes

Your API key id.

length 0..128

X-Timestampheaderyes

Current Unix time in whole seconds. Must be within 300 seconds of server time.

pattern ^[0-9]{1,12}$

X-Nonceheaderyes

A unique value per request (a replay returns AUTH_REPLAY). Remembered until 600 seconds after the timestamp.

pattern ^[A-Za-z0-9_-]{16,64}$

X-Signatureheaderyes

Lowercase hex HMAC-SHA256 of METHOD|PATH_AND_QUERY|TIMESTAMP|NONCE|SHA256_HEX_OF_BODY, keyed with your secret.

pattern ^[0-9a-f]{64}$

idpathyes

The donationId returned when the donation was created.

Responses

  • 200

    The donation.

    {
      "donationId": "0b6c2f3e-8d4a-4b8e-9c1e-5a7f1d2e3c4b",
      "status": "FINALIZED",
      "signature": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
      "recordAddress": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"
    }
  • 401

    AUTH_BAD_SIGNATURE: missing or malformed auth headers, unknown or revoked key, or wrong signature (all identical). AUTH_STALE: timestamp more than 300 seconds from server time. AUTH_REPLAY: nonce already used.

    {
      "error": {
        "code": "AUTH_BAD_SIGNATURE",
        "message": "Authentication failed"
      }
    }
    {
      "error": {
        "code": "AUTH_STALE",
        "message": "Timestamp outside the allowed window"
      }
    }
    {
      "error": {
        "code": "AUTH_REPLAY",
        "message": "Nonce already used"
      }
    }
  • 403

    Returned only for a valid signature. KEY_DISABLED: the key is disabled. KEY_EXPIRED: the key has expired. PLATFORM_INACTIVE: the platform is deactivated. IP_NOT_ALLOWED: your platform has an IP allowlist and the source address is not on it.

    {
      "error": {
        "code": "KEY_DISABLED",
        "message": "API key is disabled"
      }
    }
  • 404

    No such donation for your platform (a donation of another platform, a missing id and a malformed id are indistinguishable). Unknown /v1 paths also return NOT_FOUND.

    {
      "error": {
        "code": "NOT_FOUND",
        "message": "Not found"
      }
    }
  • 429

    RATE_LIMITED: the platform's front-door limit is exhausted. No Retry-After header is sent.

    {
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded"
      }
    }
  • 500

    Unexpected server error. The body is generic; retry later with a new nonce and contact the Amanah Ledger team if it persists.

    {
      "error": {
        "code": "INTERNAL",
        "message": "Internal server error"
      }
    }

GET /v1/donations/{id}/proof

Get the proof of a donation

Returns the values needed to independently recompute the on-chain commitment for one of your donations: the record address, the bank code, the bank reference and the random salt. These are the sensitive inputs that are deliberately not stored on-chain in the clear, so treat the response as confidential.

Every successful call is written to the platform audit log (action proof.read) before the proof is released. If that write fails, the proof is not returned.

All byte strings are lowercase hex. bankCode is the 11-byte bank code, zero padded on the right. bankReference is the UTF-8 bytes of the normalised reference (trimmed, upper-cased), not the text as you submitted it. salt is 16 bytes. The proof can be requested at any status, including before the record is on-chain.

Parameters

NameInRequiredDescription
X-Key-Idheaderyes

Your API key id.

length 0..128

X-Timestampheaderyes

Current Unix time in whole seconds. Must be within 300 seconds of server time.

pattern ^[0-9]{1,12}$

X-Nonceheaderyes

A unique value per request (a replay returns AUTH_REPLAY). Remembered until 600 seconds after the timestamp.

pattern ^[A-Za-z0-9_-]{16,64}$

X-Signatureheaderyes

Lowercase hex HMAC-SHA256 of METHOD|PATH_AND_QUERY|TIMESTAMP|NONCE|SHA256_HEX_OF_BODY, keyed with your secret.

pattern ^[0-9a-f]{64}$

idpathyes

The donationId returned when the donation was created.

Responses

  • 200

    The proof.

    {
      "recordAddress": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
      "bankCode": "4d4242454d594b4c000000",
      "bankReference": "49422d32303236313132322d37373838",
      "salt": "00112233445566778899aabbccddeeff"
    }
  • 401

    AUTH_BAD_SIGNATURE: missing or malformed auth headers, unknown or revoked key, or wrong signature (all identical). AUTH_STALE: timestamp more than 300 seconds from server time. AUTH_REPLAY: nonce already used.

    {
      "error": {
        "code": "AUTH_BAD_SIGNATURE",
        "message": "Authentication failed"
      }
    }
    {
      "error": {
        "code": "AUTH_STALE",
        "message": "Timestamp outside the allowed window"
      }
    }
    {
      "error": {
        "code": "AUTH_REPLAY",
        "message": "Nonce already used"
      }
    }
  • 403

    Returned only for a valid signature. KEY_DISABLED: the key is disabled. KEY_EXPIRED: the key has expired. PLATFORM_INACTIVE: the platform is deactivated. IP_NOT_ALLOWED: your platform has an IP allowlist and the source address is not on it.

    {
      "error": {
        "code": "KEY_DISABLED",
        "message": "API key is disabled"
      }
    }
  • 404

    No such donation for your platform (a donation of another platform, a missing id and a malformed id are indistinguishable). Unknown /v1 paths also return NOT_FOUND.

    {
      "error": {
        "code": "NOT_FOUND",
        "message": "Not found"
      }
    }
  • 429

    RATE_LIMITED: the platform's front-door limit is exhausted. No Retry-After header is sent.

    {
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded"
      }
    }
  • 500

    Unexpected server error. The body is generic; retry later with a new nonce and contact the Amanah Ledger team if it persists.

    {
      "error": {
        "code": "INTERNAL",
        "message": "Internal server error"
      }
    }

Schemas

CreateDonationRequest

Unknown fields are rejected with VALIDATION_FAILED.

FieldTypeRequiredDescription
platformReferencestringyes

Your own reference (at most 128 characters, counted as UTF-16 code units by the server) for this donation. Unique per platform: reusing it for a different bank transaction is REFERENCE_CONFLICT.

length 1..128

bankCodestringyes

Code of the bank that confirmed the payment. Must be one of the banks Amanah Ledger supports, otherwise VALIDATION_FAILED (field bankCode). Ask the Amanah Ledger team for the list.

pattern ^[A-Z0-9]{1,11}$

bankReferencestringyes

The bank's reference for the transaction. Must not be empty after normalisation (trim ASCII whitespace, upper-case ASCII letters). Stored and proven in normalised form. Together with bankCode it identifies the bank transaction for idempotency and duplicate detection.

length 0..128

amountMinorstringyes

Amount in minor units (for example sen) as a decimal string, 1 to 18446744073709551615 (2^64-1). A JSON number is rejected.

pattern ^[1-9][0-9]{0,19}$

currencystringyes

Three upper-case letters.

pattern ^[A-Z]{3}$

recipientWalletstringyes

Solana address (base58, 32 bytes, canonical form) of a verified recipient.

paidAtstringyes

When the donor paid, RFC 3339 with an explicit offset (Z or +hh:mm) and whole seconds, for example 2026-11-22T11:58:30+08:00. Fractional seconds are rejected. Must be after the Unix epoch and at most 240 seconds in the future.

pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$

categoryintegerno

Optional category code, 0 to 65535. Omitted means 0.

0..65535; default 0

metadataHashstringno

Optional 32-byte hash (64 hex characters) of your own metadata for this donation. Stored as bytes; the metadata itself is not sent.

pattern ^[0-9a-fA-F]{64}$

DonationAccepted

FieldTypeRequiredDescription
donationIdstring (uuid)yes
status"RECEIVED"yes

DonationStatus

FieldTypeRequiredDescription
donationIdstring (uuid)yes
statusStatusyes

QUEUED accepted and waiting; SUBMITTED sent to Solana; CONFIRMED confirmed; FINALIZED final; DEAD the on-chain worker gave up (contact Amanah Ledger). RECEIVED is the status in the create response and is a valid value of the underlying column, but a stored donation is normally already QUEUED when you can first read it.

signaturestringno

Solana transaction signature (base58) of the latest attempt, present once known. May change after a re-queue.

recordAddressstringno

Solana account holding the record (base58). Present only when status is CONFIRMED or FINALIZED.

Status

QUEUED accepted and waiting; SUBMITTED sent to Solana; CONFIRMED confirmed; FINALIZED final; DEAD the on-chain worker gave up (contact Amanah Ledger). RECEIVED is the status in the create response and is a valid value of the underlying column, but a stored donation is normally already QUEUED when you can first read it.

One of: RECEIVED QUEUED SUBMITTED CONFIRMED FINALIZED DEAD

DonationProof

FieldTypeRequiredDescription
recordAddressstringyes

Solana account of the record (base58).

bankCodestringyes

Hex of the 11-byte bank code, zero padded on the right.

pattern ^[0-9a-f]{22}$

bankReferencestringyes

Hex of the UTF-8 bytes of the normalised bank reference.

pattern ^([0-9a-f]{2})+$

saltstringyes

Hex of the 16-byte random salt of this donation.

pattern ^[0-9a-f]{32}$

Error

FieldTypeRequiredDescription
errorobjectyes

ErrorCode

One of: AUTH_BAD_SIGNATURE AUTH_STALE AUTH_REPLAY KEY_DISABLED KEY_EXPIRED PLATFORM_INACTIVE IP_NOT_ALLOWED VALIDATION_FAILED RECIPIENT_NOT_VERIFIED PLATFORM_NOT_ONCHAIN RATE_LIMITED DAILY_CAP_EXCEEDED DUPLICATE REFERENCE_CONFLICT NOT_FOUND BAD_REQUEST PAYLOAD_TOO_LARGE UNSUPPORTED_MEDIA_TYPE INTERNAL