Account Balance API
Account Balance manages wallet-style balances, credit/debit movements, totals, and transaction history.
Base URL
https://your-instance.pubflow.com/bridge-payment/account-balance
Feature Flags
- ACCOUNT_BALANCE_ENABLED
- ACCOUNT_BALANCE_REQUIRE_AUTH
- ACCOUNT_BALANCE_ALLOWED_ROLES
User Operations
List my balances
GET
/bridge-payment/account-balance/me/balances
Returns authenticated user balances with optional filters.
Authorizations
SessionAuth
Session ID from Flowless authentication
TypeAPI Key (header: X-Session-ID)
Parameters
Query Parameters
limit
Typeinteger
Default
100reference_code
Typestring
balance_type
Typestring
Valid values
"general""credits""promotional""refund"status
Typestring
Valid values
"active""suspended""expired""closed"organization_id
Typestring
project_id
Typestring
currency
Typestring
Responses
Balances retrieved
Get my total balance
Powered by VitePress OpenAPI
Get balance by ID
Powered by VitePress OpenAPI
Create balance
POST
/bridge-payment/account-balance
Creates an account balance ledger row with ownership checks.
Authorizations
SessionAuth
Session ID from Flowless authentication
TypeAPI Key (header: X-Session-ID)
Request Body
application/json
JSON
{
"user_id": "string",
"organization_id": "string",
"project_id": "string",
"customer_id": "string",
"balance_type": "general",
"balance_cents": 0,
"currency": "USD",
"reference_code": "string",
"expires_at": "string",
"status": "active",
"metadata": {
"additionalProperties": "string"
}
}
Responses
Balance created
Credit balance
Powered by VitePress OpenAPI
Debit balance
POST
/bridge-payment/account-balance/{id}/debit
Authorizations
SessionAuth
Session ID from Flowless authentication
TypeAPI Key (header: X-Session-ID)
Parameters
Path Parameters
id*
Typestring
RequiredRequest Body
application/json
JSON
{
"amount_cents": 0,
"description": "string",
"allow_negative": true
}
Responses
Balance debited
List balance transactions
Powered by VitePress OpenAPI
Get balance statistics
Powered by VitePress OpenAPI
Admin Operations
List balances for specific user (admin)
Powered by VitePress OpenAPI
Get user total balance (admin)
Powered by VitePress OpenAPI
List expiring balances (admin)
Powered by VitePress OpenAPI