Payezydevelopers
Sandbox

API reference / Act as a platform

Get a customer's statement

GET/v1/platforms/{platformOrgId}/customers/{customerOrgId}/accounts/{accountId}/statement

Acts on a linked customer with the platform's own key or team (platform:customer_accounts_view). Same as GET /v1/orgs/{orgId}/accounts/{accountId}/statement.

Before you call it

  • Organizationplatform
  • Permissionplatform:customer_accounts_view

Parameters

ParameterWhat it does
platformOrgIdpath, uuidrequiredYour platform's organization id. platformOrgId is the platform response's org_id.
customerOrgIdpath, uuidrequiredcustomerOrgId is the customer response's org_id.
accountIdpath, uuidrequiredThe Payezy account id from list accounts.
beforequery, date-timeReturn items older than this ISO-8601 timestamp. Pass next_before from the previous page.
limitquery, integerHow many items to return.

1 to 200, default 50

Response 200

Ledger lines for the account, newest first

FieldWhat it does
accountFinancialAccountrequiredA Payezy account and its ledger balances. This is the account you pay from.
account.idstring (uuid)requiredPayezy account id. Send it as accountId or account_id.
account.namestringrequiredName of the Payezy account.
account.currencystringrequiredISO currency code, such as USD.
account.statusenumrequiredWhether the account is open, frozen, or closed. One of: active, frozen, closed.

One of active frozen closed

account.balanceBalancerequiredUSD amounts as decimal strings. Available excludes holds and pending credits.
account.balance.currencystringrequiredISO currency code, such as USD.
account.balance.postedstringrequiredLedger balance, including amounts that are not available to spend yet, as a decimal string.
account.balance.availablestringrequiredBalance that can be spent now, as a decimal string.
account.balance.pending_instringrequiredIncoming funds not yet settled
account.balance.pending_outstringrequiredHeld for payouts in flight
account.created_atstring (date-time)requiredWhen this record was created, as an ISO-8601 timestamp.
itemsStatementLine[]requiredRecords in this page.
items[].idstring (uuid)requiredIdentifier of this record.
items[].transaction_idstring (uuid)requiredPayment id of this transaction. Withdrawals and deposits use the same id space.
items[].directionenumrequiredcredit adds to the balance

One of credit debit

items[].amountstringrequiredAmount as a decimal string in major units, such as dollars.
items[].statusenumrequiredWhere this record is in its lifecycle. One of: pending, posted.

One of pending posted

items[].descriptionstringrequiredDescription of the statement line.
items[].payment_idstring (uuid)Payment id. A withdrawal is stored as a payment, so this is also the withdrawal id.
items[].effective_atstring (date-time)requiredWhen this price or setting takes effect, as an ISO-8601 timestamp.
next_beforestring (date-time)Pass this value as the before query parameter to load the next page of older items.