post
https://{subdomain}.myshoplaza.com/openapi/2025-06/recurring_application_charges//usage_charge
create usage-based charges for a recurring application charge within Shoplazza.
The Create Usage Charge creates usage-based charges for a recurring application charge within Shoplazza.
This API is especially useful for:
- Implementing metered billing for your application
- Charging customers for additional usage beyond base plans
- Creating custom billing scenarios for value-added services
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
charge_id | string | Yes | The recurring charge ID | "charge_123456789" |
Body Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
usage_charge.description | string | Yes | Description of the charge | "Additional API calls" |
usage_charge.price | float | Yes | The amount to charge (must be positive) | 10.50 |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | "success" | API response status code |
message | string | "Usage charge created" | Response message |
data.usage_charge.id | string | "usage_123456" | Unique usage charge ID |
data.usage_charge.price | string | "10.50" | Formatted charge amount |
data.usage_charge.description | string | "Additional API calls" | Charge description |
data.usage_charge.balance_used | string | "60.50" | Total balance used |
data.usage_charge.balance_remaining | string | "139.50" | Remaining balance |
data.usage_charge.created_at | string | "2025-01-15T10:30:00Z" | Creation timestamp |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
