API reference
Recurring billing
Subscribe your customers to a plan (plans are created in the dashboard). Each installment is a single-use charge with its own `checkoutUrl`, and paying it creates a regular order. PRO and PREMIUM plans only.
Endpoints
The Subscription object
Object fields, as the API returns them.
objectstringAlwayssubscription.idstring (uuid)Subscription id.planIdstring (uuid)Plan id.planNamestringPlan name.customerobjectYour customer.customer.namestringName.customer.emailstringNullableEmail for reminders.customer.phonestringNullableWhatsApp, digits only.localestringReminder language.Possible values:esenstatusstringStored status.Possible values:ACTIVEPAUSEDCANCELLEDENDEDstatestringWhat you see in the dashboard:CURRENT= up to date;OVERDUE= at least one unpaid overdue installment.Possible values:CURRENTOVERDUEPAUSEDCANCELLEDENDEDfrequencystringHow often it's charged.Possible values:WEEKLYMONTHLYYEARLYamountstring (decimal)Amount of the next installment.customAmountbooleantrueif the amount is this customer's own and not the plan's.currencystringAlwaysUSD.startDatestringStart date.nextDueDatestringNullableDue date of the next installment to be generated.nextInstallmentNumberintegerNumber of the next installment.totalInstallmentsintegerNullableThe plan's number of installments, ornull.overdueCountintegerUnpaid overdue installments.overdueAmountstring (decimal)What they add up to.autoChargeMethodstringNullableReserved for automatic charging with a saved card. Alwaysnulltoday: each installment is paid through its link.referencestringNullableYour reference.metadataobjectYour data, as you sent it.sourcestringWhere it was created:dashboardorapi_v1.Possible values:dashboardapi_v1pausedAtstring (date-time)NullableWhen it was paused.cancelledAtstring (date-time)NullableWhen it was cancelled.endedAtstring (date-time)NullableWhen it ended (the last installment was paid).createdAtstring (date-time)When it was created.installmentsInstallment[]The latest installments, most recent first.
{ "object": "subscription", "id": "3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b", "planId": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "planName": "Mensualidad", "customer": { "name": "Ana Pérez", "email": "ana@example.com", "phone": "584121234567" }, "locale": "es", "status": "ACTIVE", "state": "CURRENT", "frequency": "MONTHLY", "amount": "30.00", "customAmount": false, "currency": "USD", "startDate": "2026-11-01", "nextDueDate": "2026-12-05", "nextInstallmentNumber": 2, "totalInstallments": null, "overdueCount": 0, "overdueAmount": "0.00", "autoChargeMethod": null, "reference": "SOCIO-118", "metadata": {}, "source": "api_v1", "pausedAt": null, "cancelledAt": null, "endedAt": null, "createdAt": "2026-10-26T15:20:44Z", "installments": [ { "id": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f", "number": 1, "dueDate": "2026-11-05", "amount": "30.00", "currency": "USD", "status": "PENDING", "overdue": false, "checkoutUrl": "https://pay.tucapi.com/m4q8z2kx", "orderId": null, "paidAt": null, "createdAt": "2026-11-02T13:00:04Z" } ]}List plans
/v1/subscription-plansYour business's active plans. They're created and edited in the dashboard, under Recurring billing. If your plan doesn't include recurring billing, it returns 403 feature_locked.
Scopeorders:read
Returns
Returns a paginated list of SubscriptionPlan objects.
Error responses
curl "https://api.business.tucapi.com/v1/subscription-plans" \ -H "Authorization: Bearer $TUCAPI_KEY"{ "object": "list", "data": [ { "id": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "name": "Mensualidad", "description": null, "amount": "30.00", "currency": "USD", "frequency": "MONTHLY", "billingDay": 5, "totalInstallments": null, "reminderDaysBefore": 3, "archived": false, "activeSubscribers": 42, "totalSubscribers": 47, "createdAt": "2026-10-20T14:02:11Z" } ]}Subscribe a customer
/v1/subscriptionsThe first installment is due on the first billing day from startDate and is generated reminderDaysBefore days earlier: that's when you get subscription.installment.created with its checkoutUrl and, if your customer has an email, they get the reminder.
Scopeorders:write
Headers
Idempotency-KeystringOptionalUp to 255 characters
Request body
planIdstring (uuid)RequiredA plan fromGET /subscription-plans.customerobjectRequiredYour customer.customer.namestringRequiredCustomer name.Up to 120 characterscustomer.emailstringOptionalWhere each installment reminder is sent.customer.phonestringOptionalWhatsApp number with country code. Only the digits are kept (8 to 15).localestringOptionalLanguage of the reminders:esoren.Default: esPossible values:esenamountstring | numberOptionalGreater than 0, up to 2 decimals, up to 1,000,000. As a string (recommended) or a number.startDatestringOptionalStart date,YYYY-MM-DD. From 31 days ago up to 2 years ahead. Defaults to today (New York time).referencestringOptionalYour order or invoice number. Unique per merchant: reusing it returns409 reference_exists.Up to 120 charactersmetadataobjectOptionalUp to 20 keys and 4 KB. Returned as is.
Returns
Returns a Subscription object.
Error responses
curl -X POST https://api.business.tucapi.com/v1/subscriptions \ -H "Authorization: Bearer $TUCAPI_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: SOCIO-118" \ -d '{ "planId": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "customer": { "name": "Ana Pérez", "email": "ana@example.com", "phone": "+58 412 123 4567" }, "locale": "es", "startDate": "2026-11-01", "reference": "SOCIO-118" }'{ "object": "subscription", "id": "3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b", "planId": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "planName": "Mensualidad", "customer": { "name": "Ana Pérez", "email": "ana@example.com", "phone": "584121234567" }, "locale": "es", "status": "ACTIVE", "state": "CURRENT", "frequency": "MONTHLY", "amount": "30.00", "customAmount": false, "currency": "USD", "startDate": "2026-11-01", "nextDueDate": "2026-11-05", "nextInstallmentNumber": 1, "totalInstallments": null, "overdueCount": 0, "overdueAmount": "0.00", "autoChargeMethod": null, "reference": "SOCIO-118", "metadata": {}, "source": "api_v1", "pausedAt": null, "cancelledAt": null, "endedAt": null, "createdAt": "2026-10-26T15:20:44Z", "installments": []}Retrieve a subscription
/v1/subscriptions/{id}Returns the subscription with its latest 24 installments, most recent first.
Scopeorders:read
Path parameters
idstring (uuid)RequiredResource id (UUID).
Returns
Returns a Subscription object.
Error responses
curl "https://api.business.tucapi.com/v1/subscriptions/3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b" \ -H "Authorization: Bearer $TUCAPI_KEY"{ "object": "subscription", "id": "3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b", "planId": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "planName": "Mensualidad", "customer": { "name": "Ana Pérez", "email": "ana@example.com", "phone": "584121234567" }, "locale": "es", "status": "ACTIVE", "state": "CURRENT", "frequency": "MONTHLY", "amount": "30.00", "customAmount": false, "currency": "USD", "startDate": "2026-11-01", "nextDueDate": "2026-12-05", "nextInstallmentNumber": 2, "totalInstallments": null, "overdueCount": 0, "overdueAmount": "0.00", "autoChargeMethod": null, "reference": "SOCIO-118", "metadata": {}, "source": "api_v1", "pausedAt": null, "cancelledAt": null, "endedAt": null, "createdAt": "2026-10-26T15:20:44Z", "installments": [ { "id": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f", "number": 1, "dueDate": "2026-11-05", "amount": "30.00", "currency": "USD", "status": "PENDING", "overdue": false, "checkoutUrl": "https://pay.tucapi.com/m4q8z2kx", "orderId": null, "paidAt": null, "createdAt": "2026-11-02T13:00:04Z" } ]}Cancel a subscription
/v1/subscriptions/{id}/cancelStops generating installments and voids the pending ones: their checkoutUrl stops accepting payments. What's already been paid isn't affected. If it was already cancelled or ended, it returns 409 subscription_not_cancellable.
Scopeorders:write
Path parameters
idstring (uuid)RequiredResource id (UUID).
Headers
Idempotency-KeystringOptionalUp to 255 characters
Returns
Returns a Subscription object.
Error responses
curl -X POST https://api.business.tucapi.com/v1/subscriptions/3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b/cancel \ -H "Authorization: Bearer $TUCAPI_KEY" \ -H "Idempotency-Key: cancel-3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b"{ "object": "subscription", "id": "3f7a1c9e-2b4d-4e6f-8a1b-5c7d9e0f1a2b", "planId": "0b8f6c2e-4f0a-4b8e-9a51-2a4c6f1d9e10", "planName": "Mensualidad", "customer": { "name": "Ana Pérez", "email": "ana@example.com", "phone": "584121234567" }, "locale": "es", "status": "CANCELLED", "state": "CANCELLED", "frequency": "MONTHLY", "amount": "30.00", "customAmount": false, "currency": "USD", "startDate": "2026-11-01", "nextDueDate": null, "nextInstallmentNumber": 2, "totalInstallments": null, "overdueCount": 0, "overdueAmount": "0.00", "autoChargeMethod": null, "reference": "SOCIO-118", "metadata": {}, "source": "api_v1", "pausedAt": null, "cancelledAt": "2026-11-03T10:15:00Z", "endedAt": null, "createdAt": "2026-10-26T15:20:44Z", "installments": [ { "id": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f", "number": 1, "dueDate": "2026-11-05", "amount": "30.00", "currency": "USD", "status": "CANCELLED", "overdue": false, "checkoutUrl": "https://pay.tucapi.com/m4q8z2kx", "orderId": null, "paidAt": null, "createdAt": "2026-11-02T13:00:04Z" } ]}