Get Usage Charge List

The Get Usage Charge List API is used to retrieve all usage charges associated with a specific recurring application charge. This API is helpful for tracking all usage charges within a billing cycle, providing insights into how the capped amount is utilized.

This API is especially useful for:

  1. Viewing all usage charges for a recurring application charge.
  2. Monitoring usage patterns to ensure the capped amount is not exceeded.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredDescriptionExample
recurring_charge_idstringYesThe ID of the recurring charge."372269669345671159"

Query Parameters

ParameterTypeRequiredDescriptionExample
per_pageint32NoLimit the number of results per page. Default is 20.10
since_idstringNoThe query results are in reverse order, and this parameter limits the results after the specified ID."3722736344521766903"

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
usage_charges[]array of object
usage_charges[].idstringUnique identifier for the usage charge."3722736344521766903"
usage_charges[].descriptionstringDescription of the usage charge."API Requests Fee"
usage_charges[].testbooleanIndicates if the charge is a test charge.false
usage_charges[].balance_usedstringThe amount already used in the current billing cycle."3.00"
usage_charges[].balance_remainingstringThe remaining balance available in the capped amount."7.00"
usage_charges[].created_atstringTimestamp when the usage charge was created."2024-04-23T06:40:51Z"

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray["Record not found"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "page not found"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
404Not FoundThe charge Id is not found."Record not found"
422Unprocessable EntityThe charge Id is empty."PerPage is required"

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!