List Subscriptions
List subscriptions available
You do this by making a GET request to subscriptions endpoint from your server.
-H "x-api-key: your_secret_key".
{{host}}/v1/subscriptions
Query Parameters
| Status | Data Type | Description | 
|---|---|---|
| order | enum | allowed values are ASC or DESC | 
| page | integer | Specify exactly what page you want to retrieve. If not specified we use a default value of 1 | 
| limit | integer | Specify how many records you want to retrieve per page. maximum record per page is 100 | 
| query | string | Filter by customer email or subscription code or Plan code | 
| status | boolean | Filter by status of the subscription | 
| startDate | date | Filter date range by date of which subscription was created eg. 2017-05-16T00:30:13+01:00 | 
| endDate | date | Filter date range by date of which subscription was created eg. 2017-05-16T00:30:13+01:00 | 
If the API call is successful, Kyshi returns the following response:
{
    "status": true,
    "message": "Success",
    "code": 200,
    "data": {
        "page": 1,
        "limit": 100,
        "total": 33,
        "pageCount": 1,
        "hasPreviousPage": false,
        "hasNextPage": false,
        "data": [
            {
                "id": "7697cabd-ee1b-435a-9ae3-82b926cc5334",
                "code": "SUB_7263269_W-dnE2xtS015ETu",
                "startDate": "2024-12-19T17:15:03.494Z",
                "nextPaymentDate": "2024-12-19T17:15:03.495Z",
                "isActive": true,
                "createdAt": "2024-06-19T16:15:02.849Z",
                "updatedAt": "2024-06-19T16:18:42.625Z",
                "deletedAt": null,
                "version": 2,
                "customer": {
                    "id": "e48419c7-701d-4933-93c7-2e8eeaf09bce",
                    "firstName": null,
                    "lastName": null,
                    "phoneNumber": null,
                    "email": "[email protected]",
                    "customerCode": null,
                    "currencyCode": "NGN",
                    "active": true,
                    "createdAt": "2024-06-19T16:15:02.849Z",
                    "updatedAt": "2024-06-19T16:15:02.849Z",
                    "version": 1
                },
                "card": {
                    "id": "bdc39678-ef30-4cd1-ab88-14ff979f9132",
                    "bin": "408408",
                    "last4": "0409",
                    "expMonth": "01",
                    "expYear": "2030",
                    "cardType": "visa ",
                    "bank": "TEST BANK",
                    "countryCode": "NG",
                    "brand": "visa",
                    "reusable": true,
                    "authorizationCode": "AUTH_b7ymikof8e",
                    "active": true,
                    "currencyCode": "NGN",
                    "createdAt": "2024-06-19T16:18:42.625Z",
                    "updatedAt": "2024-06-19T16:18:42.625Z",
                    "version": 1
                },
                "plan": {
                    "id": "4a3fc25a-6056-4daa-b9bb-9380904d5751",
                    "name": "TEST",
                    "description": "FIEXING",
                    "interval": "biannually",
                    "amount": "5000.00",
                    "code": "PLN_undefined_729NzKoRJQeoYdB",
                    "sendSms": false,
                    "sendInvoices": false,
                    "limit": "0.00",
                    "hostedPage": false,
                    "isActive": true,
                    "createdAt": "2024-05-30T12:10:56.782Z",
                    "updatedAt": "2024-05-30T12:10:56.782Z",
                    "deletedAt": null,
                    "version": 1
                }
            }
        ]
    }
}
Updated over 1 year ago
