Skip to content

Errors ​

Every error is an RFC 9457 problem, with Content-Type: application/problem+json:

json
{
  "type": "https://docs.txgold.money/errors/insufficient_balance",
  "title": "Insufficient balance",
  "status": 422,
  "code": "insufficient_balance",
  "detail": "Insufficient Balance to process transaction",
  "requestId": "7219af94e39d"
}
  • code is what your code branches on. It never changes once published; the title and detail text may. New codes can be added at any time, so handle unknown ones by their status.
  • requestId is also in the X-Request-Id header of every response. Quote it to TxGold support.
  • errors appears on invalid_request: each bad field with its problems.
  • The SDKs raise one exception type with these fields: TxGoldApiError (JavaScript, Python) and TxGoldApiException (C#).

What the statuses mean:

StatusMeaningRetry?
400The request is wrongNo: fix it first
401Who's calling can't be establishedNo: fix the key, clock or signature
403The key may not do thisNo
404Not found, or not yoursNo
409Conflicts with the current stateNo
413Body over 64 KBNo
422Well-formed, but a business rule refuses itNot without changing something
500, 503TxGold's sideYes, with the same timestamp (how)

All codes ​

CodeStatusTitle
invalid_request400Invalid request
invalid_signature401Invalid signature
timestamp_out_of_range401Timestamp out of range
key_not_found401Key not found
key_expired401Key expired
forbidden403Forbidden
not_found404Not found
duplicate_request409Duplicate request
already_refunded409Already refunded
request_not_pending409Payment request is not pending
payload_too_large413Payload too large
insufficient_balance422Insufficient balance
same_account422Source and destination are the same account
amount_below_minimum422Amount below minimum
source_account_inactive422Source account inactive
identity_check_required422Identity check required
destination_account_invalid422Destination account invalid
daily_send_limit_exceeded422Daily send limit exceeded
recipient_balance_limit_exceeded422Recipient balance limit exceeded
refund_exceeds_original422Refund exceeds original payment
amount_must_match_request422Amount must match the payment request
payment_request_not_payable422Payment request cancelled or expired
payer_account_invalid422Payer account invalid
payer_not_demo_customer422Payer is not a sandbox demo customer
business_rule_violation422Business rule violation
internal_error500Internal error
rate_unavailable503Rate unavailable
sandbox_unavailable503Sandbox unavailable

Business portal codes ​

These go to the business portal and the TxGold app. Integrations don't receive them.

CodeStatusTitle
session_not_found401Portal session not found
session_expired401Portal session expired
sign_in_pending401Sign-in not yet approved
not_pending409Not pending
key_already_registered409Key already registered
approval_required422Approval required

The SDKs are MIT licensed.