---
title: "Credit or revoke their balance"
method: PUT
path: "/api/v1/customer/credit"
tags: ["Reseller API: act as your customers"]
---

# Credit or revoke their balance

`PUT /api/v1/customer/credit`

## Request

- Base URL: `https://hproxy.com`
- URL: `https://hproxy.com/api/v1/customer/credit`
- Auth: API key in header `X-API-Key`

Move store credit on the named customer, from your own backend: **grant** when they paid you, **revoke** for a refund on your side or a correction. Amounts are whole cents at your retail prices; one movement is at most $5,000. Send your own `request_id` for every movement (your payment id, your refund id): a repeat with the same id answers `409 already_applied` instead of moving the credit twice, so a retry is always safe. A revoke larger than what is left is refused (`revoke_exceeds_credit`) and names the remaining figure. Requires the `X-Reseller-Customer-Id` header.

## Request body

- object
  - `amount_cents` integer, required: Positive whole cents at your prices.
  - `direction` string, required: "grant" or "revoke".
  - `request_id` string, required: Your id for this movement, one per intent, 1 to 100 characters.
  - `note` string: Shown on your statement, up to 200 characters.

## Response `200`

Success

- object

## Other responses

- `400`: Invalid input. The body names the field and the accepted set.
- `401`: Missing or invalid API key.
- `429`: Rate limited. Retry after the delay in the response.

---

[API](https://skmtc.dev/hproxy/apis/hproxy-api.md) · [All operations](https://skmtc.dev/hproxy/apis/hproxy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hproxy/apis/hproxy-api/revisions/9f6898fe76e2?raw)
