Zid Docs
Merchant APIApp APIThemes
Merchant APIApp APIThemes
Help Center
Slack
  1. App Subscription
  • Create your First App
  • Embedded Apps
  • App Scripts
  • App Events
  • App Subscription
    • Get Subscription Details
      GET
    • Update Usage-Based Charges
      POST
  1. App Subscription

Update Usage-Based Charges

POST
https://api.zid.sa/v1/managers/market/apps/plans/subscription-charge
This endpoint allows app partners to update the outstanding balance for their app's usage-based plan, ensuring flexible billing adjustments to align with merchants' pay-as-you-go consumption.
🔑Scopes
Subscription.read_write - Subscription Read & Write
You can update charges up to twice per 30-day billing cycle

Request

Header Params
Accept
string 
required
Specifies the Media Types acceptable for the client. In this case, it signals that the client expects a response in the JSON format.
Example:
application/json
Accept-Language
string 
optional
Preferred language for the response. Defaults to en if not specified.
Example:
en
X-Manager-Token
string 
required
This token is used to authenticate and access information related to the store. It is obtained through an OAuth mechanism and is required to perform operations on the store's data. The X-Manager-Token should be included in the header of API requests that require store-related information.
Example:
eyJpdiI6IlA3WTFZbWk1YVBTQnNrYkRtOFBGZGc9PSIsInZhbHVlIjoiL3QvVmtuMHFQdGNMdkNwZ0FCZkh3Y1l4aEs5NDhGVnFXbWVZYlFJb2kucdcNrekppN09CVTlnYlducjRLbjhXNzhFTFhhZDZTSXdRbUphSEYyUkZJWTJFZ0h3Ymlzb1RVNmxlaEkjgftrmpIZ1RmZXVFYUszZG5DZDZjbTRqNzByNVBMTktzYkQ3WGQ5MDhqbWo2NWFkT3MvRExmYVY4YXBCakkwSjR1L2pTbUR4dWZvd2h5K2tTQlAvRlN2TnZuOVFROW42WTRqZmtkWUZWem4rRXFLVU00aGJtQT0iLCJtYWMiOiJjM2U2ZGRmMjY1ZjFmMmI5YjZlMzFkMGFhNmMzYjM5ZjhiOWE0YjVhMzU2ZTRhYTkxOTVlYmFiMTVkY2I1NWQ2IiwidGFnIjoiIn0=
Content-Type
string 
required
The Media Type of the body of the request. This is used to describe the structure of the data in the body.
Example:
application/json
Authorization
string 
required
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
Example:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMTciLCJqdGkiOiJhMTg5ZTg3MmYxMzhkMWVhYjU5MjVkMDkyMGE5NmI0YjliNjg0Y2E2ZTdmM2M2MjljZWYxNmQ4NDJjMmJlYmVhMjI4YTdmMTA0ZWQ4NWE5NCIsImlhdCI6MTY3OTU3Njk5OS41NjY4NzcsIm5iZiI6MTY3OTU3Njk5OS41NjY4OCwiZXhwIjoxNzExMTk5Mzk5LjQ4NjE1Mywic3ViIjoiMTgyNDc1Iiwic2NvcGVzIjpbInRoaXJkLXBhcnRpZXMtYXBpcyJdfQ.i07ef09nVNXGZF-g-QXpNoS2vlFQK_zntAqAMS4Az2XD2EyMLhxLZZRL-QlR11zUPqMmXjMAl_4ooKa3M3zkfZQ6Ga6qStvamk8RnC_39VUx0lfN2A4k65ERZpqwrMy6-t3dE99zay3aicIdNvbgi0zeuMSE5Tn99u-2AtSRa8ffbfAcYPPXacHrhdmlYzdiZS_x_skovFEow1E-nDjdL1WHqO92XdZ7RfNLkiYFTjZlZmM_UruvioaR3q6TXJbqRK_ZrziivezL8ohIQ2SBosUp58I29rlKzvlw_R2j0rKKYZbdxYDaxAHOISmOFKAlO66k7dNevAHI3s4uGIjoGA6ZXHknccWPLLLiaAQ0r64HV8GowW5dg2rhZNurJGDTnLlBQ6F-ql42ptHzSAfzzi576CEoN3gMVpgXcbntUY3reETkFsTBPUjeSuMpANMioXAA0GRp3Ut-84fTnrWxqsCW1WVUIx33HvmfCGPXIdkaCCWoA6G6KXo04MtFbKXQmXkK9esQWI-rqdVnMD3zSR3g3yFHZSL1U-mZeNja03706Rav1ordsRNOtRwtLuoRRbk9KasbUpEwqq4Ao9lqZZwRIjdEw-pQtnUT8V53fhmuuRIefCLFO7eGEtGUnh9o6Uh_pgi6AB6uSlnN9GEMGgI1alqvMmTjxvC-HHt0V-Y
Body Params application/json
amount
integer 
required
The amount to be charged for the subscription.
Example:
100
description
object 
required
An object containing descriptions in different languages.
ar
string 
required
The Arabic description of the charge.
Example:
الوصف بالعربي
en
string 
required
The English description of the charge.
Example:
english description
Example
{
  "amount": 100,
  "description": {
    "ar": "الوصف بالعربي",
    "en": "english description"
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zid.sa/v1/managers/market/apps/plans/subscription-charge' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'X-Manager-Token: eyJpdiI6IlA3WTFZbWk1YVBTQnNrYkRtOFBGZGc9PSIsInZhbHVlIjoiL3QvVmtuMHFQdGNMdkNwZ0FCZkh3Y1l4aEs5NDhGVnFXbWVZYlFJb2kucdcNrekppN09CVTlnYlducjRLbjhXNzhFTFhhZDZTSXdRbUphSEYyUkZJWTJFZ0h3Ymlzb1RVNmxlaEkjgftrmpIZ1RmZXVFYUszZG5DZDZjbTRqNzByNVBMTktzYkQ3WGQ5MDhqbWo2NWFkT3MvRExmYVY4YXBCakkwSjR1L2pTbUR4dWZvd2h5K2tTQlAvRlN2TnZuOVFROW42WTRqZmtkWUZWem4rRXFLVU00aGJtQT0iLCJtYWMiOiJjM2U2ZGRmMjY1ZjFmMmI5YjZlMzFkMGFhNmMzYjM5ZjhiOWE0YjVhMzU2ZTRhYTkxOTVlYmFiMTVkY2I1NWQ2IiwidGFnIjoiIn0=' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMTciLCJqdGkiOiJhMTg5ZTg3MmYxMzhkMWVhYjU5MjVkMDkyMGE5NmI0YjliNjg0Y2E2ZTdmM2M2MjljZWYxNmQ4NDJjMmJlYmVhMjI4YTdmMTA0ZWQ4NWE5NCIsImlhdCI6MTY3OTU3Njk5OS41NjY4NzcsIm5iZiI6MTY3OTU3Njk5OS41NjY4OCwiZXhwIjoxNzExMTk5Mzk5LjQ4NjE1Mywic3ViIjoiMTgyNDc1Iiwic2NvcGVzIjpbInRoaXJkLXBhcnRpZXMtYXBpcyJdfQ.i07ef09nVNXGZF-g-QXpNoS2vlFQK_zntAqAMS4Az2XD2EyMLhxLZZRL-QlR11zUPqMmXjMAl_4ooKa3M3zkfZQ6Ga6qStvamk8RnC_39VUx0lfN2A4k65ERZpqwrMy6-t3dE99zay3aicIdNvbgi0zeuMSE5Tn99u-2AtSRa8ffbfAcYPPXacHrhdmlYzdiZS_x_skovFEow1E-nDjdL1WHqO92XdZ7RfNLkiYFTjZlZmM_UruvioaR3q6TXJbqRK_ZrziivezL8ohIQ2SBosUp58I29rlKzvlw_R2j0rKKYZbdxYDaxAHOISmOFKAlO66k7dNevAHI3s4uGIjoGA6ZXHknccWPLLLiaAQ0r64HV8GowW5dg2rhZNurJGDTnLlBQ6F-ql42ptHzSAfzzi576CEoN3gMVpgXcbntUY3reETkFsTBPUjeSuMpANMioXAA0GRp3Ut-84fTnrWxqsCW1WVUIx33HvmfCGPXIdkaCCWoA6G6KXo04MtFbKXQmXkK9esQWI-rqdVnMD3zSR3g3yFHZSL1U-mZeNja03706Rav1ordsRNOtRwtLuoRRbk9KasbUpEwqq4Ao9lqZZwRIjdEw-pQtnUT8V53fhmuuRIefCLFO7eGEtGUnh9o6Uh_pgi6AB6uSlnN9GEMGgI1alqvMmTjxvC-HHt0V-Y' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount" : 100,
  "description" : {"ar" : "الوصف بالعربي", "en" : "english description"}
}'

Responses

🟢200OK
application/json
Body
status
string 
required
Indicates the status of the API response.
Example:
success
charge
string 
required
Contains information related to the charge that was updated.
id
string 
required
The unique identifier of the updated usage-based charge.
Example:
9eaac8b0-3530-4bdb-b2fb-34b4efe22179
message
object 
required
Contains detailed information about the response message.
type
string 
optional
The type of the message.
Example:
success
code
string 
optional
The code associated with the message.
Example:
" "
name
string 
optional
The name of the message.
Example:
" "
description
string 
optional
A detailed description of the message.
Example:
Subscription charge was updated successfully
Example
{
  "status": "object",
  "charge": {
    "id": "9eaac8b0-3530-4bdb-b2fb-34b4efe22179"
  },
  "message": {
    "type": "object",
    "code": null,
    "name": null,
    "description": "Subscription charge was updated successfully"
  }
}
Modified at 2025-04-24 08:00:00
Previous
Get Subscription Details
Built with