TillsafeDocstillsafe.comRequest early access

Test helpers

Test mode only: simulate chain activity

POST /v1/test_helpers/invoices/{id}/simulate_payment

Simulate a payment (test mode only).

A synthetic transfer to the invoice's real deposit address goes through the real pipeline (attribution by the address lease, confirmation policy, invoice state machine, ledger, live status, webhooks), once per finality step. It never touches a chain and never exists in live mode.

Authentication: Secret key

Parameters

ParameterInTypeDescription
idrequiredpathstring

Invoice id (inv_…)

Idempotency-Keyrequiredheaderstring

Unique per simulated payment

Request body

application/json

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.

Responses

StatusDescriptionBody
200

The invoice after the simulated payment

Invoice application/json
400
ErrorResponse application/json
403

Not a test-mode key

ErrorResponse application/json
404

No such invoice, or a live-mode server

ErrorResponse application/json