Get Plan

Get details of a plan.

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

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

Path Parameters

FieldData typeDescription
planIdOrCodestring.The Plan ID or code you want to fetch.

If the API call is successful, Kyshi returns the following response:

{
    "status": true,
    "message": "Success",
    "code": 200,
    "data": {
        "id": "8a2ad72d-71fa-44aa-9b9a-495b554b8cc3",
        "name": "TEST",
        "description": "FIEXING",
        "interval": "biannually",
        "amount": "5000.00",
        "code": "PLN_7263269_jYG32axO8EPwqyM",
        "sendSms": false,
        "sendInvoices": false,
        "limit": "0.00",
        "hostedPage": false,
        "isActive": true,
        "createdAt": "2024-05-30T13:05:19.865Z",
        "updatedAt": "2024-05-30T13:05:19.865Z",
        "deletedAt": null,
        "version": 1,
        "subscriptions": [
            {
                "id": "f067b040-f40f-4bad-9452-463e188af8a6",
                "code": "SUB_7263269_J8w-glJqX4j1yMY",
                "startDate": "2024-12-19T14:12:08.345Z",
                "nextPaymentDate": "2024-12-19T14:12:08.345Z",
                "isActive": true,
                "createdAt": "2024-06-19T14:12:08.252Z",
                "updatedAt": "2024-06-19T14:12:08.252Z",
                "deletedAt": null,
                "version": 1
            },
            {
                "id": "153716b6-b3e5-4ec0-a3e0-e91b5ab17f6f",
                "code": "SUB_7263269_1eMESdNHYmtEGQF",
                "startDate": "2024-12-19T16:05:03.201Z",
                "nextPaymentDate": "2024-12-19T16:05:03.202Z",
                "isActive": false,
                "createdAt": "2024-06-19T15:05:02.651Z",
                "updatedAt": "2024-06-19T15:05:02.651Z",
                "deletedAt": null,
                "version": 1
            }
        ]
    }
}