Overview /
Customers & loyalty /
Adjust balance or points
Adjust balance or points
post
https://api.flactrum.com/v1/customers/{customer}/adjust
Manual correction, up or down, with a mandatory reason. It can never push a ledger below zero.
| Required scope | customers.wallet |
| Success status | 201 |
| Returns | One CustomerTransaction object |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| customer * | path | string | ULID of the record. |
Request body
| Field | Type | Description |
|---|---|---|
| ledger * | string | — |
| amount * | number | Positive adds, negative subtracts. Cannot be zero, and cannot push the ledger below zero. |
| reason * | string | Required. Someone will ask later why a customer's balance changed. |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| customer_id | string | — |
| ledger | string | — |
| type | string | — |
| amount | number | Signed: negative means it left the account. |
| balance_after | number | The balance after this entry, stored so the ledger can be audited without replaying it. |
| order_id | string|null | — |
| description | string|null | — |
| created_at | string | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/customers/01m43mxy60gwdmrrz9ctfjj3ag/adjust' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"ledger": "points",
"amount": 250,
"reason": "Kampanya telafisi"
}'
HTTP 201 · application/json
{
"data": {
"id": "01m43mxy6cttcdas03bs3nespy",
"customer_id": "01m43mxy60gwdmrrz9ctfjj3ag",
"ledger": "points",
"type": "adjustment",
"amount": 250,
"balance_after": 250,
"branch_id": null,
"order_id": null,
"description": "Kampanya telafisi",
"created_at": "2026-10-04T14:26:18+00:00"
}
}
curl -X POST 'https://api.flactrum.com/v1/customers/01m43mxy9r66dsfvhee9am4kjn/adjust' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"ledger": "balance",
"amount": -100,
"reason": "Hatalı düşüm denemesi"
}'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "The adjustment would leave a negative balance.",
"details": {
"balance": 0,
"points": 0
}
}
}