Record a customer payment
credit_customerRecord a customer payment
Records on balanceUsd a payment (positive) or a correction (negative). For your books only: its calls never draw on it and are not blocked at zero, because its usage is debited directly from your balance. Your own balance is untouched. Idempotency-Key is required so a retry never records twice. Returns the customer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"amountUsd": "<amountUsd>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "credit_customer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The customer id. | |
| note | No | Shown in the customer's ledger. Defaults to Credit or Debit. | |
| amountUsd | Yes | Non-zero (at least 0.00000001 either way) and less than 1,000,000 either way. Positive to record a payment; negative to correct. 400 when balanceUsd would leave the range -999,999.99999999 to 999,999.99999999. | |
| idempotencyKey | Yes | Required. A unique string for this change (e.g. the payment id): repeating it never applies the change twice. |