PENDING status and become ACTIVE after the customer completes card setup.
Base URL: https://app.kulmipay.com/api/v1/subscriptions/subscriptions/
Subscription lifecycle
| Status | Description |
|---|---|
PENDING | Subscription created, awaiting customer card setup. |
ACTIVE | Card setup complete; recurring billing is running. |
COMPLETE | All billing cycles in the plan have been processed. |
CANCELED | Subscription was cancelled via the unsubscribe endpoint. |
FAILED | A billing attempt failed. The subscription retries on the next scheduled date. |
Create a subscription
POST /api/v1/subscriptions/subscriptions/
Creates a new subscription for a customer against a billing plan. The response includes a setup_url — send your customer to this URL to complete card enrollment. The subscription becomes ACTIVE once the customer successfully sets up their payment method.
Request parameters
The
plan_id (alias ID) of the billing plan to subscribe to. Create plans using the plans endpoint.The
customer_id (alias ID) of the customer being subscribed. Create customers using the customers endpoint.Your internal reference ID for this subscription. Optional. Alphanumeric and standard punctuation characters only, up to 45 characters.
A URL to redirect the customer to after they complete card setup. If not provided, the plan’s
redirect_url is used.The date on which billing should start, in
YYYY-MM-DD format. Defaults to today if not specified.cURL
Get subscription details
GET /api/v1/subscriptions/subscriptions/{subscription_id}/
Returns the full details of a subscription, including the linked customer and plan objects.
Update a subscription
PUT /api/v1/subscriptions/subscriptions/{subscription_id}/
Updates the plan or next billing date for an active subscription.
The
plan_id of the new plan to switch this subscription to.Override the next billing date, in
YYYY-MM-DD format. Must be today or a future date.Cancel a subscription
POST /api/v1/subscriptions/subscriptions/{subscription_id}/unsubscribe/
Cancels the subscription immediately. No further charges will be made. The subscription status changes to CANCELED.
cURL
Get subscription payment history
GET /api/v1/subscriptions/subscriptions/{subscription_id}/transactions/
Returns a list of all payment records for this subscription, including the linked invoice for each billing cycle.
Subscription object
The subscription alias ID. Use this value in all subsequent calls to reference this subscription.
Current subscription status:
PENDING, ACTIVE, COMPLETE, CANCELED, or FAILED.The date billing started, in
YYYY-MM-DD format.The date of the next scheduled billing attempt.
null if the subscription is complete or canceled.The number of billing cycles that have been successfully processed.
The reason for the most recent failed billing attempt. Present only when
status is FAILED.The URL to send the customer to for card enrollment. Required for the subscription to become active.
The customer linked to this subscription. See customers for the full object structure.
The payment method used for recurring charges. Currently
CARD-PAYMENT.The masked card number used for billing, for example
****4242. Present after card setup completes.The card network, for example
VISA or MASTERCARD. Present after card setup completes.ISO 8601 timestamp of when the subscription was created.
