Skip to main content
POST
/
credits
/
deduct
Deduct credits from customer credit ledger
curl --request POST \
  --url https://connect.withvayu.com/credits/deduct \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "creditAmount": 123,
  "customerId": "<string>"
}
'
{
  "type": "invalid_request_error",
  "code": "<string>",
  "message": "<string>",
  "param": "<string>",
  "params": [
    {
      "param": "<string>",
      "message": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://guide.withvayu.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
creditAmount
number
required

The amount of credits to be deducted from the user.

customerId
string
required

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

Pattern: ^[0-9a-fA-F]{24}$

Response

RequestSuccess