Balance Transactions#
Balance Transactions represent individual changes to your CasaPay balance. Every charge, refund, payout, and fee creates a balance transaction.
The Balance Transaction object#
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier with txn_ prefix |
object | string | Always "balance_transaction" |
amount | integer | Net transaction amount |
currency | string | ISO 4217 currency code |
type | enum | charge, refund, payout, payout_cancel, payout_failure, adjustment, fee |
status | enum | available, pending |
description | string | Transaction description |
fee | integer | Fee amount |
net | integer | Net amount after fee |
source | string | Source object ID |
available_on | timestamp | When funds become available |
created | timestamp | Time at which the object was created |
{
"id": "txn_abc123",
"object": "balance_transaction",
"amount": 120000,
"currency": "eur",
"type": "charge",
"status": "available",
"description": "Rent payment — Unit 4B",
"fee": 3480,
"net": 116520,
"source": "ch_abc123",
"available_on": 1706572800,
"created": 1706140800
}Retrieve a Balance Transaction#
GET /v1/balance_transactions/:id
curl https://api.casapay.com/v1/balance_transactions/txn_abc123 \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"List Balance Transactions#
GET /v1/balance_transactions
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by type |
source | string | Filter by source |
available_on[gte] | timestamp | Available on or after |
created[gte] | timestamp | Created on or after |
limit | integer | Number of objects (1–100) |
curl "https://api.casapay.com/v1/balance_transactions?type=charge&limit=25" \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"