Skip to main content
Safepay operates a double-entry ledger for Raast activity. Each aggregator and merchant is mapped to one or more ledger accounts that hold their operational balance, settlement deltas, and fee/tax accruals. These accounts are owned and maintained by Safepay, but you reference them when reading balances or triggering payouts. Ledger accounts are not bank accounts themselves - they are a real-time representation of what Safepay owes or is owed, backed by settlement runs to your bank account.
Raast payments settle in batches every 6 hours. The running_balance reflects activity within the current batch and resets to 0 after settlement completes.
FieldDescription
idInternal numeric identifier for the ledger account.
tokenPublic, unique ledger account token you reference in APIs.
account_typeType of account (ACCT_SYSTEM, ACCT_MDR_FEE, ACCT_MERCHANT, ACCT_AGGREGATOR, tax accounts).
account_nameHuman-readable label for the account (for example, Acme Raast settlement).
normal_balanceNatural balance side for the account (SIDE_DEBIT or SIDE_CREDIT), used for applying entries.
currencyISO 4217 currency code (for example, PKR).
balanceCurrent settled balance in minor units (for example, paisa).
running_balanceBalance including pending/soon-to-settle activity, if applicable.
external_partner_idReference to the upstream partner in Raast Wire.
external_aggregator_idYour aggregator identifier, used to link the account to your integration.
external_merchant_idAggregator merchant identifier when the account is merchant-scoped.
vault_tokenToken referencing the encrypted bank account that receives payouts.
bank_acct_idIdentifier of the bank account in Raast Wire.
created_atTimestamp when the ledger account was created.
updated_atTimestamp of the latest ledger update.

Mapping workflow

1

List ledger accounts

Call GET /v1/aggregators/{{aggregator_id}}/ledger/accounts to fetch the aggregator ledger accounts.
2

Store the ledger token

Persist the returned token. It is the stable reference used in reconciliation and reporting.
3

Query merchant ledger accounts

Use GET /v1/aggregators/{{aggregator_id}}/merchants/{{aggregator_merchant_id}}/ledger/accounts for merchant-level balances.

Example: list ledger accounts

curl --request GET "{{base_url}}/v1/aggregators/{{aggregator_id}}/ledger/accounts" \
  --header "X-SFPY-AGGREGATOR-SECRET-KEY: {{secret_key}}"

See also