icon: calendar-plus
Create Subscription
Use the Create Subscription API to create a subscription for an existing customer using a previously created subscription plan. The API creates a subscription mandate in KwikPaisa Neo Bank and returns a uniquemandate_id. The subscription is initially created with a pending status.
Once created, the subscription can be used to initiate the customer authorization process through the subscription checkout flow.
This API supports:
- UPI
- Card
- Net Banking
Endpoint
To view all available base URLs and environments, refer to:
➡️ API ResourcesThis endpoint requires standard KwikPaisa Neo Bank authentication headers.
Refer to: ➡️ Headers➡️ Signature Generation
➡️ Timestamp Validation
Request Parameters
Metadata Parameters
Themetadata object supports merchant-defined information associated with the subscription.
Example Request Body
Example cURL Request
Signature Generation
Generate the request signature using the recursively sorted request payload.Example Success Response
Response Parameters
Subscription Status
A newly created subscription is assigned the following initial status:Important Notes
- Create a customer before creating a subscription.
- Create a plan before creating a subscription.
- The supplied
customer_idandplan_idmust belong to the authenticated merchant account. - The
reference_idshould be unique for each subscription under the merchant account. - The subscription amount, currency, and billing frequency are derived from the associated plan.
metadatais intended for additional merchant-defined information.start_atandauthorization_expires_atare provider-generated values and are updated during the authorization process.- A successful API response means the subscription record has been created; it does not mean that the customer has authorized the mandate.
- Store the returned
mandate_idfor subsequent subscription operations. - Generate API signatures on your server only.
- Never expose your secret key in frontend applications.
- Use HTTPS for all API requests.
Recommended Subscription Flow
- Create a customer using the Create Customer API.
- Create a subscription plan using the Create Plan API.
- Create a subscription using the customer ID and plan ID.
- Store the generated
mandate_id. - Provide the subscription authorization/checkout URL to the customer when available.
- Customer completes the mandate authorization process.
- Receive the webhook notification and update the subscription status.
- Use the Fetch Subscription API to retrieve the latest subscription details.
