comecerodocs

Get a customer's balance

GET
/customers/{customer_id}/balance

Gets a customer's store credit. The amount can be negative, for example after a refund paid to the balance was taken back. That is expected and is covered by the next credit. A customer who never had store credit has a balance of 0 in USD.

Send currency to see the amount in another currency, converted at the account's exchange rate. Send expand=transactions to include the transactions.

Secret tokens, and limited tokens tied to the customer.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

customer_id*string

The id of the customer. With a limited token from a customer login you can send me instead.

Query Parameters

currency?string

A three-letter ISO 4217 currency code to show the amount in, for example EUR.

expand?string

Comma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The customer's balance.

application/json
  1. response

A customer's store credit. Money comes in from refunds paid to the balance and from payments made with apply_to_balance: true, and goes out when the customer pays with the customer_account_balance payment method.

The amount can be below zero. That is expected: when a refund paid to the balance is taken back, or a chargeback lands after the credit was spent, the balance goes negative and stays that way until new credit covers it. A payment from the balance can never take it below zero.

A customer with no balance transactions yet has a balance of 0 in USD.

object*"customer_balance"

The object type. Always customer_balance.

Value in"customer_balance"
url*string

The full URL of the balance.

customer_id*string

The id of the customer.

account_id*string

The id of the account.

test*boolean

True for a test customer.

amount*number

The balance, in currency. Can be negative. When you ask for another currency, this is converted at the account's exchange rate.

currency*string

The currency of amount. The balance is kept in the currency of its first transaction. You can ask for another with the currency parameter.

date_last_transaction*|

When the balance last changed, or null if it never has.

Formatdate-time
transactions?|

The URL of the balance transactions, or the list when expanded (expand=transactions). Only present when your token may read them.

formatted?

Only when you send formatted=true. Display text.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/customers/string/balance'
Example Response
{  "object": "customer_balance",  "url": "https://api.comecero.com/api/v1/customers/0091304300408CuoxY9Pf3/balance",  "customer_id": "0091304300408CuoxY9Pf3",  "account_id": "AB1234",  "test": true,  "amount": 25,  "currency": "USD",  "date_last_transaction": "2026-11-04T15:02:11Z",  "transactions": "https://api.comecero.com/api/v1/customers/0091304300408CuoxY9Pf3/balance/transactions"}