Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fyatu.com/llms.txt

Use this file to discover all available pages before exploring further.

Account Events

Account events fire when significant milestones occur on your program’s balance or when withdrawal requests change state. Subscribe to these events to automate balance management and keep your finance team informed. All account events share the same outer envelope:
{
  "event":       "ACCOUNT_LOW_BALANCE",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T10:00:00Z",
  "data": { ... }
}

ACCOUNT_LOW_BALANCE

When it fires

Fires when a card funding operation causes the program ledger balance to fall below the lowBalanceThreshold configured for the program. This is your early warning to top up before card funding fails. Configure the threshold in the portal under Programs → Settings.

Payload

{
  "event":       "ACCOUNT_LOW_BALANCE",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T14:00:00Z",
  "data": {
    "programId":      "prg_01HXYZ9876ABCDEF0000",
    "balanceCents":   250000,
    "thresholdCents": 500000,
    "timestamp":      "2026-05-22T14:00:00Z"
  }
}

Payload fields

FieldTypeDescription
programIdstringThe program with low balance
balanceCentsintegerCurrent program ledger balance in cents
thresholdCentsintegerThe configured low-balance threshold in cents
timestampstringISO 8601 timestamp

Common use cases

  • Send an automated alert to your finance team
  • Trigger a crypto deposit to replenish the program
  • Temporarily pause new card loads until the balance is replenished
If you ignore ACCOUNT_LOW_BALANCE and the balance reaches zero, all subsequent card fund calls will fail with INSUFFICIENT_PROGRAM_BALANCE.

ACCOUNT_WITHDRAWAL_INITIATED

When it fires

Fires when a withdrawal request from the program ledger is created. The requested funds are reserved in a suspense ledger while the transfer is processed.

Payload

{
  "event":       "ACCOUNT_WITHDRAWAL_INITIATED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T15:00:00Z",
  "data": {
    "withdrawalId": "wdr_01HXYZ6666ABCDEF0000",
    "programId":    "prg_01HXYZ9876ABCDEF0000",
    "amount":       5000.00,
    "token":        "USDT",
    "network":      "TRC20",
    "toAddress":    "TXyZ1234567890abcdef1234567890abcdef12",
    "timestamp":    "2026-05-22T15:00:00Z"
  }
}

Payload fields

FieldTypeDescription
withdrawalIdstringUnique withdrawal identifier
programIdstringThe program being withdrawn from
amountnumberWithdrawal amount (in dollars)
tokenstringUSDT or USDC
networkstringTRC20 or ERC20
toAddressstringDestination wallet address
timestampstringISO 8601 timestamp

Common use cases

  • Show a “Withdrawal pending” status in your portal
  • Record the withdrawal request for reconciliation

ACCOUNT_WITHDRAWAL_COMPLETED

When it fires

Fires when a withdrawal has been broadcast to the blockchain and the funds have left the FYATU system.
This event will be dispatched in a future release. Subscribe to it now so your integration is ready when it goes live.

ACCOUNT_WITHDRAWAL_FAILED

When it fires

Fires when a withdrawal cannot be completed. The reserved funds are automatically returned to the program ledger.
This event will be dispatched in a future release. Subscribe to it now so your integration is ready when it goes live.