Skip to main content
POST
/
api
/
v1
/
subscriptions
/
billing-metric
/
report-usage
Report subscription usage
curl --request POST \
  --url https://dev-billing-api.iqraa.ai/api/v1/api/v1/subscriptions/billing-metric/report-usage \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-admin-api-key: <x-admin-api-key>' \
  --data '
{
  "externalSubscriptionId": "0c7b0eb6-3411-4dd3-9e24-d2a8edbb504a",
  "billableMetricCode": "storage",
  "properties": {
    "gb": 100
  }
}
'

Authorizations

Authorization
string
header
required

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

Headers

x-admin-api-key
string
required

The API key to access the admin API

Body

application/json
externalSubscriptionId
string
required

Unique identifier of the subscription in your application

Example:

"0c7b0eb6-3411-4dd3-9e24-d2a8edbb504a"

billableMetricCode
string
required

Code that identifies a targeted billable metric

Example:

"storage"

properties
object
required
Example:
{ "gb": 100 }

Response

Usage reported successfully