curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/wallet/credit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"reason": "Customer goodwill credit",
"idempotencyKey": "credit-2026-04-17-abc"
}'
{
"workspaceId": "19c3b12f-ec54-43ad-8686-00e921f1befd",
"transactionId": "c4e5b6d7-1234-5678-9abc-def012345678",
"amount": 2500,
"newBalance": 7500,
"type": "credit",
"reason": "Customer goodwill credit",
"createdAt": "2026-04-17T10:30:00Z"
}
Billing
Credit wallet
Add credits to a workspace wallet as a manual adjustment via the Nedzo REST API. Uses an atomic operation and records the change in the ledger.
POST
/
workspaces
/
{workspaceId}
/
billing
/
wallet
/
credit
curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/wallet/credit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"reason": "Customer goodwill credit",
"idempotencyKey": "credit-2026-04-17-abc"
}'
{
"workspaceId": "19c3b12f-ec54-43ad-8686-00e921f1befd",
"transactionId": "c4e5b6d7-1234-5678-9abc-def012345678",
"amount": 2500,
"newBalance": 7500,
"type": "credit",
"reason": "Customer goodwill credit",
"createdAt": "2026-04-17T10:30:00Z"
}
string
required
Workspace UUID
integer
required
Amount to credit in cents. Must be a positive integer.
string
required
Human-readable reason for the adjustment (1-500 characters). Cannot contain the substring
[idempotency:.string
Optional idempotency key (a-z, A-Z, 0-9, hyphen, 1-128 chars). If provided, a retry with the same key within 24 hours returns the existing transaction without re-applying the credit.
curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/wallet/credit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"reason": "Customer goodwill credit",
"idempotencyKey": "credit-2026-04-17-abc"
}'
{
"workspaceId": "19c3b12f-ec54-43ad-8686-00e921f1befd",
"transactionId": "c4e5b6d7-1234-5678-9abc-def012345678",
"amount": 2500,
"newBalance": 7500,
"type": "credit",
"reason": "Customer goodwill credit",
"createdAt": "2026-04-17T10:30:00Z"
}
Was this page helpful?
