comecerodocs

List a customer's credit history

GET
/customers/{customer_id}/usage/{subscription_id}/credit_history

The prepaid credit of one subscription's usage plans, every plan it has had: what was added, what bills took and what refunds took back, newest first, a page at a time. Entries have no description: that note is yours, so label them by type. A shopper's token reads only its own customer (me works). Every amount is in currency, the subscription's. With usage billing turned off, data is empty and currency is null. Here customer_id is the Comecero customer id, not your own id.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

customer_id*string

The Comecero customer id, or me.

subscription_id*string

The customer's subscription.

Query Parameters

limit?integer

How many entries to return, from 1 to 100. The default is 25. A number outside 1 to 100 is taken as the nearest of them.

Range1 <= value <= 100
Default25
starting_after?string

The id of the last entry of the page before. Leave it out for the newest entries.

Response Body

Success.

application/json
  1. response
object?string

Always list.

data?array<>

Newest first.

has_more?boolean

True when there are older entries. Ask again with starting_after set to the last entry's id.

currency?|

The subscription's currency, which every amount is in. Null when usage billing is off for the shop (then data is empty).

Example Request
curl -X GET 'https://api.comecero.com/api/v1/customers/string/usage/string/credit_history'
Example Response
{  "object": "list",  "data": [    {      "object": "credit_history_entry",      "id": "ule_8f2c1a9d0b7e4c3a",      "type": "used",      "amount": "-12.5",      "credit_granted": null,      "occurred_at": "2026-11-01T02:00:00Z"    },    {      "object": "credit_history_entry",      "id": "ule_1a2b3c4d5e6f7a8b",      "type": "added",      "amount": "50",      "credit_granted": "50",      "occurred_at": "2026-10-14T09:12:00Z"    }  ],  "has_more": false,  "currency": "USD"}