deductCredits
Deduct credits from a customer's credit balance, as an administrator charge. Returns the created credits transaction. Credits that expire soonest are deducted first. Fails when the customer has fewer credits than the amount: check the balance with getCreditsBalances first. Pass the customer's location as transaction.locationRef. Each call creates a new transaction: when a call fails or times out, list the customer's transactions before calling again, so the same amount is not applied twice. Call getLocations to list locations, or getLocation to fetch one by locationId. Call getCustomers to list valid customerRef values. Never invent UUIDs; only use values from prior tool responses.
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": {
"transaction": "<transaction>"
},
"name": "deductCredits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction | Yes | Credits to deduct. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction | Yes |