List Plans

List plans available

You do this by making a GET request to plans endpoint from your server.

-H "x-api-key: your_secret_key".
{{host}}/v1/plans

Query Parameters

StatusData TypeDescription
orderenumallowed values are ASC or DESC
pageintegerSpecify exactly what page you want to retrieve. If not specified we use a default value of 1
limitintegerSpecify how many records you want to retrieve per page. maximum record per page is 100
querystringFilter by Plan name
statusbooleanFilter by status of the Plan
startDatedateFilter date range by date of which subscription was created eg. 2017-05-16T00:30:13+01:00
endDatedateFilter 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": 32,
        "pageCount": 1,
        "hasPreviousPage": false,
        "hasNextPage": false,
        "data": [
            {
                "id": "f4d2d1af-b5d3-41f6-a0dc-e010e38ec693",
                "name": "TEST",
                "description": "FIEXING",
                "interval": "biannually",
                "amount": "500000.00",
                "code": "PLN_AYwdru4-8erOtsk",
                "sendSms": false,
                "sendInvoices": false,
                "limit": "0.00",
                "hostedPage": false,
                "isActive": true,
                "createdAt": "2024-06-21T16:24:05.446Z",
                "updatedAt": "2024-06-21T16:24:05.446Z",
                "deletedAt": null,
                "version": 1,
                "subscriptions": [
                    {
                        "id": "59b4509c-8adc-435e-9601-ef6f9450fa09",
                        "code": "SUB_v-ctNKE0HhwsSBh",
                        "startDate": "2024-12-21T17:25:29.743Z",
                        "nextPaymentDate": "2024-12-21T17:25:29.744Z",
                        "isActive": true,
                        "createdAt": "2024-06-21T16:25:29.203Z",
                        "updatedAt": "2024-06-21T16:25:29.203Z",
                        "deletedAt": null,
                        "version": 1
                    }
                ]
            }
        ]
    }
}