Skip to main content
POST
/
v1
/
subscriptions
Create subscription
curl --request POST \
  --url https://api.quentli.com/v1/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "customerId": "cus_1234567890abcdefghij",
    "collectionMethod": "SEND_REMINDER",
    "description": "Colegiatura mensual",
    "nextCollectionDate": "2025-06-01T00:00:00.000Z",
    "numberOfPayments": 12,
    "onlyAutomaticCollection": false,
    "beneficiaryId": null,
    "taxProfileId": null,
    "templateId": null,
    "paymentMethodId": null,
    "modifiers": [
      {
        "modifierId": "prm_1234567890abcdefghij"
      }
    ],
    "discounts": [
      {
        "discountId": "disc_1234567890abcdefghij",
        "maxInvoices": 3
      }
    ],
    "invoices": [
      {
        "items": [
          {
            "conceptId": "pc_1234567890abcdefghij",
            "quantity": 1
          }
        ],
        "dueDate": "2025-06-01T00:00:00.000Z",
        "expireDate": null
      }
    ],
    "items": [
      {
        "conceptId": "pc_1234567890abcdefghij",
        "quantity": 1
      }
    ]
  }
}
'
{
  "subscription": {
    "id": "sub_1234567890abcdefghij",
    "createdAt": "2025-01-01T06:00:00.000Z",
    "updatedAt": "2025-01-01T06:00:00.000Z",
    "customerId": "cus_1234567890abcdefghij",
    "collectionMethod": "AUTOMATIC",
    "firstCollectionDate": "2025-01-01T06:00:00.000Z",
    "generationMode": "AUTO",
    "onlyAutomaticCollection": false,
    "isActive": true,
    "isCompleted": false,
    "description": "Colegiatura mensual",
    "status": "ACTIVE",
    "paymentMethodId": "pm_1234567890abcdefghij",
    "taxProfileId": null,
    "nextCollectionDate": "2025-02-01T06:00:00.000Z",
    "lastCollectionDate": "2025-12-01T06:00:00.000Z",
    "metadata": {
      "Nivel": "Preparatoria"
    },
    "customCancelReason": null,
    "canceledAt": null,
    "canceledById": null
  }
}

Authorizations

Authorization
string
header
required

Organization API key using Authorization: Bearer sk_....

Body

application/json

Request body for creating a subscription.

input
object
required

Response

Subscription created

Successful subscription creation response.

subscription
object
required

Recurring billing subscription tied to a customer.