HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
API Reference

Log Usage

Log usage to your customer's purchased usage based add-ons.

ATTENTION:

If you'd like to set usage_timestamp or recording_timestamp to "now," please leave those fields blank. This will allow the server to set the values. Manually setting usage_timestamp and/or recording_timestamp to "now" has been known to trigger the following error when clocks get skewed: "Cannot create usage record with a usage timestamp in the future."

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Subscription's unique identifier.

string
required

The unique add-on code.

Body Params
integer
required

The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500").

string

Custom field great for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.

date-time
Defaults to usage_timestamp value

When the usage was recorded in your system. Defaults to current timestamp.

date-time

When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. Defaults to current timestamp.

Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/xml