VayuDocumentationIntegrationsAPI ReferenceChange Log
SupportGet started now
API EndpointsCredits

Deduct credits from customer credit ledger

This endpoint is used to deduct credits from the specified customer account. Submit the credit amount and customer ID in the request body to deduct the credits. The deducted credits will be subtracted from the customer's account.

POST
/credits/deduct

Authorization

BearerAuthorizer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

creditAmount*number

The amount of credits to be deducted from the user.

customerId*string

The ID of the customer to whom the credits will be deducted from.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/credits/deduct" \  -H "Content-Type: application/json" \  -d '{    "creditAmount": 0,    "customerId": "string"  }'
Empty
{  "type": "invalid_request_error",  "code": "string",  "message": "string",  "param": "string",  "params": [    {      "param": "string",      "message": "string"    }  ]}
{  "type": "authentication_error",  "code": "authentication_failed",  "message": "string"}
{  "type": "rate_limit_error",  "code": "rate_limit_exceeded",  "message": "string"}
{  "type": "api_error",  "code": "internal_error",  "message": "string"}