Create Subscription

Create a subscription from a plan.

Create a subscription for a customer using an existing plan code.

Use paymentMethod to choose the collection mode. card is for card auto-collection. bank_transfer, bank, and mobile_money are invoice-based collection methods where Kyshi creates invoices and payment links or instructions for the customer to complete payment.

For invoice-based subscription reminders, create the plan with sendInvoices: true and confirm that your business notification settings are configured.

-H "x-api-key: your_secret_key"
-H "idempotency-key: unique-request-key"
POST {{host}}/v1/subscriptions

Request Body

FieldData TypeRequiredDescription
planCodestringYesPlan code, for example PLN_abc123.
customerstringYesCustomer email address.
cardstringNoSaved card/authorization identifier for card subscriptions.
startDatestringNoISO date/time to start the subscription.
paymentMethodstringNocard, mobile_money, bank_transfer, or bank. Use card for auto-collection and non-card methods for invoice/payment-link collection.
redirectUrlstringNoRedirect URL for hosted payment steps.
invoiceLimitnumberNoMaximum number of invoices to generate before completing the subscription.
maxRetryCountnumberNoMaximum retry attempts for failed invoices.
gracePeriodDaysnumberNoGrace period before cancellation after failed retries.
{
  "planCode": "PLN_abc123",
  "customer": "[email protected]",
  "paymentMethod": "card",
  "redirectUrl": "https://merchant.example.com/subscriptions/callback",
  "invoiceLimit": 12,
  "maxRetryCount": 3,
  "gracePeriodDays": 3
}
{
  "planCode": "PLN_abc123",
  "customer": "[email protected]",
  "paymentMethod": "bank_transfer",
  "redirectUrl": "https://merchant.example.com/subscriptions/callback",
  "invoiceLimit": 12,
  "maxRetryCount": 3,
  "gracePeriodDays": 3
}
{
  "status": true,
  "message": "Success",
  "code": 201,
  "data": {
    "id": "93ad2450-b49f-4c3f-a871-52a5455bdf62",
    "code": "SUB_abc123",
    "status": "ACTIVE",
    "paymentMethod": "card",
    "startDate": "2026-05-20T10:15:00.000Z",
    "nextPaymentDate": "2026-06-20T10:15:00.000Z",
    "retryCount": 0,
    "maxRetryCount": 3,
    "gracePeriodDays": 3
  }
}