Skip to main content

Accounts

An account is the main container for identity, permissions, balances, payment history, and compliance status. The accounts resource is the canonical entity returned by the API; it maps to the underlying customers table with enriched fields.


Account object

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": null,
"contact_email": "[email protected]",
"display_name": "Acme Corp",
"country_code": "US",
"kyb_status": "active",
"api_tier": "direct",
"metadata": {},
"parent_platform_account_id": null,
"created_at": "2026-06-08T00:00:00Z",
"updated_at": "2026-06-08T00:00:00Z"
}
FieldTypeDescription
iduuidAccount UUID.
tenant_iduuid | nullTenant the account belongs to.
contact_emailstringPrimary contact email.
display_namestringHuman-readable account name.
country_codestringISO 3166-1 alpha-2 country code.
kyb_statusstringpending, active, or rejected.
api_tierstringdirect or platform_ready.
metadataobjectCaller-defined key-value pairs.
parent_platform_account_iduuid | nullSet when this is a managed sub-account.

POST /v1/accounts — Create account

Creates a new account. No authentication required for basic creation.

For platform flows, pass ?acting_as=<platform_account_id> to create a managed sub-account. Requires a JWT with api_tier=platform_ready.

POST /v1/accounts
Content-Type: application/json
Idempotency-Key: account-acme-001
{
"contact_email": "[email protected]",
"display_name": "Acme Corp",
"country_code": "US",
"metadata": {
"erp_id": "ACC-1042"
}
}

Platform sub-account creation

POST /v1/accounts?acting_as=<platform-uuid>
Authorization: Bearer <jwt-with-platform_ready>
Content-Type: application/json
Idempotency-Key: subaccount-merchant-001

This creates a managed account linked to the platform. The link is stored as a platform_permissions row.

Response (201 Created)

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contact_email": "[email protected]",
"display_name": "Acme Corp",
"country_code": "US",
"kyb_status": "pending",
"api_tier": "direct",
"metadata": { "erp_id": "ACC-1042" },
"created_at": "2026-06-08T00:00:00Z",
"updated_at": "2026-06-08T00:00:00Z"
}

GET /v1/accounts/me — Caller's account

Returns the account associated with the calling credential.

Auth: Elevated — JWT (aud=internal or aud=admin) or master key only.

GET /v1/accounts/me
Authorization: Bearer <token>

GET /v1/accounts/me/balance — Balance

Returns the caller's balance breakdown by currency.

Auth: Elevated — JWT or master key only.

GET /v1/accounts/me/balance
Authorization: Bearer <token>

Response (200 OK)

{
"totals": [
{ "currency": "USD", "amount": "1000.00", "available": "1000.00", "pending": "0.00" },
{ "currency": "USDC", "amount": "50.00", "available": "50.00", "pending": "0.00" }
]
}

GET /v1/accounts/me/vibans — Virtual IBANs

Returns the caller's virtual IBANs with bank routing details.

Auth: Elevated — JWT or master key only.

GET /v1/accounts/me/vibans
Authorization: Bearer <token>

GET /v1/accounts — List accounts

Lists accounts visible to the caller. Supports filtering by tenant_id or managed_by (platform accounts only).

Auth: Elevated — JWT or master key only.

GET /v1/accounts?limit=50&offset=0
Authorization: Bearer <token>

Query parameters:

ParamTypeDescription
tenant_iduuidFilter by tenant.
managed_byuuidList managed sub-accounts for a platform account.
limitintegerMax rows (default 50).
offsetintegerPagination offset.

GET /v1/accounts/{id} — Get account

Retrieve a single account by UUID.

Auth: Elevated — JWT or master key only.

GET /v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6
Authorization: Bearer <token>

Account KYB status

StatusMeaning
pendingAccount created but KYB verification not yet complete.
activeKYB verified — account can transact.
rejectedKYB rejected — account cannot transact.

Accounts with kyb_status != active cannot initiate payments. The api_tier claim on the JWT controls whether an account can create managed sub-accounts.


API tier

ValueMeaning
directSingle-account flows only.
platform_readyCan create and manage sub-accounts via ?acting_as=.

Platform tier is granted by CashXChain after your platform integration is approved.


Account types

TypeDescription
Business accountA company using CashXChain directly.
Platform accountA platform embedding CashXChain for its customers. Requires api_tier=platform_ready.
Managed sub-accountA customer account created by a platform via ?acting_as=. Has a parent_platform_account_id.