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.

Transaction Events

Transaction events fire in real time as card activity occurs on the Visa/Mastercard network. Subscribe to these events to build live transaction feeds, send push notifications, and enforce spending controls. All transaction events share the same outer envelope:
{
  "event":       "TRANSACTION_AUTHORIZED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T10:00:00Z",
  "data": { ... }
}

TRANSACTION_AUTHORIZED

When it fires

Fires when a cardholder makes a purchase and the authorization is approved. The funds are reserved on the card but not yet permanently settled — a subsequent TRANSACTION_CLEARED event confirms final settlement. This is the earliest signal that a transaction has occurred. Use it to show pending activity in real time.

Payload

{
  "event":       "TRANSACTION_AUTHORIZED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T10:00:00Z",
  "data": {
    "transactionId":        "txn_01HXYZ8888ABCDEF9999",
    "cardId":               "crd_01HXYZ5555ABCDEF1111",
    "programId":            "prg_01HXYZ9876ABCDEF0000",
    "cardholderId":         "chl_01HXYZ1234ABCDEF5678",
    "externalId":           "my-user-id-789",
    "type":                 "AUTHORIZATION",
    "status":               "PENDING",
    "amountCents":          2999,
    "currency":             "USD",
    "billingAmountCents":   2999,
    "billingCurrency":      "USD",
    "exchangeRate":         null,
    "relatedTransactionId": null,
    "merchant": {
      "name":           "Amazon",
      "id":             "AMZN_MERCHANT_001",
      "city":           "Seattle",
      "country":        "US",
      "mcc":            "5999",
      "mccDescription": "Miscellaneous General Merchandise"
    }
  }
}

Payload fields

FieldTypeDescription
transactionIdstringUnique transaction identifier
cardIdstringThe card used
programIdstringThe card’s program
cardholderIdstringThe cardholder (best-effort — may be absent if not resolvable)
externalIdstring or nullYour internal user ID from the cardholder profile
typestringAlways AUTHORIZATION for this event
statusstringAlways PENDING for this event
amountCentsintegerTransaction amount in cents
currencystringTransaction currency (ISO 4217)
billingAmountCentsintegerAmount in the card’s billing currency (in cents)
billingCurrencystringCard billing currency (may differ for cross-border transactions)
exchangeRatenumber or nullFX rate applied — null for same-currency
relatedTransactionIdstring or nullAlways null for authorizations
merchantobjectMerchant details — may be absent for non-purchase transactions
merchant.namestringMerchant name
merchant.idstringMerchant identifier from the network
merchant.citystringMerchant city
merchant.countrystringMerchant country (ISO 3166-1 alpha-2)
merchant.mccstringISO 18245 Merchant Category Code
merchant.mccDescriptionstringHuman-readable MCC description

Common use cases

  • Show a “Pending” transaction in the cardholder’s transaction history
  • Send a real-time push notification: “$29.99 at Amazon — pending”
  • Implement MCC-based spending controls (alert or block certain categories)

TRANSACTION_CLEARED

When it fires

Fires when a pending authorization is settled by the merchant. This is the final, permanent state — funds are now permanently debited from the card. The relatedTransactionId links back to the original TRANSACTION_AUTHORIZED event.

Payload

{
  "event":       "TRANSACTION_CLEARED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T12:00:00Z",
  "data": {
    "transactionId":        "txn_01HXYZ7777ABCDEF9999",
    "cardId":               "crd_01HXYZ5555ABCDEF1111",
    "programId":            "prg_01HXYZ9876ABCDEF0000",
    "cardholderId":         "chl_01HXYZ1234ABCDEF5678",
    "externalId":           "my-user-id-789",
    "type":                 "CLEARING",
    "status":               "SETTLED",
    "amountCents":          2999,
    "currency":             "USD",
    "billingAmountCents":   2999,
    "billingCurrency":      "USD",
    "exchangeRate":         null,
    "relatedTransactionId": "txn_01HXYZ8888ABCDEF9999",
    "merchant": {
      "name":           "Amazon",
      "id":             "AMZN_MERCHANT_001",
      "city":           "Seattle",
      "country":        "US",
      "mcc":            "5999",
      "mccDescription": "Miscellaneous General Merchandise"
    }
  }
}

Payload fields

FieldTypeDescription
transactionIdstringUnique transaction identifier for this clearing event
relatedTransactionIdstringThe original TRANSACTION_AUTHORIZED transaction ID
typestringAlways CLEARING for this event
statusstringAlways SETTLED for this event
All other fieldsSame as TRANSACTION_AUTHORIZED

Common use cases

  • Move the transaction from “Pending” to “Settled” in your UI
  • Update your ledger or reporting systems with the final settled amount
  • Note: the settled amount may differ slightly from the authorized amount (tip adjustments, etc.)

TRANSACTION_REVERSED

When it fires

Fires when a previously cleared (or authorized) transaction is reversed. This typically occurs when a merchant issues a refund or when the authorization expires without a clearing.

Payload

{
  "event":       "TRANSACTION_REVERSED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T14:00:00Z",
  "data": {
    "transactionId":        "txn_01HXYZ6666ABCDEF9999",
    "cardId":               "crd_01HXYZ5555ABCDEF1111",
    "programId":            "prg_01HXYZ9876ABCDEF0000",
    "cardholderId":         "chl_01HXYZ1234ABCDEF5678",
    "externalId":           "my-user-id-789",
    "type":                 "REVERSAL",
    "status":               "REVERSED",
    "amountCents":          2999,
    "currency":             "USD",
    "billingAmountCents":   2999,
    "billingCurrency":      "USD",
    "exchangeRate":         null,
    "relatedTransactionId": "txn_01HXYZ7777ABCDEF9999",
    "merchant": {
      "name":           "Amazon",
      "id":             "AMZN_MERCHANT_001",
      "city":           "Seattle",
      "country":        "US",
      "mcc":            "5999",
      "mccDescription": "Miscellaneous General Merchandise"
    }
  }
}

Payload fields

FieldTypeDescription
transactionIdstringUnique transaction identifier for this reversal event
relatedTransactionIdstringThe original transaction that was reversed
typestringAlways REVERSAL for this event
statusstringAlways REVERSED for this event
amountCentsintegerAmount reversed (returned to the card) in cents
All other fieldsSame as TRANSACTION_AUTHORIZED

Common use cases

  • Mark the original transaction as refunded in your cardholder’s history
  • Notify the cardholder: “Your $29.99 refund from Amazon has been processed”
  • Update running balance displays

TRANSACTION_DECLINED

When it fires

Fires when a card authorization is declined. The decline may originate from FYATU (insufficient balance, frozen card) or from the card network (merchant restrictions, limits).
No funds are moved on a decline. The card balance is unchanged.

Payload

{
  "event":       "TRANSACTION_DECLINED",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T10:00:00Z",
  "data": {
    "transactionId":  "txn_01HXYZ5555ABCDEF9999",
    "cardId":         "crd_01HXYZ5555ABCDEF1111",
    "programId":      "prg_01HXYZ9876ABCDEF0000",
    "cardholderId":   "chl_01HXYZ1234ABCDEF5678",
    "externalId":     "my-user-id-789",
    "type":           "DECLINE",
    "status":         "DECLINED",
    "amountCents":    2999,
    "currency":       "USD",
    "declineReason":  "INSUFFICIENT_BALANCE",
    "merchant": {
      "name":           "Netflix",
      "id":             "NFLX_MERCHANT_001",
      "city":           "Los Gatos",
      "country":        "US",
      "mcc":            "7812",
      "mccDescription": "Motion Picture Theaters"
    }
  }
}

Payload fields

FieldTypeDescription
transactionIdstringUnique transaction identifier for this decline event
typestringAlways DECLINE for this event
statusstringAlways DECLINED for this event
amountCentsintegerAmount that was attempted in cents
declineReasonstringMachine-readable decline reason — see values below
All other fieldsSame as TRANSACTION_AUTHORIZED
Decline reason values:
ValueMeaning
INSUFFICIENT_BALANCECard balance too low for the purchase
CARD_FROZENCard is frozen — no new transactions permitted
CARD_TERMINATEDCard has been terminated
CARDHOLDER_SUSPENDEDCardholder account is suspended
MERCHANT_BLOCKEDMerchant is on a block list for this program
MCC_BLOCKEDMerchant Category Code is blocked for this program
VELOCITY_EXCEEDEDTransaction velocity limit exceeded
NETWORK_DECLINEDDeclined by the card network (reason opaque)
FRAUD_SUSPECTEDSuspected fraud — automatic decline
EXPIRED_CARDCard has passed its expiry date

Common use cases

  • Notify the cardholder in real time: “Your $29.99 payment at Netflix was declined — insufficient balance”
  • Prompt the cardholder to top up their card
  • Log decline patterns to detect fraud or program configuration issues

TRANSACTION_FEE

When it fires

Fires when a fee is posted against the card. This includes cross-border transaction fees, decline fees, and any other card-level fee configured for the program.

Payload

{
  "event":       "TRANSACTION_FEE",
  "eventId":     "evt_01HXY123456ABCDEF",
  "businessId":  "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":   "2026-05-22T10:00:00Z",
  "data": {
    "transactionId":        "txn_01HXYZ4444ABCDEF9999",
    "cardId":               "crd_01HXYZ5555ABCDEF1111",
    "programId":            "prg_01HXYZ9876ABCDEF0000",
    "cardholderId":         "chl_01HXYZ1234ABCDEF5678",
    "externalId":           "my-user-id-789",
    "type":                 "FEE",
    "status":               "SETTLED",
    "amountCents":          150,
    "currency":             "USD",
    "feeType":              "CROSS_BORDER",
    "relatedTransactionId": "txn_01HXYZ7777ABCDEF9999"
  }
}

Payload fields

FieldTypeDescription
transactionIdstringUnique transaction identifier for this fee event
typestringAlways FEE for this event
statusstringAlways SETTLED for this event
amountCentsintegerFee amount in cents
feeTypestringType of fee — see values below
relatedTransactionIdstring or nullThe transaction that triggered the fee, if applicable
All other fieldsSame as TRANSACTION_AUTHORIZED
Fee type values:
ValueMeaning
CROSS_BORDERInternational transaction fee
DECLINEFee charged for declined authorization
MAINTENANCEPeriodic card maintenance fee
REPLACEMENTFee for card replacement
ATM_WITHDRAWALATM cash withdrawal fee
OTHEROther fee type — see your program agreement

Common use cases

  • Show fees as separate line items in the cardholder’s transaction history
  • Sum fees for billing transparency and reconciliation