Skip to main content
POST
Record a usage event

Authorizations

Authorization
string
header
required

Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer token.

Body

application/json
customerRef
string
required
Required string length: 1 - 20
metadata
object
required
timestamp
string<date-time>
required
actionType
enum<string>
default:api_call
Available options:
transaction,
api_call,
hour,
email,
storage,
custom
description
string
duration
number
Required range: x > 0
errorMessage
string
idempotencyKey
string
Maximum string length: 256
outcome
enum<string>
default:success
Available options:
success,
paywall,
fail
productRef
string
Maximum string length: 20
purchaseRef
string
Maximum string length: 20
units
integer
default:1
Required range: 0 < x < 100000

Response

Usage recorded successfully

reference
string
required
Example:

"usage_A1B2C3D4"

success
boolean
required
Example:

true

creditDebit
object