Get Subscription

Get details of a subscription.

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

-H "x-api-key: your_secret_key".
GET {{host}}/v1/subscriptions/:subscriptionIdOrCode

Path Parameters

FieldData typeDescription
subscriptionIdOrCodestring.The subscription 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": "7697cabd-ee1b-435a-9ae3-82b926cc5334",
    "code": "SUB_7263269_W-dnE2xtS015ETu",
    "status": "ACTIVE",
    "isActive": true,
    "startDate": "2026-05-01T00:00:00.000Z",
    "previousPaymentDate": "2026-05-01T00:00:00.000Z",
    "nextPaymentDate": "2026-06-01T00:00:00.000Z",
    "currentPeriodStart": "2026-05-01T00:00:00.000Z",
    "currentPeriodEnd": "2026-06-01T00:00:00.000Z",
    "pastDueAt": null,
    "nextRetryAt": null,
    "retryCount": 0,
    "maxRetryCount": 3,
    "gracePeriodDays": 3,
    "cancelledAt": null,
    "cancelReason": null,
    "invoiceLimit": 12,
    "invoicesPaid": 1,
    "mode": "live",
    "createdAt": "2026-05-01T00:00:00.000Z",
    "updatedAt": "2026-05-01T00:00:00.000Z",
    "plan": {
      "id": "4a3fc25a-6056-4daa-b9bb-9380904d5751",
      "name": "Premium Plan",
      "description": "Monthly premium access",
      "interval": "monthly",
      "amount": 5000,
      "settlementAmount": null,
      "settlementCurrency": null,
      "code": "PLN_xxxxxxxxxxxxx",
      "sendSms": false,
      "sendInvoices": false,
      "hostedPage": false,
      "isActive": true
    },
    "customer": {
      "id": "e48419c7-701d-4933-93c7-2e8eeaf09bce",
      "firstName": null,
      "lastName": null,
      "phoneNumber": null,
      "email": "[email protected]",
      "customerCode": null,
      "currencyCode": "NGN",
      "active": true
    },
    "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"
    }
  }
}


Response Fields

FieldDescription
statusCurrent subscription status. One of ACTIVE, PAST_DUE, NON_RENEWING, COMPLETED, CANCELLED.
isActiveEntitlement flag. If true, the customer should have access.
startDateDate the subscription starts.
previousPaymentDateLast successful billing date.
nextPaymentDateNext scheduled billing date or retry date.
currentPeriodStartStart of the current paid billing period.
currentPeriodEndEnd of the current paid billing period.
pastDueAtDate the subscription first became past due.
nextRetryAtNext retry date for failed renewal payments.
retryCountNumber of retry attempts made in the current failed billing cycle.
maxRetryCountMaximum retry attempts allowed.
gracePeriodDaysNumber of days before a failed subscription is cancelled.
cancelledAtDate the subscription was cancelled.
cancelReasonReason for cancellation, if available.
invoiceLimitMaximum number of successful billing cycles. null means billing continues until cancelled.
invoicesPaidNumber of successful billing cycles completed.
modetest or live.

Access Control

Use both status and isActive to determine access.

Grant Access When

  • status = ACTIVE and isActive = true

Do NOT Grant Access When

  • status = PAST_DUE
  • status = CANCELLED
  • status = COMPLETED
  • isActive = false

NON_RENEWING Behavior

  • status = NON_RENEWING and isActive = true → access allowed until currentPeriodEnd

Error Responses

HTTP StatusError CodeDescription
404NOT_FOUNDSubscription not found.
401UNAUTHORIZEDInvalid or missing API key.
422UNPROCESSABLE_ENTITYInvalid subscription ID or code.