POST
/
credits
/
{credit_id}
/
void
curl --request POST \
  --url https://api.togai.com/credits/{credit_id}/void \
  --header 'Authorization: Bearer <token>'
{
  "accountId": "biswa",
  "purpose": "credits",
  "effectiveFrom": "2024-03-06",
  "priority": 1,
  "id": "cred.22LLLScunZg.om5kC",
  "customerId": "biswa",
  "status": "VOIDED",
  "createdAt": "2024-03-13T12:33:39.986252Z",
  "applicableEntityIds": [],
  "effectiveUntil": "2025-03-06",
  "creditAmount": 10,
  "grantorId": "addon.22IZs2ZVEnw.0zDFe",
  "creditUnit": "USD",
  "holdAmount": 0,
  "consumedAmount": 0,
  "updatedAt": "2024-03-13T12:42:33.489822Z"
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

credit_id
string
required

Response

200 - application/json
accountId
string
required
purpose
string
required
applicableEntityIds
string[]

List of entity ids for which the credit is applicable. If null or empty, the credit is applicable to all ids. This list can accept special values like: - ALL_USAGE_METER_RATE_CARDS: To apply the credit to all usage meter rate cards - ALL_FIXED_FEE_RATE_CARDS: To apply the credit to all fixed fee rate cards

effectiveFrom
string
required
effectiveUntil
string
creditAmount
number
priority
integer
required
grantorId
string

The entity through which the credit has been granted

idempotencyKey
string

The idempotency key for uniqueness of the credit record

id
string
required

Identifier of credits

customerId
string
required
status
enum<string>
required
Available options:
ACTIVE,
CONSUMED,
EXPIRED,
VOIDED
creditUnit
string
holdAmount
number
consumedAmount
number
createdAt
string
required
updatedAt
string