TillsafeDocstillsafe.comRequest early access

Objects

Every object and enum the API sends or accepts, in alphabetical order.

AddressDerivation

How the client can prove a deposit address is safe without trusting this API.

The checkout must recompute the address from these inputs and refuse to show it on any mismatch. It must compare destination against the merchant's destination pinned in the checkout's own bundle/config, not only against the value in this response: a compromised backend could send both.

Type: ForwarderDerivation and object { scheme } or RegisteredDerivation and object { scheme } or Bip32Derivation and object { scheme }

  • ForwarderDerivation and object { scheme }

    A CREATE2 forwarder that can only ever pay destination (minus fee_bps to fee_recipient).

  • RegisteredDerivation and object { scheme }

    The address is itself one of the merchant's registered receive addresses (EOA pool slot).

  • Bip32Derivation and object { scheme }

    A fresh receive address derived from the merchant's own watch-only account key (Bitcoin): the funds land directly in the merchant's wallet.

AmountType

Who sets the amount.

Type: string

  • One of: "fixed", "payer_chosen"

AssetBalances

One asset's balances.

FieldTypeDescription
assetrequiredstring
  • Example: "USDT@tron:nile"
symbolrequiredstring
networkrequiredstring

CAIP-2 network.

network_namerequiredstring
balancedrequiredboolean

The lines' net debits sum to zero at both ends of the period (double entry holds).

linesrequiredarray of BalanceLine

AssetMoney

An amount of one on-chain asset.

FieldTypeDescription
amountrequiredstring

Decimal string in whole tokens (not base units), e.g. "30.5". Never a JSON number.

  • Pattern: ^[0-9]+(\.[0-9]+)?$
  • Example: "30"
assetrequiredstring

Asset code {SYMBOL}@{network}, e.g. USDT@tron:mainnet.

  • Example: "USDT@tron:nile"

AssetReconciliation

One asset's reconciliation.

FieldTypeDescription
assetrequiredstring
  • Example: "USDT@tron:nile"
symbolrequiredstring
networkrequiredstring

CAIP-2 network.

network_namerequiredstring
statusrequiredReconciliationStatus
ledgerrequiredarray of LedgerLine
chainrequiredChainTotals
invoicesrequiredInvoiceTotals
discrepanciesrequiredarray of Discrepancy

Flagged first, then explained.

BalanceLine

One account group's balances. Every balance is on the account's normal side: positive means the account holds what it normally holds.

FieldTypeDescription
accountrequiredstring

Same labels as the reconciliation report, e.g. merchant:available.

  • Example: "merchant:available"
descriptionrequiredstring
normal_siderequiredNormalSide
openingrequiredstring

Balance at from (decimal string; may be negative).

debitsrequiredstring

Σ debit postings in the period.

creditsrequiredstring

Σ credit postings in the period.

closingrequiredstring

Balance at to: the balance as of that moment.

movementrequiredstring

closing − opening.

previous_movementrequiredstring

The same account's movement in the previous period ([previous_from, from)).

Bip32Derivation

Inputs of a BIP32 receive address (Bitcoin): xpub / keychain / index, encoded as script.

text
child   = CKDpub(CKDpub(xpub, keychain), index)          (BIP32 public derivation, non-hardened)
p2wpkh  = bech32 witness v0 of HASH160(child pubkey)        BIP84: bc1q / tb1q
p2tr    = bech32m witness v1 of the BIP86 key-path output  BIP86: bc1p / tb1p

The account key is private to the merchant. Fresh per-invoice addresses are a privacy feature: anyone holding the xpub can derive every receive address and follow the merchant's whole BTC revenue. So the payer-facing checkout view never carries xpub or descriptor; only the merchant's own (secret-key) API does. A client verifies a BTC address by deriving index from the account key it already holds (the merchant's pin: the embed's pins option, the portal adapter's config). Without such a pin the hosted checkout shows the server-derived address unverified: hosted-checkout BTC relies on the server's integrity, merchant-side integrations can pin.

FieldTypeDescription
xpubstring or null

The merchant's account-level extended public key, in the form the merchant gave it (xpub/zpub on mainnet, tpub/vpub on test networks). Merchant API only: absent from the checkout view.

scriptrequiredstring

p2wpkh (BIP84) or p2tr (BIP86).

  • Example: "p2wpkh"
keychainrequiredinteger (int32)

0 = receive keychain.

  • Minimum: 0
indexrequiredinteger (int32)

The address index below the keychain (never hardened).

  • Minimum: 0
descriptorstring or null

The account's output descriptor with checksum (it contains the account key). Merchant API only: absent from the checkout view.

CancellationReason

Why a subscription ended.

Type: string

  • One of: "requested", "unpaid"

CancelSubscriptionRequest

FieldTypeDescription
at_period_endboolean or null

true: keep it until the paid time ends, then cancel (no more renewals). Default false: cancel now; an open renewal invoice with nothing paid is cancelled too.

ChainTotals

What the chain says, for the cohort's invoices.

FieldTypeDescription
transfersrequiredinteger (int32)

Transfers attributed to the cohort's invoices (orphaned ones included in this count).

  • Minimum: 0
observedrequiredstring

Σ transfers still on chain.

creditedrequiredstring

… of which credited to the merchant.

refundablerequiredstring

… of which held as refundable to the payer (wrong asset, late, after cancellation).

unpostedrequiredstring

… of which not posted yet (confirming or held for review).

orphanedrequiredstring

Σ transfers removed by a reorg (not in any other total).

suspenserequiredstring

Σ unattributed deposits at your deposit addresses opened in the period and still open.

CheckoutCapabilities

Optional payer-facing features of this server.

FieldTypeDescription
receipt_emailrequiredboolean

POST /v1/checkout/invoices/{id}/notify works: the server has a mail sink for payer receipts. When false that route answers 409 feature_unavailable, and the checkout hides the field.

CheckoutInvoice

The payer's view of an invoice: only what the checkout needs. No metadata, customer reference, merchant settings or secrets, ever (this is an explicit allowlist projection, see routes::checkout).

FieldTypeDescription
idrequiredstring
objectrequiredstring

Always checkout_invoice.

  • Example: "checkout_invoice"
livemoderequiredboolean
statusrequiredInvoiceStatus
merchantrequiredCheckoutMerchant
amountrequiredFiatMoney
descriptionstring or null
payment_optionsrequiredarray of PaymentOption
amount_receivedAssetMoney or null
amount_remainingAssetMoney or null
confirmationsConfirmations or null
expires_atrequiredstring (date-time)
price_locked_untilstring (date-time) or null

See [Invoice::price_locked_until]: the checkout shows a timer only when this is set.

capabilitiesrequiredCheckoutCapabilities

What this server can do for the payer beyond showing the invoice. The checkout hides a feature whose flag is false instead of offering it and failing on submit.

session_tokenstring or null

A checkout-session token (cps_…), fresh on every GET /v1/checkout/invoices/{id}. Keep the first one you get for this invoice (for example in sessionStorage) and send it with notify: the first address left for an invoice can only be replaced from the same session. Absent from the payment-link mint response; the checkout then loads this view for the new invoice.

  • Example: "cps_q0lW1y3r0n2E5oVb7yKpQmZt8xJcNfHaUgDsLiReTwA"
pending_optionsarray of PendingOption

See [Invoice::pending_options]: picking one (POST …/payment_option) leases its address.

select_bystring (date-time) or null

See [Invoice::select_by].

CheckoutMerchant

The merchant, as the payer sees it.

FieldTypeDescription
display_namerequiredstring

The payer's view of a link: only what the landing screen needs (an explicit allowlist, like the checkout invoice). No metadata, counts or asset configuration.

FieldTypeDescription
slugrequiredstring
objectrequiredstring

Always checkout_payment_link.

  • Example: "checkout_payment_link"
livemoderequiredboolean
statusrequiredPaymentLinkStatus
merchantrequiredCheckoutMerchant
amount_typerequiredAmountType
currencyrequiredstring
amountstring or null
  • Pattern: ^[0-9]+(\.[0-9]+)?$
min_amountstring or null
  • Pattern: ^[0-9]+(\.[0-9]+)?$
max_amountstring or null
  • Pattern: ^[0-9]+(\.[0-9]+)?$
descriptionstring or null
expires_atstring (date-time) or null

CheckoutStatus

Live status snapshot. Each SSE event carries a complete one, so clients never merge deltas.

FieldTypeDescription
invoicerequiredstring
statusrequiredInvoiceStatus
amount_receivedAssetMoney or null
amount_remainingAssetMoney or null
confirmationsConfirmations or null
paymentPaymentSummary or null

CheckResult

Outcome of one check.

Type: string

  • One of: "clear", "match", "not_applicable", "unavailable"

ClaimNetwork

A network the payer can receive the refund on.

FieldTypeDescription
networkrequiredstring

CAIP-2 id.

network_namerequiredstring
  • Example: "TRON (TRC20)"
assetrequiredstring

The asset sent on that network.

ClaimPayout

What the payer submitted (echoed back to them).

FieldTypeDescription
networkrequiredstring
network_namerequiredstring
addressrequiredstring
submitted_atrequiredstring (date-time)

Confirmations

Confirmation progress of the payment being counted.

FieldTypeDescription
currentrequiredinteger (int32)
  • Minimum: 0
requiredrequiredinteger (int32)
  • Minimum: 0

CreateCustomerRequest

FieldTypeDescription
namestring or null
emailstring or null

Where renewal reminders go. Optional: without it, you tell the customer yourself (the subscription.invoice_created webhook carries each invoice).

metadatamap of string or null

CreateInvoiceRequest

FieldTypeDescription
amountrequiredstring

Price in major units of currency, as a decimal string.

  • Example: "30.00"
currencyrequiredstring

ISO 4217 code of the price.

  • Example: "USD"
assetsarray of string or null

Assets the payer may use. Defaults to the merchant's default_assets.

descriptionstring or null

Shown to the payer. At most 500 characters.

customer_refstring or null

Your reference for the customer. At most 200 characters. Never shown to the payer.

metadatamap of string or null

Up to 20 pairs; keys at most 40 characters, values at most 500. Never shown to the payer.

CreateLinkInvoiceRequest

FieldTypeDescription
amountstring or null

The amount the payer chose, in the link's currency, as a decimal string. Required for payer_chosen links; must be omitted for fixed ones.

  • Example: "20.00"

CreatePaymentLinkRequest

FieldTypeDescription
amount_typeAmountType or null
currencyrequiredstring

ISO 4217 code.

  • Example: "USD"
amountstring or null

The price (fixed), as a decimal string.

  • Example: "25.00"
min_amountstring or null

Lower bound for payer_chosen amounts.

max_amountstring or null

Upper bound for payer_chosen amounts.

descriptionstring or null

Shown to the payer. At most 500 characters.

assetsarray of string or null

Accepted assets. Omit to use the merchant's defaults at the time each invoice is created.

quantity_limitinteger (int32) or null

1 to 1,000,000 payments; omit for unlimited.

  • Minimum: 0
expires_atstring (date-time) or null

RFC 3339; must be in the future.

metadatamap of string or null

Up to 20 pairs; keys at most 40 characters, values at most 500. Copied to every invoice.

activeboolean or null

Default true.

CreatePlanRequest

FieldTypeDescription
namerequiredstring
  • Example: "VIP rank, monthly"
amountrequiredstring

Price per period, a decimal string.

  • Example: "9.99"
currencyrequiredstring
  • Example: "USD"
intervalrequiredIntervalUnit
interval_countinteger (int32) or null

Default 1. At most 365 days, 52 weeks, 12 months or 1 year.

  • Minimum: 0
trial_daysinteger (int32) or null

Default 0, at most 365.

  • Minimum: 0
grace_daysinteger (int32) or null

Default 3, at most 30.

  • Minimum: 0
max_attemptsinteger (int32) or null

Default 4, 1 to 7.

  • Minimum: 0
assetsarray of string or null
billing_timezonestring or null

IANA name, default UTC.

  • Example: "Europe/Berlin"

CreateRefundRequest

FieldTypeDescription
amountstring or null

Whole tokens, as a decimal string. Defaults to the overpaid excess (or, for an asset the invoice did not ask for, everything received in it).

  • Example: "2.10"
assetstring or null

The asset code to refund in. Defaults to the asset the invoice was paid in; give another received asset (e.g. a wrong token) to refund that.

  • Example: "USDT@tron:mainnet"
reasonRefundReason or null

CreateSubscriptionRequest

FieldTypeDescription
customerrequiredstring

cus_…

planrequiredstring

plan_… (must be active).

trial_daysinteger (int32) or null

Overrides the plan's trial (0 = start billing now).

  • Minimum: 0
metadatamap of string or null

Customer

Someone who subscribes. The email receives renewal reminders (in the merchant's name).

FieldTypeDescription
idrequiredstring
  • Example: "cus_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always customer.

  • Example: "customer"
livemoderequiredboolean
namestring or null
emailstring or null
metadatarequiredmap of string
credit_balancerequiredarray of AssetMoney

Prepaid credit (overpayments and top-ups), per asset. Renewals consume it before invoicing.

created_atrequiredstring (date-time)

CustomerList

FieldTypeDescription
objectrequiredstring
  • Example: "list"
datarequiredarray of Customer
has_morerequiredboolean
next_cursorstring or null

DeliveryStatus

Type: string

  • One of: "pending", "succeeded", "failed"

Discrepancy

A difference between the views, explained or flagged.

FieldTypeDescription
coderequiredDiscrepancyCode
severityrequiredSeverity
messagerequiredstring

What differs, why, and what happens next.

amountstring or null

The amount involved (decimal string in the section's asset; may be negative).

invoicestring or null
transferTransferRef or null
refundstring or null

DiscrepancyCode

What kind of difference a discrepancy is.

Type: string

  • One of: "ledger_unavailable", "ledger_unbalanced", "ledger_mismatch", "awaiting_confirmation", "held_for_review", "transfer_not_posted", "orphaned_transfer", "posting_without_transfer", "credit_amount_mismatch", "settlement_pending", "settlement_missing", "settlement_mismatch", "refund_owed", "refund_sent_unmatched", "suspense_open", "suspense_resolved"

ErrorBody

The error object.

FieldTypeDescription
typerequiredErrorType
coderequiredstring

Stable machine-readable reason, e.g. parameter_invalid, api_key_invalid.

messagerequiredstring

Human-readable explanation. Do not parse it.

paramstring or null

The request parameter the error is about, if any (e.g. amount, assets[1]).

doc_urlrequiredstring

Link to the documentation for code.

request_idstring or null

The request id, also returned in the x-request-id header. Quote it to support.

ErrorResponse

Every non-2xx response body.

FieldTypeDescription
errorrequiredErrorBody

ErrorType

The coarse error class.

Type: string

  • One of: "invalid_request_error", "authentication_error", "permission_error", "idempotency_error", "rate_limit_error", "api_error"

Exchange

One exchange.

FieldTypeDescription
idrequiredstring
  • Example: "binance"
namerequiredstring
  • Example: "Binance"
networksrequiredarray of ExchangeNetwork

ExchangeList

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
assetrequiredstring

The asset the fees are for.

  • Example: "USDT"
datarequiredarray of Exchange

ExchangeNetwork

One network at one exchange.

FieldTypeDescription
familyrequiredstring

Network family: tron, bsc, ethereum, base, arbitrum or polygon.

  • Example: "tron"
networkrequiredstring

The mainnet the entry describes (CAIP-2).

  • Example: "tron:mainnet"
network_labelstring or null

The exchange's own name for the network, exactly as its withdrawal screen shows it. null unless verified: show generic wording instead.

withdrawal_feeAssetMoney or null
supportedboolean or null

Whether the exchange supports withdrawals of this asset on this network (null: unknown).

verified_atstring or null

When the served values were last checked against source_url (YYYY-MM-DD).

source_urlstring or null

The exchange's own page the values were checked against.

FiatMoney

An amount in a fiat currency.

FieldTypeDescription
amountrequiredstring

Decimal string in major units, e.g. "30.00". Never a JSON number.

  • Pattern: ^[0-9]+(\.[0-9]+)?$
  • Example: "30.00"
currencyrequiredstring

ISO 4217 code.

  • Example: "USD"

ForwarderDerivation

Inputs of ForwarderFactory.predict().

text
salt      = keccak256(abi.encode(address destination, address fee_recipient, uint16 fee_bps,
                                 uint16 dust, bytes32 slot))
args      = destination(20) ‖ fee_recipient(20) ‖ fee_bps(2, BE) ‖ dust(2, BE)            (44 bytes)
init_code = 61 {0x2d + len(args) as 2 bytes} 3d81600a3d39f3 363d3d373d3d3d363d73 ‖ implementation(20)
            ‖ 5af43d82803e903d91602b57fd5bf3 ‖ args
address   = keccak256(create2_prefix ‖ factory(20) ‖ salt ‖ keccak256(init_code))[12..32]

Addresses are in the chain's display form (TRON Base58Check T…, EVM EIP-55 0x…); hash with their 20-byte form (for TRON, drop the leading 0x41 byte).

FieldTypeDescription
create2_prefixrequiredstring

0xff on EVM chains, 0x41 on TRON.

  • Example: "0x41"
factoryrequiredstring
implementationrequiredstring
destinationrequiredstring

The merchant's registered destination. Compare it with your own pinned copy.

fee_recipientrequiredstring

The zero address when fee_bps is 0.

fee_bpsrequiredinteger (int32)

Processor fee in basis points, at most 500 (enforced by the contract).

  • Minimum: 0
dustrequiredstring

Base units the forwarder keeps after a flush (warm-slot dust), as a decimal string.

  • Example: "1"
slotrequiredstring

The slot id (bytes32, 0x-hex).

saltrequiredstring

The expected salt (bytes32, 0x-hex). Recompute it; it is here for debugging only.

HealthStatus

FieldTypeDescription
statusrequiredstring
  • Example: "ok"

IntervalUnit

The unit of a plan's billing interval.

Type: string

  • One of: "day", "week", "month", "year"

Invoice

A request for payment.

FieldTypeDescription
idrequiredstring
  • Example: "inv_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always invoice.

  • Example: "invoice"
livemoderequiredboolean
statusrequiredInvoiceStatus
amountrequiredFiatMoney

The price, as the merchant set it.

descriptionstring or null
customer_refstring or null

The merchant's own customer reference. Never shown to the payer.

metadatarequiredmap of string

Up to 20 merchant key/value pairs. Never shown to the payer.

payment_optionsrequiredarray of PaymentOption
amount_receivedAssetMoney or null
amount_remainingAssetMoney or null
confirmationsConfirmations or null
created_atrequiredstring (date-time)
expires_atrequiredstring (date-time)

End of the detection window. Payments after it are late.

price_locked_untilstring (date-time) or null

End of the price lock, when the invoice offers a volatile asset (BTC). A volatile-asset payment after it is repriced at arrival (within the late band it is still accepted). Absent for stablecoin-only invoices, which have no lock.

paid_atstring (date-time) or null
payment_linkstring or null

The payment link (plink_…) a payer created this invoice from, or null.

pending_optionsarray of PendingOption

Offered options that have no deposit address yet. A payment-link invoice leases an address only when the payer picks a network (POST /v1/checkout/invoices/{id}/payment_option); until then its options are listed here, and each pick moves its network's options to payment_options. Always empty for invoices created through /v1/invoices, which get every address at creation.

select_bystring (date-time) or null

Payment-link invoices only: if the payer has not picked a network by then, the invoice expires early (it never held a deposit address). null once a network was picked, and for every invoice created through /v1/invoices.

InvoiceEvent

One event on GET /v1/invoices/{id}/events. The SSE id: field is seq, the event: field is type, and data: is this object. Reconnect with Last-Event-ID: {seq} to resume.

FieldTypeDescription
seqrequiredinteger (int64)

Per-invoice sequence number, starting at 1, strictly increasing.

  • Minimum: 0
typerequiredstring

invoice.{status}, e.g. invoice.confirming.

  • Example: "invoice.confirming"
created_atrequiredstring (date-time)
datarequiredCheckoutStatus

InvoiceList

A page of invoices, newest first.

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
datarequiredarray of Invoice
has_morerequiredboolean
next_cursorstring or null

Pass as cursor to get the next page. null on the last page.

InvoiceStatus

Where an invoice is in its life.

detected → confirming → paid is the happy path. detected means a payment was seen but has no confirmations yet; confirming means it is gaining confirmations (see confirmations).

Type: string

  • One of: "awaiting_payment", "detected", "confirming", "partially_paid", "paid", "overpaid", "paid_late", "expired", "under_review", "cancelled"

InvoiceTotals

What the invoices say.

FieldTypeDescription
countrequiredinteger (int32)
  • Minimum: 0
paidrequiredstring

Σ received by paid (and paid late) invoices.

overpaidrequiredstring

Σ received by overpaid invoices (the excess is in refundable until refunded).

underpaidrequiredstring

Σ received by invoices that were not paid in full (partially paid, expired, cancelled).

in_progressrequiredstring

Σ received by invoices still in progress (awaiting, detected, confirming, under review).

refundablerequiredstring

Σ the invoices hold as refundable to payers, less refunds marked in the ledger.

refundedrequiredstring

Σ refunds recorded as sent.

refunds_openrequiredstring

Σ refunds created and not yet sent (awaiting claim, ready to send, in review).

suspenserequiredstring

Σ open suspense (same as chain.suspense).

by_statusrequiredarray of StatusTotal

LedgerBalances

Ledger balances as of a date, with the period's movement and the previous period's.

FieldTypeDescription
objectrequiredstring

Always ledger_balances.

  • Example: "ledger_balances"
livemoderequiredboolean
fromrequiredstring (date-time)

Start of the period (inclusive): opening balances are as of this moment.

torequiredstring (date-time)

End of the period (exclusive): closing balances are as of this moment.

previous_fromrequiredstring (date-time)

Start of the previous period, which ends at from and is as long as this one.

generated_atrequiredstring (date-time)
ledger_availablerequiredboolean

False on a server without a ledger (the in-memory demo): balances are then derived from the invoices, each dated at its creation.

assetsrequiredarray of AssetBalances

LedgerLine

One ledger account group of the cohort's journal entries.

FieldTypeDescription
accountrequiredstring

processor:{network}:{role}, merchant:{pending|available|reserved}, payer_refundable, suspense:{network}, fees:{kind} or fx:{pair}.

  • Example: "merchant:pending"
descriptionrequiredstring
debitsrequiredstring

Σ debit postings (decimal string).

creditsrequiredstring

Σ credit postings (decimal string).

balancerequiredstring

The balance on the account's normal side: positive = what the account normally holds.

LookupOutcome

What the lookup found, relative to this invoice.

Type: string

  • One of: "this_invoice", "reached_invoice_address", "not_this_invoice", "not_found"

LookupTransfer

One token transfer inside the looked-up transaction.

FieldTypeDescription
networkrequiredstring

CAIP-2 network.

network_namerequiredstring
assetstring or null

Asset code when the token is one we support, else null.

amountstring or null

Whole tokens, when the asset is known.

to_addressrequiredstring

Where it went, in the network's display form.

to_this_invoicerequiredboolean

It went to this invoice's deposit address on that network.

MarkRefundSentRequest

FieldTypeDescription
tx_hashrequiredstring

Your payout transaction (0x + 64 hex digits; TRON hashes without 0x are accepted too).

MerchantSettings

Merchant configuration for one mode (test and live are configured separately).

FieldTypeDescription
objectrequiredstring

Always merchant_settings.

  • Example: "merchant_settings"
livemoderequiredboolean
merchantrequiredstring
display_namerequiredstring

Shown to payers on the checkout.

webhook_urlstring or null
webhook_secret_last4string or null

The last four characters of the webhook signing secret, to tell secrets apart.

default_assetsrequiredarray of string

Assets offered when an invoice does not list its own.

available_assetsrequiredarray of string

Every asset this mode can accept.

underpay_tolerance_bpsrequiredinteger (int32)

Shortfall still counted as paid, in basis points of the amount due.

  • Minimum: 0
registered_destinationsrequiredarray of RegisteredDestination

NormalSide

Which side of an account normally holds its balance.

Type: string

  • One of: "debit", "credit"

PayerNotice

The payer's notification preference for one invoice.

FieldTypeDescription
objectrequiredstring

Always payer_notice.

  • Example: "payer_notice"
invoicerequiredstring
  • Example: "inv_00000000000000000000000000000001"
emailrequiredstring

The address, masked (p***@example.com). The full address is never returned.

  • Example: "p***@example.com"
localerequiredstring
receiptrequiredReceiptTiming
created_atrequiredstring (date-time)

PayerNotifyRequest

FieldTypeDescription
emailrequiredstring

Where to send the receipt (and any refund link).

  • Example: "payer@example.com"
localestring or null

The payer's language for the emails (en, ru, vi, ...). Default en.

  • Example: "en"
session_tokenrequiredstring

The checkout view's session_token for this invoice (the first one this page got). Once an address is set, only the same session may replace it.

  • Example: "cps_q0lW1y3r0n2E5oVb7yKpQmZt8xJcNfHaUgDsLiReTwA"

Payment

An on-chain transfer attributed to an invoice.

FieldTypeDescription
idrequiredstring
objectrequiredstring

Always payment.

  • Example: "payment"
livemoderequiredboolean
invoicerequiredstring
statusrequiredPaymentStatus
amountrequiredAssetMoney
networkrequiredstring
tx_hashrequiredstring
from_addressstring or null
to_addressrequiredstring
confirmationsrequiredConfirmations
detected_atrequiredstring (date-time)
confirmed_atstring (date-time) or null

A payment link, as the merchant sees it.

FieldTypeDescription
idrequiredstring
  • Example: "plink_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always payment_link.

  • Example: "payment_link"
livemoderequiredboolean
statusrequiredPaymentLinkStatus

Computed: whether a payer can use the link now.

activerequiredboolean

The merchant's switch. false stops new invoices; invoices already created are unaffected.

slugrequiredstring

The public part of the link's URL.

  • Example: "Q7vX2mKp9LzR4tWc8NbY3d"
urlstring or null

{checkout}/?link={slug} when this server knows its checkout origin, else null. The checkout needs your publishable key too: share {url}&key=cp_…_pk_….

amount_typerequiredAmountType
currencyrequiredstring

ISO 4217 code of every amount on the link.

  • Example: "USD"
amountstring or null

The price, as a decimal string (fixed links only).

  • Pattern: ^[0-9]+(\.[0-9]+)?$
  • Example: "25.00"
min_amountstring or null

The smallest amount a payer may choose (payer_chosen links only).

  • Pattern: ^[0-9]+(\.[0-9]+)?$
  • Example: "5.00"
max_amountstring or null

The largest amount a payer may choose (payer_chosen links only).

  • Pattern: ^[0-9]+(\.[0-9]+)?$
  • Example: "500.00"
descriptionstring or null

Shown to the payer and copied to each invoice.

assetsarray of string or null

Accepted assets. null = the merchant's default_assets when an invoice is created.

quantity_limitinteger (int32) or null

How many payments the link takes. null = unlimited.

  • Minimum: 0
quantity_usedrequiredinteger (int32)

Invoices created from this link on which a payment was seen.

  • Minimum: 0
quantity_reservedinteger (int32)

Open, unpaid invoices of this link. Each holds a unit until it is paid (then it counts in quantity_used), expires or is cancelled. Minting stops while quantity_used + quantity_reserved is at the limit.

  • Minimum: 0
invoices_createdrequiredinteger (int32)

Every invoice created from this link, paid or not.

  • Minimum: 0
expires_atstring (date-time) or null

After this, the link creates no more invoices.

metadatarequiredmap of string

Up to 20 merchant key/value pairs, copied to each invoice. Never shown to the payer.

created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

A page of payment links, newest first.

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
datarequiredarray of PaymentLink
has_morerequiredboolean
next_cursorstring or null

Pass as cursor to get the next page. null on the last page.

PaymentLinkStatus

Whether a payer can use the link right now.

Type: string

  • One of: "active", "inactive", "expired", "sold_out"

PaymentList

A page of payments, newest first.

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
datarequiredarray of Payment
has_morerequiredboolean
next_cursorstring or null

Pass as cursor to get the next page. null on the last page.

PaymentOption

One way to pay an invoice: an asset on a network, the amount that must arrive, and where to send it.

FieldTypeDescription
assetrequiredstring

Asset code, e.g. USDT@tron:mainnet.

symbolrequiredstring

Ticker as payers know it.

  • Example: "USDT"
networkrequiredstring

CAIP-2 network id.

  • Example: "tron:nile"
network_namerequiredstring

The network named the way exchanges name it.

  • Example: "TRON (TRC20)"
amount_duerequiredstring

Exactly how much must arrive, in whole tokens.

  • Example: "30"
addressrequiredstring

The deposit address, in the network's display form.

address_derivationrequiredAddressDerivation
payment_uristring or null

A wallet URI (EIP-681 on EVM networks) when one exists for the network.

PaymentStatus

Type: string

  • One of: "detected", "confirming", "confirmed", "reversed"

PaymentSummary

The payment currently being counted, as the checkout shows it.

FieldTypeDescription
networkrequiredstring
tx_hashrequiredstring

0x-hex transaction hash, or on Solana the transaction's base58 signature (informational: a hash never credits anything).

amountrequiredAssetMoney

PendingOption

A payment option offered without a deposit address yet (see [Invoice::pending_options]).

FieldTypeDescription
assetrequiredstring

Asset code, e.g. USDT@tron:mainnet. Pass it to POST /v1/checkout/invoices/{id}/payment_option.

symbolrequiredstring
  • Example: "USDT"
networkrequiredstring

CAIP-2 network id.

  • Example: "tron:nile"
network_namerequiredstring
  • Example: "TRON (TRC20)"
amount_duerequiredstring

Exactly how much must arrive, in whole tokens.

  • Example: "30"

Plan

A price and a billing interval. Immutable once created, except that it can be archived.

FieldTypeDescription
idrequiredstring
  • Example: "plan_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always plan.

  • Example: "plan"
livemoderequiredboolean
namerequiredstring
  • Example: "VIP rank, monthly"
amountrequiredFiatMoney

The price of one period.

intervalrequiredIntervalUnit
interval_countrequiredinteger (int32)

Periods are interval_count × interval long (e.g. 3 months).

  • Minimum: 0
trial_daysrequiredinteger (int32)

Free days before the first period (0 = none).

  • Minimum: 0
grace_daysrequiredinteger (int32)

Days after a renewal's due date before the subscription becomes past_due.

  • Minimum: 0
max_attemptsrequiredinteger (int32)

Payment attempts per period (the renewal invoice counts as the first); when every one closes unpaid, the subscription is cancelled.

  • Minimum: 0
assetsarray of string or null

Asset codes renewal invoices offer; null = the merchant's defaults at renewal time.

billing_timezonerequiredstring

IANA time zone the periods are counted in (month ends, DST).

  • Example: "UTC"
activerequiredboolean

Archived plans take no new subscriptions; existing ones keep renewing.

created_atrequiredstring (date-time)

PlanList

A page of plans, newest first.

FieldTypeDescription
objectrequiredstring
  • Example: "list"
datarequiredarray of Plan
has_morerequiredboolean
next_cursorstring or null

ReceiptTiming

When the receipt goes out.

Type: string

  • One of: "queued", "on_payment"

Reconciliation

A reconciliation report.

FieldTypeDescription
objectrequiredstring

Always reconciliation.

  • Example: "reconciliation"
livemoderequiredboolean
fromrequiredstring (date-time)

Start of the period (inclusive): invoices created at or after it.

torequiredstring (date-time)

End of the period (exclusive).

generated_atrequiredstring (date-time)
statusrequiredReconciliationStatus

The worst status of any asset (balanced when there is nothing to reconcile).

ledger_availablerequiredboolean

False on a server without a ledger (the in-memory demo): ledger lines are then empty.

assetsrequiredarray of AssetReconciliation

ReconciliationStatus

How a report (or one asset of it) came out.

Type: string

  • One of: "balanced", "explained", "attention"

Refund

A refund the merchant owes a payer. Tillsafe never sends it: the merchant does, from their wallet.

FieldTypeDescription
idrequiredstring
  • Example: "rfd_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always refund.

  • Example: "refund"
livemoderequiredboolean
invoicerequiredstring
statusrequiredRefundStatus
reasonrequiredRefundReason
amountrequiredAssetMoney

How much to send, in whole tokens. The same amount on whichever network the payer picks.

claim_networksrequiredarray of string

Networks the payer may choose from (CAIP-2).

claim_tokenrequiredstring

The claim capability. Give the payer claim_url (or build a link with this token); whoever holds it can choose the payout address. Empty on the dashboard for roles that may not manage refunds.

claim_urlstring or null

{checkout origin}/?claim={claim_token} when the API knows the checkout origin, else null.

claim_expires_atrequiredstring (date-time)
payoutRefundPayout or null
sent_tx_hashstring or null

The merchant's payout transaction, once recorded.

sent_atstring (date-time) or null
cancelled_atstring (date-time) or null
created_atrequiredstring (date-time)

RefundClaim

The payer's view of a refund, reached with the claim token alone. No invoice metadata, no screening detail, no merchant settings: only what the claim screen needs.

FieldTypeDescription
objectrequiredstring

Always refund_claim.

  • Example: "refund_claim"
livemoderequiredboolean
statusrequiredRefundStatus

awaiting_claim until the payer submits; in_review means the merchant must look first.

merchantrequiredCheckoutMerchant
amountrequiredAssetMoney
symbolrequiredstring
  • Example: "USDT"
networksrequiredarray of ClaimNetwork
payoutClaimPayout or null
sent_tx_hashstring or null
expires_atrequiredstring (date-time)

RefundList

A page of refunds, newest first.

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
datarequiredarray of Refund
has_morerequiredboolean
next_cursorstring or null

RefundPayout

Where the payer asked to be paid, and how that address screened.

FieldTypeDescription
networkrequiredstring

CAIP-2 network the payer chose.

network_namerequiredstring
  • Example: "TRON (TRC20)"
assetrequiredstring

The asset to send on that network, e.g. USDT@tron:mainnet.

addressrequiredstring

The payer's address, in the network's display form.

submitted_atrequiredstring (date-time)
screeningrequiredScreening

RefundReason

Why the merchant is refunding.

Type: string

  • One of: "overpayment", "wrong_asset", "late_payment", "other"

RefundStatus

Where a refund is.

Type: string

  • One of: "awaiting_claim", "ready_to_send", "in_review", "sent", "cancelled", "expired"

RegisteredDerivation

FieldTypeDescription
registered_destinationrequiredstring

Must equal the deposit address and one of the merchant's pinned receive addresses.

RegisteredDestination

A merchant receive address, registered through a separately authenticated flow. API keys cannot change these.

FieldTypeDescription
networkrequiredstring
addressrequiredstring

ResolveReviewRequest

FieldTypeDescription
decisionrequiredReviewDecision
reasonrequiredstring

Why, for your records and the webhook (1 to 500 characters).

  • Example: "Customer verified by phone"

ReviewDecision

Accept or reject a held payment.

Type: string

  • One of: "accept", "reject"

Screening

The screening of one payout address.

FieldTypeDescription
resultrequiredScreeningResult
checked_atrequiredstring (date-time)
checksrequiredarray of ScreeningCheck

ScreeningCheck

One screening check.

FieldTypeDescription
listrequiredstring

ofac_sdn or issuer_blacklist.

  • Example: "ofac_sdn"
resultrequiredCheckResult
sourcestring or null

Which list version or contract was consulted, e.g. the SDN extract's fetch date.

detailstring or null

Why a check did not apply or could not run.

ScreeningResult

Overall screening verdict.

Type: string

  • One of: "clear", "match", "incomplete"

SelectPaymentOptionRequest

FieldTypeDescription
assetrequiredstring

One of the invoice's pending_options[].asset (or payment_options[].asset, which changes nothing).

  • Example: "USDT@tron:nile"

Severity

Type: string

  • One of: "explained", "flagged"

SimulatePaymentRequest

FieldTypeDescription
assetstring or null

The payment option to pay: an asset code (USDT@tron:nile), or a symbol (USDT) together with network. Defaults to the invoice's first payment option.

  • Example: "USDT@tron:nile"
networkstring or null

CAIP-2 network (tron:nile). Optional when asset is a full asset code (then it must match).

amountstring or null

Whole tokens to "send", as a decimal string. Defaults to the option's amount due. Send more to test an overpayment, less for an underpayment.

  • Example: "50"
finality_stepsarray of string or null

Finality levels the payment passes through, in order: pending, included, safe, final. Default ["included", "final"]. The in-memory demo server runs its own confirmation timer instead.

StatusTotal

Invoices of one status.

FieldTypeDescription
statusrequiredInvoiceStatus
countrequiredinteger (int32)
  • Minimum: 0
receivedrequiredstring

Σ received in this asset.

SubmitClaimRequest

FieldTypeDescription
networkrequiredstring

One of the claim's networks[].network.

  • Example: "tron:mainnet"
addressrequiredstring

Your address on that network. For an exchange account, your deposit address for this asset on exactly this network.

Subscription

A customer's recurring purchase of a plan.

FieldTypeDescription
idrequiredstring
  • Example: "sub_4f1c2a9e0b7d4c3a8e6f5d4c3b2a1908"
objectrequiredstring

Always subscription.

  • Example: "subscription"
livemoderequiredboolean
customerrequiredstring
planrequiredPlan
statusrequiredSubscriptionStatus
current_period_startrequiredstring (date-time)

The period the subscription is in now (the trial, while in trial).

current_period_endrequiredstring (date-time)
trial_endstring (date-time) or null
paid_throughstring (date-time) or null

Everything up to here is paid for.

next_payment_due_atstring (date-time) or null

When the next unpaid period is due; null once cancelled or while paused.

payment_attemptsrequiredinteger (int32)

Attempts made for the next unpaid period (0 until its renewal invoice exists).

  • Minimum: 0
latest_invoicestring or null

The newest invoice this subscription created.

cancel_at_period_endrequiredboolean
cancelled_atstring (date-time) or null
cancellation_reasonCancellationReason or null
paused_atstring (date-time) or null
metadatarequiredmap of string
created_atrequiredstring (date-time)

SubscriptionList

FieldTypeDescription
objectrequiredstring
  • Example: "list"
datarequiredarray of Subscription
has_morerequiredboolean
next_cursorstring or null

SubscriptionStatus

Where a subscription is.

Type: string

  • One of: "incomplete", "active", "past_due", "paused", "cancelled"

TopUpRequest

POST /v1/customers/{id}/top_up: an invoice whose payment becomes prepaid credit.

FieldTypeDescription
amountrequiredstring
  • Example: "30.00"
currencyrequiredstring
  • Example: "USD"
assetsarray of string or null

TransferRef

One on-chain transfer.

FieldTypeDescription
networkrequiredstring

CAIP-2 network.

tx_hashrequiredstring
indexrequiredinteger (int32)

Log / output index within the transaction.

  • Minimum: 0

TxLookup

FieldTypeDescription
objectrequiredstring

Always tx_lookup.

  • Example: "tx_lookup"
tx_hashrequiredstring

The hash as looked up (0x + 64 lowercase hex digits), or a Solana signature (base58).

outcomerequiredLookupOutcome
networkstring or null

The network the transaction was found on.

transfersrequiredarray of LookupTransfer
payment_statusPaymentStatus or null
checked_networksrequiredarray of string

Networks that were searched (CAIP-2).

UpdatePaymentLinkRequest

POST /v1/payment_links/{id} body. Omitted fields are unchanged; null clears an optional field. Changes apply to invoices created afterwards only.

FieldTypeDescription
activeboolean or null

false deactivates the link: no new invoices; existing ones are unaffected.

amount_typeAmountType or null
currencystring or null
amountstring or null
min_amountstring or null
max_amountstring or null
descriptionstring or null
assetsarray of string or null

null = the merchant's defaults.

quantity_limitinteger (int32) or null

null = unlimited.

  • Minimum: 0
expires_atstring (date-time) or null

null = never expires.

metadatamap of string or null

Replaces the metadata.

UpdateSettingsRequest

POST /v1/merchant/settings body. Omitted fields are unchanged; webhook_url: null removes the URL.

FieldTypeDescription
display_namestring or null
webhook_urlstring or null

https:// URL of your webhook endpoint, or null to stop deliveries.

default_assetsarray of string or null
underpay_tolerance_bpsinteger (int32) or null
  • Minimum: 0

WalletBinding

The transfer the connected wallet must send.

FieldTypeDescription
objectrequiredstring

Always wallet_binding.

  • Example: "wallet_binding"
invoicerequiredstring
  • Example: "inv_00000000000000000000000000000001"
assetrequiredstring
  • Example: "USDT@eip155:97"
networkrequiredstring

CAIP-2 network.

  • Example: "eip155:97"
senderrequiredstring

The bound wallet address (display form). Only a transfer from it is attributed.

treasuryrequiredstring

Where to send: the merchant's registered destination on this network (display form). The checkout checks it against the destination the deposit addresses commit to, and against the merchant's pins, before building the transfer.

token_contractstring or null

The token contract (display form); null for the network's native coin.

decimalsrequiredinteger (int32)

The token's decimals.

  • Minimum: 0
amountrequiredstring

Send exactly this, in whole tokens (decimal string). The amount due plus the uniqueness suffix.

  • Example: "50.000001"
amount_base_unitsrequiredstring

The same amount in base units (decimal string): what goes into the transfer call.

  • Example: "50000001000000000000"
amount_duerequiredstring

The invoice's amount due in this asset (whole tokens). amount − amount_due is the suffix.

  • Example: "50"
window_ends_atrequiredstring (date-time)

A transfer arriving after this is not attributed by this binding.

WalletBindingRequest

FieldTypeDescription
assetrequiredstring

The payment option to pay: its asset code, SYMBOL@network (one of the invoice's options).

  • Example: "USDT@eip155:97"
senderrequiredstring

The connected wallet's address on that network, in its display form (0x… or T…). The transfer must come from exactly this address.

  • Example: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"

WebhookDelivery

One attempt to deliver a webhook event to the merchant's endpoint.

FieldTypeDescription
idrequiredstring
objectrequiredstring

Always webhook_delivery.

  • Example: "webhook_delivery"
livemoderequiredboolean
event_idrequiredstring
event_typerequiredstring
  • Example: "invoice.paid"
invoicestring or null

The invoice the event is about (inv_…). Every invoice and refund event has one; payment_link.* events, and subscription events that are not about an invoice, have null.

urlrequiredstring
statusrequiredDeliveryStatus
attemptrequiredinteger (int32)

1 for the first attempt of this delivery.

  • Minimum: 0
status_codeinteger (int32) or null
  • Minimum: 0
latency_msinteger (int32) or null
  • Minimum: 0
errorstring or null
response_snippetstring or null

The first 1 KiB of the endpoint's response body.

replay_ofstring or null

The delivery this one replays, if it is a replay.

created_atrequiredstring (date-time)

WebhookDeliveryList

A page of webhook deliveries, newest first.

FieldTypeDescription
objectrequiredstring

Always list.

  • Example: "list"
datarequiredarray of WebhookDelivery
has_morerequiredboolean
next_cursorstring or null

Pass as cursor to get the next page. null on the last page.

WebhookSecret

A newly created webhook signing secret. Shown once.

FieldTypeDescription
objectrequiredstring

Always webhook_secret.

  • Example: "webhook_secret"
secretrequiredstring
  • Example: "whsec_…"