Zid Docs
Apps
ThemesPayments
Apps
ThemesPayments
Help Center
Slack
  1. Plans & billing
  • 🗂️ Overview
  • 🚀 Start Here
  • Create your First App
  • Responses
  • Rate Limiting
  • Embedded Apps
  • StoreFront Events
  • Zid MUI
  • Zid SDKs
  • Our custom MCP server
  • Zid AI Agent Skill
  • Authorization
    • Authorization
    • Public Apps OAuth Requirements
    • OAuth Errors & Troubleshooting
    • Zid Bridge Tool
  • Merchant APIs
    • Account
      • Me
        • Me
      • Store
        • Store
        • Branding
        • Localization
        • Social
        • Operations
        • Business
        • Upload Logo Image
        • Delete Logo Image
        • Upload Icon Image
        • Delete Icon Image
        • Upload Cover Image
        • Delete Cover Image
    • Orders
      • Order Tags
        • List Order Tags
        • Create Order Tag
      • Validate Order Request
      • Create Order
      • Change Order Status
      • Add Order Comment
      • View Order
      • List Orders
      • List Custom Order Statuses
      • List Order Credit Notes
      • Get Orders Highlights
      • Order Fulfillment Inventories
      • Bulk Create/Update Custom Order Statuses
    • Reverse Orders
      • Create Reverse Orders
      • Create Reverse Orders Waybill
      • Add Reverse Order Reasons
      • List Reverse Reasons
      • Calculate Reverse Totals
      • Create refund for reverse order
      • Upload bank transfer receipt
      • Update return products
      • Order Details – View for Return
    • Abandoned Carts
      • List Carts
      • View Cart
      • Validate Abandoned Cart Messages
      • Send Abandoned Cart Notification Manually
    • Products
      • Managing Products
        • Create Product Types
        • Create Product
        • List Products
        • View Product
        • List Product Settings
        • Update Product
        • Bulk Update Products
        • Delete Product
      • Digital Vouchers
        • List Vouchers
        • Order Vouchers
        • Create Voucher
        • Import Vouchers
        • Export Vouchers
        • Update Voucher
        • Remove Voucher
      • Product Categories
        • List Categories
        • View Category
        • Create Category
        • Create Subcategory
        • Update Category
        • Assign Product to Category
        • Bulk Assign Products to Category
        • Publish Category
        • Detach Category from All Products
        • Remove Product from Category
        • Set Categories Nesting
        • Delete Category Cover Image
        • Upload Category Cover Image
        • Delete Category
        • Delete Category Image
        • Upload Category Image
        • Update Category
      • Product Brands
        • List Brands
        • Single Brand
      • Product Badge
        • List Badges
      • Product Attributes
        • List Attributes
        • View Attribute
        • Create Attribute
        • Update Attribute
        • Delete Attribute
      • Product Attribute Presets
        • List Presets
        • Create Preset
        • Update Preset
        • Delete Preset
      • Product Variants
        • Create Variants
        • Create Custom Option
        • Update Custom Option
        • Delete Custom Option Field
        • Create Custom Input Field
        • Update Custom Input Field
        • Delete Custom Input Field
      • Product Sorting
        • Set Manual Product Order
        • Reset Manual Product Order
      • Product Images
        • List Images
        • Upload Image
        • Update Image Order
        • Delete Image
      • Product Availability Notifications
        • Notification Stats
        • Noticiation Settings
        • List Notifications
        • Create Notification
        • Update Settings
        • Send Notification Email
        • Export Notifications
      • Product Export
        • Email All Products to Store Owner
        • Import Products via CSV or xlsx File
      • Product Stock
        • Retrieve Product Stock
        • List Product Stock Records
        • Create Product Stock
        • Update Product Stock
        • Bulk Update Product Stock Records
      • Product Questions & Answers
        • Retrieve Product Question
        • Retrieve Product Answer
        • List Product Questions
        • List Answers for Question
        • Create Product Question
        • Create Product Answer
        • Update Product Question
        • Update Product Answer
        • Delete Product Question
        • Delete Product Answer
        • List Store Product Questions
      • Product Reviews
        • List Reviews
        • Count Reviews
      • Digital Products
        • Create Downloadable Product
        • Generate Upload URL
        • Upload File to S3
        • Create Product Downloadable
        • Get Product Downloadables
        • Delete Product Downloadable
        • List Store Downloadables
        • Create Store Downloadable
        • Delete Store Downloadable
    • Inventories
      • Create Location
      • Update Location
      • Update Product Stock for Location
      • List Locations
      • View Location
    • Shipping
      • List Store Shipping Methods
    • Marketing
      • Coupons
        • List Coupons
        • View Coupon
        • Create Coupon
        • Generate Bulk Coupons
        • Duplicate Coupon
        • Duplicate Bulk Coupons
        • Update Coupon Note
        • Update Coupon
        • Update Bulk Coupons
        • Update Coupon Status
        • Update Bulk Coupons Status
        • Delete Coupon
        • Delete Bulk Coupons
      • Bundle Offers
        • List Bundle Offers
        • View Bundle Offer
        • Create Bundle Offer
        • Update Bundle Offer
        • Delete Bundle Offer
        • Bulk Delete Bundle Offers
      • Loyalty Program
        • Loyalty Program Status
        • Loyalty Program Details
        • Loyalty Program Info
        • Customer Loyalty Summary
        • Customer Points History
        • Activate Loyalty Program
        • Set Points Expiration Rules
        • Update Cashback Rule
        • Create Points Redemption Method
        • Update Points Redemption Method
        • Delete Points Redemption Method
        • Adjust Customer Points
        • Update Redemption Method Status
        • Loyalty Program Analytics
        • Loyalty Program Settings
      • Customer Wallets
        • Cashback Rules
          • List Cashback Rules
          • Create Cashback Rule
          • Retrieve Cashback Rule
          • Update Cashback Rule
          • Delete Cashback Rule
        • Wallet Analytics
          • Get Wallet Analytics
          • Get Wallet Analytics by Rule
        • Manager Customer Wallet
          • List Customer Wallets
          • Bulk Credit Customer Wallets
          • Bulk Debit Customer Wallets
          • Export Customer Wallets
          • Get Customer Wallet Balance
          • Credit Customer Wallet
          • Debit Customer Wallet
          • Customer Pending Cashbacks
          • Customer Wallet Transactions
    • Customers
      • Customer Tags
        • List Customer Tags
        • Add Customer Tag
        • ْUpdate Customer Tag
        • Delete Customer Tag
      • Customer Portal Tickets
        • List Customer Portal Tickets
        • Customer Portal Ticket Detail
      • List Customers
      • View Customer
      • Primary Customer List
      • FInd Customer By Phone Number
      • Customer Profile
      • Add Customer
      • Update Customer
      • Delete Customer
      • Add Bulk Customers
      • Import Customers
    • Store Settings
      • 📄 User Roles and Permissions
      • Retrieve Store Manager Profile
      • Retrieve VAT Settings
      • List Payment Methods
      • List Store Operating Countries
      • OneSignal Store Settings
      • Create or Update OneSignal Store Settings
      • Get Payment Options
    • Countries and Cities
      • List Countries
      • List Cities for Country
    • Blogs
      • Settings
        • Create
        • List
      • Categories
        • Create
        • List
        • Bulk Activate
        • Bulk Deactivate
        • Bulk Delete
        • Retrieve
        • Destroy
        • Partial Update
        • Bulk Add To Posts
        • Bulk Remove From Posts
        • Bulk Delete Blog Categories
      • Posts
        • Media
          • List
          • Create
          • Destroy
        • Create
        • List
        • Retrieve
        • Partial Update
        • Destroy
        • Archive
        • Publish
        • Bulk Archive
        • Bulk Publish
        • Bulk Delete
        • Export Posts
        • Import Template
        • Import Posts
      • Tags
        • Create
        • List
        • Retrieve
        • Partial Update
        • Destroy
        • Bulk Delete Tags
        • Bulk Add To Posts
        • Bulk Remove From Posts
      • Storefront
        • Posts
          • List
          • Retrieve
        • Categories
          • List
          • Retrieve
        • Tags
          • List
  • Webhooks
    • Overview
    • Webhook Health Tracking
    • Events
      • Order
      • Product
      • Abandoned Cart
      • Customer
      • Product Category
    • APIs
      • Health Summary
      • Broken Webhooks
      • Recover Broken Webhooks
      • List Webhooks
      • Create Webhook
      • Delete Webhook
      • Delete Webhook By subscriber
  • App Management
    • Events
    • APIs
      • Subscription Details
      • Update Usage-Based Charges
  • Build an app
    • Justifying your scopes
    • Plans & billing
      • Plans and pricing
      • Creating a plan
      • Usage-based plans
      • Private plans
      • Subscription and app events
  1. Plans & billing

Usage-based plans

A usage-based plan lets you charge a merchant for what they actually use, instead of a fixed price each month. Use it when the cost of running your app depends on consumption — messages sent, API calls made, orders processed, emails delivered.

How it works#

1.
You create a usage-based plan with a starting price and a usage type.
2.
The merchant subscribes and pays the starting price.
3.
As the merchant uses your app, you add a charge through the API.
4.
The merchant pays the charge from their Zid dashboard.
5.
You repeat step 3 as usage continues.
A usage-based subscription has no end date. It stays active until a charge goes unpaid.

Before you start#

Your app cannot mix plan types. If your app already has recurring plans, you must remove them before adding usage-based plans. The reverse is also true.
Usage-based plans do not support free trials, installation fees, or offers.
Usage-based plans cannot be combined with private plans. If your app has a usage-based plan, you cannot create private plans for it.

Creating the plan#

In the Partner Dashboard, under your app's Plans section, choose the usage-based plan type.
FieldRule
PriceAt least 1 SAR. This is what the merchant pays when they subscribe
DurationFixed at 30 days — you cannot change it
Usage typeCalls, messages, orders, emails, or Other
Custom usage labelRequired only if you choose Other. Up to 50 characters, in Arabic and English
The usage type tells the merchant what they are being billed for. Pick the one that matches your app. If none fit, choose Other and write your own label in both languages.

Adding a charge#

Call this endpoint when you want to bill the merchant for their usage.
POST https://api.zid.sa/v1/managers/market/apps/plans/subscription-charge

Headers#

HeaderValue
AuthorizationBearer {your partner token}
X-Manager-TokenThe merchant's token from OAuth
Acceptapplication/json
Content-Typeapplication/json
Accept-Languagear or en. Defaults to en
Required scope: Subscription.read_write

Body#

FieldTypeRequiredNotes
amountnumberYesIn SAR. Minimum 0.01. Decimals are allowed
descriptionobjectYesMust contain both ar and en
description.arstringYesUp to 200 characters
description.enstringYesUp to 200 characters
{
  "amount": 49.50,
  "description": {
    "ar": "استخدام 500 رسالة - أكتوبر",
    "en": "500 messages used - October"
  }
}
The description is shown to the merchant, so write something they will recognise on their invoice.

Response#

{
  "status": "object",
  "charge": {
    "id": "9eaac8b0-3530-4bdb-b2fb-34b4efe22179"
  },
  "message": {
    "type": "object",
    "code": null,
    "name": null,
    "description": "Subscription charge was updated successfully"
  }
}

Errors#

StatusMeaning
401Your credentials are missing, invalid or expired — or the merchant has no active usage-based subscription for your app
422The amount or description failed validation
500Server error
If you get a 401 and your token is valid, check that the merchant is actually subscribed to a usage-based plan. This endpoint only works for merchants on a usage-based plan.

Limits you must design around#

Two charges per merchant, per calendar month.
This counts any unpaid charge plus any charge paid during the current month. Once you reach two, further calls are rejected until the next month begins. Plan your billing around one or two charges a month — this endpoint is not designed for charging on every transaction.
Only one unpaid charge at a time.
If the merchant already has an unpaid charge, calling the endpoint again does not create a second charge. It updates the existing one with your new amount and description.
You can change an unpaid charge's amount once per calendar month.
After that, further changes are rejected until the next month.
SAR only. There is no other currency.

What happens when a merchant doesn't pay#

WhenWhat happensEvent sent to your app
Charge createdThe merchant is notified and the charge is unpaid—
Merchant paysThe charge is settled and the subscription stays activeusage_based.payment_success and subscription.renew
Payment attempt failsThe charge stays unpaidusage_based.payment_failure
30 days unpaidThe charge becomes overduesubscription.warning
30 days after thatThe charge defaults and the subscription expiressubscription.expired
Note that when a charge is paid, your app receives two events — usage_based.payment_success and subscription.renew. The amount paid appears in the subscription.renew payload, not in usage_based.payment_success. See Subscription events.

Checking a merchant's charges#

Use the Subscription Details endpoint to see the current state of a merchant's subscription and charges.
GET https://api.zid.sa/v1/market/app/subscription — scope Subscription.read
Useful fields in the response:
FieldMeaning
is_usage_based1 if the merchant is on a usage-based plan
pending_chargesAmount not yet settled
settled_chargesTotal amount settled so far
chargesThe individual charge records, with id, amount, status and overdue_at
Use this to confirm a charge was created or paid, rather than relying only on events.

Things to keep in mind#

Charges are billed after usage, not prepaid. You cannot sell a merchant a pack of credits up front.
The merchant has to act. A charge is an amount they settle from their Zid dashboard, so allow time for them to pay it.
Keep your own record of usage. Zid stores the charge amount and description you send, not the underlying usage data.
Send one clear charge per billing period rather than many small ones. The two-per-month limit makes frequent charging impossible.
Modified at 2026-10-21 13:57:06
Previous
Creating a plan
Next
Private plans
Built with