Record billable usage against an approved usage-capped charge. Idempotent per Idempotency-Key; 422 cap_exceeded once the merchant's approved ceiling would be passed.
POST
/apps/billing/charges/{id}/usage-records
const url = 'https://your-store.myciqra.com/apps/billing/charges/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage-records';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":1,"description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-store.myciqra.com/apps/billing/charges/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage-records \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 1, "description": "example" }'Any installation token — billing needs no scope. Each charge reaches the merchant’s invoice only after the merchant approves it in the CIQRA admin.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
amount
required
integer | string format: int64
description
required
null | string
Examplegenerated
{ "amount": 1, "description": "example"}Responses
Section titled “Responses”OK