Ledgers

A ledger is a resource created for a transfer that contains a credit or debit to the user’s balance depending on an action in the UnivaPay system. Ledgers are similar to charges and refunds with the transaction fees subtracted from the amount.

The following actions can generate a ledger (that will be associated with a transfer eventually).

  • Successful charges
  • Successful refunds
  • A bank fee that occurs when transferring money into a user’s account
  • Special circumstances that it may be necessary to debit or credit a user’s account.

The ledger object

Fields
idstring (UUID)
the unique identifier for the resource
merchant_idstring (UUID)
the identifier of the merchant associated with
store_idstring (UUID)
the identifier of the store associated with the transfer
amountnumber
The amount that is credited or debited. This can be a negative number
currencystring (ISO-4217)
The currency the amount is in
amount_formattedstring
The amount that was credited or debited formatted to include a decimal place if there is a minor currency unit.
percent_feenumber
The percent of the original transaction to was subtracted as a transaction fee
flat_feenumber
The amount of the original transaction that subtracted as a flat transaction fee
flat_fee_currencystring (ISO-4217)
The currency of the flat_fee
flat_fee_formattedstring
The amount that was subtracted as a flat_fee formatted to include a decimal place if there is a minor currency unit.
exchange_ratenumber
if the user’s bank account is in a different currency from the charge or refund amount, this is the exchange rate used to convert to the bank account’s currency.
created_onstring (ISO-8601)
The date the ledger was created on.