Usage
Record a usage event
Changed onRecords a usage event into the Usage timeseries collection.
post/v1/sdk/usages
Request
- Base URLhttps://api.solvapay.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Usage recorded successfully
Example response
{
"creditDebit": {
"amount": 100,
"autoRecharge": {
"triggered": true
},
"remainingUnits": 99,
"unitsRemaining": 99
},
"reference": "usage_A1B2C3D4",
"success": true
}Changes
- warning
added the new
not_credit_drawnenum value to the/////response property for the response status - warning
added the new
within_includedenum value to the/////response property for the response status - info
removed the
plan_billed_at_period_endenum value from the/////response property for the response status
- warning
- warning
added the new
plan_billed_at_period_endenum value to the/////response property for the response status - info
response property
creditDebit/oneOf[CreditDebitSuccessResponse]/unitsRemainingdeprecated - info
added the required property
/////to the response with the status
- warning