get
https://{shopdomain}.myshoplaza.com/openapi/2022-01/recurring_application_charges//usage_charge/
The Get Usage Charge API is used to retrieve details of a specific usage charge associated with a recurring application charge. This API provides information such as the charge description, the amount used, and the remaining balance within the capped amount.
This API is especially useful for:
- Verifying the details of a specific usage charge.
- Monitoring balance usage and remaining capped amount.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
recurring_charge_id | string | Yes | The recurring charge ID. | "372269669345671159" |
usage_charge_id | string | Yes | The ID of the specific usage charge. | "3722736344521766903" |
Response Explanation
Public Response Parameters
Success Response
| Field | Type | Description | Example |
|---|---|---|---|
id | string | Unique identifier for the usage charge. | "3722736344521766903" |
description | string | Description of the usage charge. | "Desc" |
balance_used | string | The amount already used in the current billing cycle. | "3.00" |
balance_remaining | string | The remaining balance available in the capped amount. | "7.00" |
price | string | The price of the specific usage charge. | "3.00" |
created_at | string | Timestamp 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.
| Field | Type | Example | Description |
|---|---|---|---|
errors | Array | [ "file number error"] | A list of errors encountered during the request processing. |
| Field | Type | Example | Description |
|---|---|---|---|
error | String | "page not found" | Indicates an error encountered during the process |
Error Detail
| Status Code | Message | Possible Reason | Example Response |
|---|---|---|---|
| 400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
| Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
| 404 | Not Found | The charge Id is not found or empty. | "Record not found" |
