Transaction

A Transaction represents the public information available for every Ansa transaction. All movements of money through our closed-loop system will have a corresponding transaction, such as for each add balance, use balance, refund, or fund balance request.

Transaction attributes

FieldTypeDescriptionExample value
transactionIdstringUnique identifier for the transaction.2aa3d415-8256-4d0e-97a1-7cd0a09e0230
transactionTypestring

The type of transaction.

Possible values are:
  • add_balance
  • use_balance
  • merchant_refund
  • refund_payment_method
  • merchant_add_promo
use_balance
amountintegerThe transaction amount. Always a positive integer, in the smallest currency unit used in the original transaction (eg $10.00 USD would be 1000).
currencystringThe three-letter ISO currency code in uppercase.USD
createdtimestampThe timestamp (in RFC 3339 format) when the transaction was created.2022-12-08T23:47:41.643Z
transactionSourcestring

What source created this transaction.

Possible values are:
  • addBalance
  • useBalance
  • useBalanceAndReload
  • autoReload
paymentMethodIdstringThe identifier of which payment method was associated with this transaction. Only present for add_balance transactions.
reasonstringMerchant supplied a reason for why the transaction occurred. Only present for merchant_refund or merchant_add_promo transactions.
fromstringUnique identifier for who this transaction was from. Either the merchant ID or a customer ID.
tostringUnique identifier for who this transaction was to. Either the merchant ID or a customer ID.
metadataobjectFree form metadata JSON object. This will exactly match any metadata argument passed to a transaction API, such as Add balance, Use balance, or Fund customer balance.
labelstringMerchant provided label for this transaction. Often used to store a reference to another system, such as an OrderId or an EventId within your system.