Skip to main content
POST
/
v1
/
sdk
/
usages
Record a usage event
curl --request POST \
  --url https://api.example.com/v1/sdk/usages \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerRef": "<string>",
  "metadata": {},
  "timestamp": "2023-11-07T05:31:56Z",
  "actionType": "api_call",
  "description": "<string>",
  "duration": 1,
  "errorMessage": "<string>",
  "idempotencyKey": "<string>",
  "outcome": "success",
  "productRef": "<string>",
  "purchaseRef": "<string>",
  "units": 1
}
'
{
  "reference": "usage_A1B2C3D4",
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.solvapay.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
customerRef
string
required
Minimum string length: 1
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
purchaseRef
string
units
integer
default:1
Required range: 0 < x < 100000

Response

Usage recorded successfully

reference
string
Example:

"usage_A1B2C3D4"

success
boolean
Example:

true