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

Get Subscription Details

GET
https://api.zid.sa/v1/market/app/subscription
This endpoint enables app partners to fetch details about a merchant's app subscription, including plan, status, and billing information.
🔑Scopes
Subscription.read - Subscription Read

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
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
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=
Accept-Language
string 
required
Preferred language for the response. Defaults to en if not specified.
Example:
en
User-Agent
string 
required
The User-Agent header contains information about the user agent (browser or app) making the request. It allows the server to provide a tailored response depending on the user agent's capabilities and preferences.
Example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Body Params application/x-www-form-urlencoded
app_id
string 
optional
Unique identifier for the application.
Example:
123

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 GET 'https://api.zid.sa/v1/market/app/subscription' \
--header 'Accept: application/json' \
--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 'X-Manager-Token: eyJpdiI6IlA3WTFZbWk1YVBTQnNrYkRtOFBGZGc9PSIsInZhbHVlIjoiL3QvVmtuMHFQdGNMdkNwZ0FCZkh3Y1l4aEs5NDhGVnFXbWVZYlFJb2kucdcNrekppN09CVTlnYlducjRLbjhXNzhFTFhhZDZTSXdRbUphSEYyUkZJWTJFZ0h3Ymlzb1RVNmxlaEkjgftrmpIZ1RmZXVFYUszZG5DZDZjbTRqNzByNVBMTktzYkQ3WGQ5MDhqbWo2NWFkT3MvRExmYVY4YXBCakkwSjR1L2pTbUR4dWZvd2h5K2tTQlAvRlN2TnZuOVFROW42WTRqZmtkWUZWem4rRXFLVU00aGJtQT0iLCJtYWMiOiJjM2U2ZGRmMjY1ZjFmMmI5YjZlMzFkMGFhNmMzYjM5ZjhiOWE0YjVhMzU2ZTRhYTkxOTVlYmFiMTVkY2I1NWQ2IiwidGFnIjoiIn0=' \
--header 'Accept-Language: en' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36' \
--data-urlencode 'app_id=123'

Responses

🟢200OK
application/json
Body
status
enum<string> 
required
Indicates the status of the API response.
Allowed value:
object
Example:
object
subscription
object 
required
Contains the subscription details associated with the provided token.
app_id
integer 
optional
Unique identifier of the subscribed application.
Example:
2376
store_id
integer 
optional
Unique identifier of the store associated with the subscription.
Example:
26520
store_url
string 
optional
URL of the store associated with the subscription.
Example:
https://example.zidtest.com/
plan_name
string 
optional
Name of the subscription plan in Arabic.
Example:
1استخدام
subscription_status
string 
optional
Current status of the subscription.
Example:
active
start_date
string <date-time>
optional
Timestamp indicating when the subscription started.
Example:
2025-02-04T15:55:07.000000Z
end_date
string <date-time> | null 
optional
Timestamp indicating when the subscription ends. Null if ongoing.
Example:
null
merchant_phone_no
string 
optional
Contact phone number of the merchant associated with the subscription.
Example:
+201063989603
merchant_email
string 
optional
Email address of the merchant associated with the subscription.
Example:
m.example@zid.sa
is_usage_based
integer 
optional
Indicates if the subscription follows a Usage-Based Pricing model. 1 for true (usage-based), 0 for false (fixed pricing).
Example:
1
pending_charges
integer 
optional
The amount of charges that are yet to be settled for the subscription.
Example:
100
settled_charges
integer 
optional
The total amount of charges that have been successfully settled.
Example:
1
charges
array [object {7}] 
optional
List of individual charges associated with this subscription.
message
object 
required
Contains additional information about the API response.
type
string 
optional
Indicates the type of the message.
Example:
object
code
string  | null 
optional
Code associated with the message, if applicable.
Example:
null
name
string  | null 
optional
Name of the message, if applicable.
Example:
null
description
string 
optional
A detailed description of the message.
Example:
Store subscription details of the provided token
Example
{
  "status": "object",
  "subscription": {
    "app_id": 2374,
    "store_id": 23322,
    "store_url": "https://9nirs7.zidtest.com/",
    "plan_name": "ادفع ع حسب",
    "subscription_status": "active",
    "start_date": "2025-01-30T11:15:32.000000Z",
    "end_date": null,
    "merchant_phone_no": "966500000005",
    "merchant_email": "abbas.shahwan@gmail.com",
    "is_usage_based": 1,
    "pending_charges": 300,
    "settled_charges": 530,
    "charges": [
      {
        "id": "9eaac8b0-3530-4bdb-b2fb-34b4efe22179",
        "subscription_id": 333,
        "amount": 300,
        "amount_details": {
          "amount": 34500,
          "currency": "SAR",
          "formatted": "ر.س‎ 345.00"
        },
        "status": "pending",
        "overdue_at": null,
        "created_at": "2025-04-13T16:58:06.000000Z"
      },
      {
        "id": "9e1775e5-8dc7-49e5-9a31-4543f9c9c004",
        "subscription_id": 333,
        "amount": 300,
        "amount_details": {
          "amount": 34500,
          "currency": "SAR",
          "formatted": "ر.س‎ 345.00"
        },
        "status": "paid",
        "overdue_at": null,
        "created_at": "2025-01-30T11:19:54.000000Z"
      },
      {
        "id": "9e1db3a8-ea56-4510-9e32-e82e11b39b6d",
        "subscription_id": 333,
        "amount": 130,
        "amount_details": {
          "amount": 14950,
          "currency": "SAR",
          "formatted": "ر.س‎ 149.50"
        },
        "status": "paid",
        "overdue_at": null,
        "created_at": "2025-01-02T13:47:34.000000Z"
      },
      {
        "id": "9e17774d-c51d-4fed-a680-67f4cec6b795",
        "subscription_id": 333,
        "amount": 100,
        "amount_details": {
          "amount": 11500,
          "currency": "SAR",
          "formatted": "ر.س‎ 115.00"
        },
        "status": "paid",
        "overdue_at": "2025-01-30 11:25:20",
        "created_at": "2024-12-31T10:16:03.000000Z"
      }
    ]
  },
  "message": {
    "type": "object",
    "code": null,
    "name": null,
    "description": "Store subscription details of the provided token"
  }
}
Modified at 2025-04-24 08:17:00
Previous
App Events
Next
Update Usage-Based Charges
Built with