Application charges
What an installed app charges the store each month. The app creates a charge, the merchant approves it in the admin, and it's billed on the store's Weftstore invoice until it's cancelled or the app is uninstalled.
Endpoints#
- GET
/recurring_application_charges.jsonList the app's charges - GET
/recurring_application_charges/{id}.jsonGet a charge - POST
/recurring_application_charges.jsonCreate a charge - DELETE
/recurring_application_charges/{id}.jsonCancel a charge
Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.
The recurring application charge object#
What the endpoints below return for one recurring application charge.
{
"id": "cm2chrg0001",
"name": "Standard plan",
"api_client_id": "slc_6f1d0c4b2a9e8d7c6b5a4f3e2d1c0b9a",
"price": "1499.00",
"currency": "PKR",
"status": "pending",
"test": false,
"trial_days": 7,
"trial_ends_on": null,
"activated_on": null,
"cancelled_on": null,
"billed_through": null,
"return_url": "https://orderprinter.example/billing/return",
"confirmation_url": "https://storeloom.example/admin/apps/charges/cm2chrg0001",
"created_at": "2026-10-25T09:12:00.000Z",
"updated_at": "2026-10-25T09:12:00.000Z"
}List the app's charges#
/recurring_application_charges.jsonAny tokenThe charges this app has asked this store for, oldest first, whatever their status. Other apps' charges never show up.
| Parameter | Description |
|---|---|
status | Only charges with this status: pending, active, declined, cancelled or expired. |
since_id | Only charges after this id. |
limit | Up to 250 (default 50). |
curl "https://store.weftgrid.com/api/admin/2026-10/recurring_application_charges.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"recurring_application_charges": [
{
"id": "cm2chrg0001",
"name": "Standard plan",
"api_client_id": "slc_6f1d0c4b2a9e8d7c6b5a4f3e2d1c0b9a",
"price": "1499.00",
"currency": "PKR",
"status": "pending",
"test": false,
"trial_days": 7,
"trial_ends_on": null,
"activated_on": null,
"cancelled_on": null,
"billed_through": null,
"return_url": "https://orderprinter.example/billing/return",
"confirmation_url": "https://storeloom.example/admin/apps/charges/cm2chrg0001",
"created_at": "2026-10-25T09:12:00.000Z",
"updated_at": "2026-10-25T09:12:00.000Z"
}
]
}Get a charge#
/recurring_application_charges/{id}.jsonAny tokenOne of this app's charges. Check its status when the merchant comes back to return_url with charge_id.
curl "https://store.weftgrid.com/api/admin/2026-10/recurring_application_charges/$RECURRING_APPLICATION_CHARGE_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"recurring_application_charge": {
"id": "cm2chrg0001",
"name": "Standard plan",
"api_client_id": "slc_6f1d0c4b2a9e8d7c6b5a4f3e2d1c0b9a",
"price": "1499.00",
"currency": "PKR",
"status": "pending",
"test": false,
"trial_days": 7,
"trial_ends_on": null,
"activated_on": null,
"cancelled_on": null,
"billed_through": null,
"return_url": "https://orderprinter.example/billing/return",
"confirmation_url": "https://storeloom.example/admin/apps/charges/cm2chrg0001",
"created_at": "2026-10-25T09:12:00.000Z",
"updated_at": "2026-10-25T09:12:00.000Z"
}
}Create a charge#
/recurring_application_charges.jsonAny tokenAsks the merchant to approve a monthly charge. price is a decimal string in the platform's billing currency (Pakistani rupees unless the platform says otherwise). Send the merchant to confirmation_url: they approve or decline it there and come back to return_url with charge_id added (https, or http://localhost while you develop the app). Approving makes it active (with a free trial first when trial_days is set) and cancels the app's other active charge. It's billed on the store's Weftstore invoice from the end of the trial until it's cancelled or the app is uninstalled. test charges are approved the same way but never billed. A charge nobody answers expires after 48 hours. Every change sends app_subscriptions/update to the app. Only apps installed from the App Store can charge: custom apps get 403.
{"recurring_application_charge":{"name":"Standard plan","price":"1499.00","return_url":"https://orderprinter.example/billing/return","trial_days":7,"test":false}}curl -X POST "https://store.weftgrid.com/api/admin/2026-10/recurring_application_charges.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"recurring_application_charge":{"name":"Standard plan","price":"1499.00","return_url":"https://orderprinter.example/billing/return","trial_days":7,"test":false}}'Example responseShowHide
{
"recurring_application_charge": {
"id": "cm2chrg0001",
"name": "Standard plan",
"api_client_id": "slc_6f1d0c4b2a9e8d7c6b5a4f3e2d1c0b9a",
"price": "1499.00",
"currency": "PKR",
"status": "pending",
"test": false,
"trial_days": 7,
"trial_ends_on": null,
"activated_on": null,
"cancelled_on": null,
"billed_through": null,
"return_url": "https://orderprinter.example/billing/return",
"confirmation_url": "https://storeloom.example/admin/apps/charges/cm2chrg0001",
"created_at": "2026-10-25T09:12:00.000Z",
"updated_at": "2026-10-25T09:12:00.000Z"
}
}Cancel a charge#
/recurring_application_charges/{id}.jsonAny tokenCancels one of this app's pending or active charges: it isn't billed after today. Sends app_subscriptions/update.
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/recurring_application_charges/$RECURRING_APPLICATION_CHARGE_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{}