GET
/
credits
/
{credit_id}
curl --request GET \
  --url https://api.togai.com/credits/{credit_id} \
  --header 'Authorization: Bearer <token>'
{
  "accountId": "ACC001",
  "purpose": "PREPAID_CREDIT",
  "applicableEntityIds": [
    [
      "umg.1znQx9jiIXw.r44fc",
      "ALL_USAGE_METER_RATE_CARDS",
      "ALL_FIXED_FEE_RATE_CARDS"
    ]
  ],
  "effectiveFrom": "2020-07-04",
  "effectiveUntil": "2021-07-04",
  "creditAmount": 1000,
  "priority": 1,
  "grantorId": "<string>",
  "idempotencyKey": "<string>",
  "id": "cred.1znqBOVcai0.0tBFz",
  "customerId": "7VcRw9xZDIqsC5E",
  "status": "ACTIVE",
  "creditUnit": "USD",
  "holdAmount": 500,
  "consumedAmount": 400,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "transactions": [
    {
      "id": "<string>",
      "creditId": "<string>",
      "transactionType": "CREDITED",
      "invoiceId": "<string>",
      "entityId": "<string>",
      "amount": 200,
      "createdAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

credit_id
string
required
Example:

"creds.1znQx9jiIXw.r44fc"

Response

200
application/json

Response for Fetch Credit Details request. This contains Credit Transactions

Payload to grant Credits