Skip to Content
Paycose Docs
Balance transactions

Balance transactions

The balance_transaction object

A balance transaction is one entry in a balance's ledger. Paycose writes them for every charge, refund, dispute, fee, transfer and payout, so an account's balance transactions explain its balance. Record-only entries track money held outside Paycose and never change an amount you can pay out.

Attributes

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • amountintegerRequired

    Gross amount of the entry, before fees and any reserve, in the currency's smallest unit (for example 49900 = 499.00 THB); positive when it adds to the balance, negative when it takes from it. amount minus fee is net.

  • currencystringRequired

    Three-letter ISO 4217 currency code, in lowercase.

  • scaling_factorintegerRequired

    Number of smallest units in one unit of the currency, for example 100 for THB. Divide an amount by it to get major units.

  • statestringRequired

    Whether the entry counts toward the available balance yet.

    • pending

      Not available yet; it becomes available on available_on.

    • completed

      Booked and counted in the available balance.

    • held

      Money set aside for something on its way out, such as a payout or transfer in progress; not available.

    • settled

      Takes held money out of the balance once the payout or transfer it was held for goes ahead.

    • released

      Held money that was let go, so it is available again.

    • refunded

      Returns money to a customer for a refund or a voided charge.

  • descriptionstringRequired

    Human-readable description of the entry, such as the charge or settlement it belongs to.

  • original_amountintegerRequired

    For a converted entry, the amount before conversion, in the smallest unit of original_currency; 0 otherwise.

  • original_currencystringRequired

    For a converted entry, the currency before conversion; empty otherwise.

  • exchange_ratenumberRequired

    For a converted entry, the rate used: units of currency for one unit of original_currency; 0 otherwise.

  • balance_idstringRequired

    ID of the balance the entry was booked to.

  • accountstring | object (account)Expandable

    ID of the account that owns the balance. Omitted when it cannot be determined.

  • account_namestringRequired

    Display name of the connected account that owns this balance; empty for your own account.

  • event_typestringRequired

    Kind of event that produced the entry.

    • charge

      A charge.

    • refund

      A refund of a charge.

    • dispute

      A dispute of a charge.

    • transfer

      A transfer between balances.

    • payout

      A payout to a bank account.

    • reserve

      Money moved into or released from a reserve.

    • application_fee

      An application fee, such as a refund made directly on the fee.

    • connected_settlement

      A settlement recorded for a connected account.

    • connected_move

      Money a connected account held, moved to your own account when connected accounts stopped holding money.

    • topup

      A purchase of Paycose credit.

    • platform_credit

      An adjustment of your Paycose credit.

  • event_idstringRequired

    ID of the object that produced the entry, such as a charge, refund, transfer or payout.

  • parent_event_typestringRequired

    Kind of the object the event belongs to, such as charge for a refund of that charge; empty when there is none.

  • parent_event_idstringRequired

    ID of the object the event belongs to, such as the charge of a refund or dispute; empty when there is none.

  • transfer_idstringRequired

    ID of the transfer the entry belongs to; empty otherwise.

  • journal_idstringRequired

    ID of the journal the entry was posted in. Entries posted together as one balanced set share it.

  • categorystringRequired

    Which part of a payment the entry books.

    Show 14 possible values
    • main_payment

      The payment itself.

    • main_refund

      Money returned by a refund or a lost dispute.

    • gateway_fee

      Paycose's fee.

    • provider_fee

      A fee charged by a payment provider.

    • application_fee

      An application fee.

    • application_fee_refund

      A refund of an application fee.

    • application_tax

      Tax collected with an application fee.

    • vat

      Value-added tax, such as on a Paycose credit purchase.

    • transfer_reversal

      A reversed transfer.

    • connected_share

      The share of a destination charge you owe the connected account (record-only).

    • connected_settlement

      A payment to a connected account that lowers what you owe it (record-only).

    • connected_adjustment

      A change to what you owe a connected account, such as from an application fee refund (record-only).

    • connected_carried_over

      What a connected account held when it stopped holding money, carried over as owed to it (record-only).

    • credit_burn

      Paycose credit used to pay a fee.

  • forex_quote_idstringRequired

    ID of the forex quote used to convert the entry; empty when none was used.

  • available_ontimestampRequiredNullable

    When the entry's funds become available, in Unix seconds. An entry that was never pending, a record-only one included, reports the time it was created.

  • typestringRequired

    Kind of transaction, named as Stripe names balance transaction types.

    Show 13 possible values
    • charge

      Money from a charge.

    • application_fee

      An application fee you earned.

    • application_fee_refund

      A refund of an application fee.

    • transfer

      Money moved by a transfer.

    • transfer_refund

      A transfer reversed back to its source.

    • refund

      Money returned to a customer by a refund.

    • refund_failure

      A failed or canceled refund's amount returned to the balance.

    • adjustment

      A correction or other change, including tax and dispute amounts.

    • paycose_fee

      Paycose's fee.

    • payout

      Money paid out to a bank account.

    • payout_cancel

      A canceled or failed payout's amount returned to the balance.

    • reserve_transaction

      Money moved into or out of a reserve.

    • credit

      A purchase, use or adjustment of Paycose credit.

  • sourcestringRequired

    ID of the object that caused the entry, such as the charge or payout; falls back to event_id.

  • feeintegerRequired

    Fees deducted from the gross amount, in the currency's smallest unit (for example 49900 = 499.00 THB); 0 when none were recorded.

  • fee_detailsarray of objectsRequired

    Breakdown of fee, one entry per fee.

    Show child attributes
    • fee_details.typestringRequired

      Kind of fee.

      • paycose_fee

        Paycose's fee.

      • provider_fee

        The fee your own payment provider kept, on a charge paid into your provider account.

    • fee_details.amountintegerRequired

      Fee amount in the currency's smallest unit (for example 49900 = 499.00 THB).

    • fee_details.currencystringRequired

      Three-letter ISO 4217 currency code, in lowercase.

    • fee_details.applicationstring

      ID of the account that earned the fee, set only when type is application_fee; omitted for other fee types.

  • netintegerRequired

    Amount the entry moves after fees and any reserve, in the currency's smallest unit.

  • reporting_categorystringRequired

    Category to group the entry under in reports.

    Show 14 possible values
    • charge

      Charges.

    • refund

      Refunds.

    • refund_failure

      Refunds that failed or were canceled.

    • platform_earning

      Application fees you earned.

    • platform_earning_refund

      Refunds of application fees.

    • transfer

      Transfers.

    • transfer_reversal

      Transfer reversals.

    • payout

      Payouts.

    • payout_reversal

      Payouts that were canceled or failed.

    • dispute

      Disputes.

    • fee

      Paycose and provider fees.

    • risk_reserved_funds

      Money moved into or out of a reserve.

    • tax

      Tax.

    • other_adjustment

      Any other adjustment.

  • planestring

    Whether the entry moves money Paycose holds or only records money held elsewhere. Omitted when not known.

    • custodial

      Money Paycose holds.

    • memo

      Money held outside Paycose, recorded only.

  • record_onlybooleanRequired

    true for a record-only entry: no money moved through Paycose, so it never adds to an amount you can pay out.

  • account_codestring

    Code of the ledger account the entry was booked to, for example 2100 for your balance. Omitted when not known.

  • balanceobjectNullableExpandable

    The balance the entry was booked to, when you expand balance.

    Show child attributes
    • balance.idstringRequired

      Unique identifier for the object.

    • balance.objectstringRequired

      String naming the object's type.

    • balance.livemodebooleanRequired

      true when the object exists in live mode, false in test mode.

    • balance.createdtimestampRequired

      Time the object was created, in Unix seconds.

    • balance.updatedtimestampRequired

      Time the object last changed, in Unix seconds.

    • balance.accountstring

      ID of the account (acct_…) that owns the balance. Omitted when the balance has no account.

    • balance.currencystringRequired

      Three-letter ISO 4217 currency code, in lowercase.

    • balance.namestring

      Name of the balance. Omitted when it has none.

    • balance.availableintegerRequired

      Funds available now, in the smallest currency unit.

    • balance.holdintegerRequired

      Funds that are pending or on hold and not yet available, in the smallest currency unit.

    • balance.scaling_factorintegerRequired

      Number of smallest currency units in one major unit of currency (for example, 100 for THB), so available / scaling_factor is the amount in major units.

    • balance.descriptionstringRequired

      Free-text description of the balance.