Create subscription
Changed onSubscribes a customer to a plan. A new subscription is PENDING until the first charge settles: wait for subscription.active before granting access. Card subscriptions are charged automatically; bank_transfer, bank and mobile_money subscriptions are billed by invoice link each cycle.
Request
- Base URLhttps://api.kyshi.co
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Request body
Example request
{
"planCode": "plan_monthly_pro",
"customer": "dom@yopmail.com",
"card": "AUTH_8dfhjjdt",
"startDate": "2026-10-01T00:00:00Z",
"paymentMethod": "card",
"redirectUrl": "https://merchant.example.com/subscriptions/return",
"invoiceLimit": 12,
"maxRetryCount": 3,
"gracePeriodDays": 5
}Response
Success.
Example response
{
"status": true,
"message": "Success",
"code": 200,
"data": {}
}Changes
- breaking
the
headerrequest parameteridempotency-keybecame required - breaking
the request property
became required - breaking
the request property
became required - breaking
the response's body type changed from
objectto no type for status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - info
the endpoint scheme security
ApiKeyAuthwas added to the API - info
the
request property format was generalized fromemailto no format - info
added
subschema #2to the response bodyallOflist for the response status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- breaking