cURL
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" } ] }
Get credit details
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
"creds.1znQx9jiIXw.r44fc"
Response for Fetch Credit Details request. This contains Credit Transactions
Payload to grant Credits