Recurring billing
DestructiveWhat it covers#
Four read-only tools over recurring billing plans and their subscribers, plus one sensitive tool that pauses, reactivates or deletes a subscriber. That last one affects future charges: ask for human confirmation before running it.
Tools#
List recurring plans
Read onlytilopay_recurring_list_plans
Lists the recurring billing plans configured in Tilopay.
API operation: POST /api/v1/getPlansRepeat
Parameters
No parameters.
Returns
{ result }
Raw Tilopay API response under the `result` key.
Recurring plan detail
Read onlytilopay_recurring_get_plan
Returns the detail of a recurring billing plan by its ID.
API operation: POST /api/v1/getPlanRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Plan ID |
Returns
{ result }
Raw Tilopay API response under the `result` key.
Subscriber detail
Read onlytilopay_recurring_get_subscriber
Returns the detail of a subscriber of a recurring plan by its ID.
API operation: POST /api/v1/getSuscriptorRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Subscriber ID |
Returns
{ result }
Raw Tilopay API response under the `result` key.
Subscriber payments
Read onlytilopay_recurring_subscriber_payments
Lists the payments made by a recurring subscriber.
API operation: POST /api/v1/getSuscriptorPayments
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Subscriber ID |
Returns
{ result }
Raw Tilopay API response under the `result` key.
Failed recurring charges
Read onlytilopay_recurring_failed_payments
Lists the latest recurring charges that failed (plan, subscriber, amount, date and reason). One call is enough.
API operation: POST /api/v1/getSuscriptorPayments
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | — | Maximum charges (10 by default) |
startDate | string | — | From, "YYYY-MM-DD HH:mm:ss" |
endDate | string | — | To, "YYYY-MM-DD HH:mm:ss" |
Returns
{ total, source, failures[] }
failures = declined recurring charges, with plan, subscriber, amount, currency and decline reason; total = how many were found; source = the API route they were obtained from. It combines the query of plans, subscribers and their payments.
Pause, reactivate or delete a subscriber
Sensitivetilopay_recurring_manage_subscriber
Pauses, reactivates or deletes a subscriber of a recurring plan in Tilopay. Sensitive operation: it affects future charges.
API operation: POST /api/v1/pauseSuscriptorRepeat, /reactiveSuscriptorRepeat o /deleteSuscriptorRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
idSubscriber | string | yes | Subscriber ID |
action | string (pause | reactivate | delete) | yes | Action to perform |
confirmation_code | string | — | 6-digit code received by email to authorize the operation |
Returns
{ result }
Raw response of the endpoint matching the action: pause, reactivate or delete.
Create subscription plan
Writetilopay_recurring_create_plan
Creates a recurring billing plan (subscription) in Tilopay with its title, currency, frequency and modalities (name and amount). Returns the ID of the created plan; then use tilopay_recurring_subscription_url to get the link customers use to subscribe.
API operation: POST /api/v1/createPlanRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | Plan title |
modality | array<object> | yes | Plan modalities (at least one): name and amount per cycle |
frequency | string (diario | semanal | mensual | anual | quincenal | bimestral | trimestral | cuatrimestral | semestral) | yes | Charge frequency |
description | string | — | Plan description |
currency | string | — | ISO 4217 currency, e.g. USD or CRC. If omitted, the merchant's country currency is used. |
first_amount | number | — | Amount of the initial payment (0 if there is none) |
trial_days | integer | — | Free trial days (0 if there is no trial) |
attempts | integer | — | Retries on a failed charge (1 by default) |
end_at | string | — | Plan end date in DD-MM-YYYY format (optional) |
thanks_url | string | — | Thank-you URL after subscribing (optional) |
webhook_subscribe | string | — | Webhook when a customer subscribes (optional) |
webhook_payment | string | — | Webhook when a payment is charged (optional) |
webhook_rejected | string | — | Webhook when a charge is declined (optional) |
webhook_unsubscribe | string | — | Webhook when a subscription is cancelled (optional) |
webhook_reactive | string | — | Webhook when a subscription is reactivated (optional) |
Returns
{ result, currency, frequency }
result = API response with the created plan; currency and frequency = the currency and frequency the plan ended up with.
Edit subscription plan
Writetilopay_recurring_edit_plan
Modifies an existing recurring billing plan: title, description, frequency, currency, amount per cycle (modality), initial payment, free trial, retries, status or end date. First check tilopay_recurring_get_plan to know the current values.
API operation: POST /api/v1/editPlanRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Plan ID |
title | string | yes | Plan title |
frequency | string (diario | semanal | mensual | anual | quincenal | bimestral | trimestral | cuatrimestral | semestral) | yes | Charge frequency |
modality | array<object> | — | Modalities with their amount per cycle; send them when the plan price changes |
currency | string | — | ISO 4217 currency |
description | string | — | Plan description |
first_amount | number | — | Amount of the initial payment |
trial_days | integer | — | Free trial days |
attempts | integer | — | Retries on a failed charge |
status | string (inactive | active | closed_to_new) | — | Status: inactive, active or closed_to_new (active with no new sign-ups) |
end_at | string | — | Plan end date in DD-MM-YYYY format (optional) |
thanks_url | string | — | Thank-you URL |
webhook_subscribe | string | — | Webhook on subscribe |
webhook_payment | string | — | Webhook when a payment is charged |
webhook_rejected | string | — | Webhook when a charge is declined |
webhook_unsubscribe | string | — | Webhook on cancellation |
webhook_reactive | string | — | Webhook on reactivation |
Returns
{ result }
result = API response editing the plan. Fields that are not sent are kept.
Delete subscription plan
Sensitivetilopay_recurring_delete_plan
Deletes a recurring billing plan in Tilopay. It affects the plan's future charges: confirm with the merchant before running it.
API operation: POST /api/v1/deletePlanRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Plan ID |
Returns
{ result }
result = API response deleting the plan. The plan's subscribers stop being charged.
Subscription link for a plan
Read onlytilopay_recurring_subscription_url
Returns the link a customer uses to sign up for a recurring plan (or renew it if the email is already subscribed). Deliver the full URL, without shortening it.
API operation: POST /api/v1/recurrentUrl
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Plan ID |
email | string | — | Customer email; if already subscribed it returns the renewal link |
Returns
{ url, result }
url = subscription link for the plan, to share with the customer; result = the raw API response.
Edit a plan's subscriber
Sensitivetilopay_recurring_edit_subscriber
Changes a subscriber's status (active, paused or deleted) and/or its expiration date. It affects future charges: confirm with the merchant before running it.
API operation: POST /api/v1/editSuscriptorRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Subscriber ID |
status | string (active | paused | deleted) | — | New subscriber status |
expire | string | — | Plan expiration date for that subscriber in YYYY-MM-DD format |
Returns
{ result }
result = API response editing the subscriber's data (email, phone, amount or expiration date, depending on the plan).
Create discount coupon
Writetilopay_recurring_create_coupon
Creates a discount coupon for a subscription plan: percentage or fixed amount, expiration date, allowed emails and usage limits.
API operation: POST /api/v1/createCoupon
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
planId | string | yes | Recurring plan ID |
discount_type | string (percentage | fixed) | yes | Discount type: percentage or fixed |
discount | number | yes | Discount value |
expire | string | yes | Coupon expiration date in YYYY-MM-DD format |
allow_existing_users | boolean | — | true if already registered customers can also use it (false = new customers only) |
emails | array<string> | — | Authorized emails; if omitted, any email can use it |
usage | integer | — | Total number of uses |
renews | integer | — | Renewals valid with the coupon |
renews_by_user | integer | — | Uses per single customer |
Returns
{ result }
result = API response with the discount coupon created for the plan.
A plan's coupons
Read onlytilopay_recurring_list_coupons
Lists the discount coupons associated with a subscription plan.
API operation: POST /api/v1/getRepeatCoupons
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
planId | string | yes | Recurring plan ID |
Returns
{ result }
result = the plan's coupons as returned by the API.
Coupon detail
Read onlytilopay_recurring_get_coupon
Returns the detail of a discount coupon by its ID.
API operation: POST /api/v1/getCoupon
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Coupon ID |
Returns
{ result }
result = coupon detail as returned by the API.
Delete a coupon
Sensitivetilopay_recurring_delete_coupon
Deletes a discount coupon of a subscription plan.
API operation: POST /api/v1/deleteCoupon
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Coupon ID |
Returns
{ result }
result = API response deleting the coupon.
Start step by step for a subscription plan
Writetilopay_recurring_plan_wizard_start
Starts the guided step-by-step to create (mode=create) or edit (mode=edit with plan_id) a subscription plan. Returns the first pending question: deliver it to the merchant as is and pass their answer to tilopay_recurring_plan_wizard_answer. Use it instead of tilopay_recurring_create_plan when some data is missing.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string (create | edit) | yes | create for a new plan, edit to modify an existing one |
plan_id | string | — | Plan ID (required in mode=edit) |
title | string | — | Title, if the merchant already gave it |
frequency | string (diario | semanal | quincenal | mensual | bimestral | trimestral | cuatrimestral | semestral | anual) | — | Frequency, if the merchant already gave it |
amount | number | — | Amount per cycle, if the merchant already gave it |
currency | string | — | ISO currency if the merchant indicated it with a symbol or name ($ or dollars = USD, ₡ or colones = CRC) |
description | string | — | Description, if already given |
Returns
{ draft }
draft = the plan draft in progress, with what has already been answered and the next pending step. It creates nothing in Tilopay until confirmed.
Answer a step of the subscription plan
Writetilopay_recurring_plan_wizard_answer
Saves the merchant's answer to the current step of the subscription plan and returns the next question or the summary to confirm. Deliver the returned text as is, without adding questions of your own.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
answer | string | yes | What the merchant answered, as is |
Returns
{ draft }
draft = the updated draft with the step's answer and the next pending step.
Confirm the subscription plan
Writetilopay_recurring_plan_wizard_confirm
Creates or edits the subscription plan with the step-by-step data, after the merchant said yes to the summary. When creating, it also returns the subscription link: deliver it in full, without shortening it.
API operation: POST /api/v1/createPlanRepeat
Parameters
No parameters.
Returns
{ plan_id, subscription_url }
Creates the plan with what was built step by step: plan_id = id of the created plan; subscription_url = subscription link to share.
Cancel the plan step by step
Writetilopay_recurring_plan_wizard_cancel
Discards the subscription plan that was in progress without creating or changing anything.
Parameters
No parameters.
Returns
Discards the plan draft in progress. It creates or changes nothing in Tilopay; it only returns the confirmation in text.
Payment link to settle a failed recurring charge
Writetilopay_recurring_settle_link
Creates a payment link for the amount of a recurring charge that failed and associates it with the plan's subscriber. When the customer pays that link, the subscription is settled automatically: the subscriber is reactivated and its expiration date moves to the next cycle. Use it when the merchant agrees to send the link to the customer of a failed charge (the data comes from tilopay_recurring_failed_payments). Returns the link URL and, if there is a phone number, a WhatsApp link ready to send to the customer.
API operation: POST /api/v1/createLinkPayment — see the operation page
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subscriber_id | string | yes | ID of the subscriber with the failed charge |
amount | number | yes | Outstanding amount of the failed charge |
currency | string | — | Currency of the charge. If omitted, the merchant's country currency is used. |
plan_id | string | — | Subscription plan ID |
plan_name | string | — | Plan name, for the charge's concept |
frequency | string (diario | semanal | quincenal | mensual | bimestral | trimestral | cuatrimestral | semestral | anual) | — | Plan frequency; if omitted it is queried from the plan or assumed monthly |
client_name | string | — | Customer name |
client_email | string | — | Customer email |
client_phone | string | — | Customer phone in international format, for the WhatsApp link |
message | string | — | Your own message for the customer; if omitted one is drafted |
Returns
{ url, linkId, whatsapp_url, currency, amount, subscriber_id, frequency }
Creates a one-time payment link for the subscriber to settle a failed recurring charge: url = payment link; whatsapp_url = WhatsApp link ready to send it; linkId = id of the created link.
Settle a subscriber
Writetilopay_recurring_mark_settled
Marks the subscriber as settled on their plan: leaves them active and moves their expiration date to the next cycle. Use it when the pending charge has already been paid through another channel. If the payment was made with the tilopay_recurring_settle_link link, this is not needed: it updates itself. Confirm with the merchant before running it.
API operation: POST /api/v1/editSuscriptorRepeat
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subscriber_id | string | yes | Subscriber ID |
plan_id | string | — | Subscription plan ID |
frequency | string (diario | semanal | quincenal | mensual | bimestral | trimestral | cuatrimestral | semestral | anual) | — | Plan frequency; if omitted it is queried from the plan or assumed monthly |
expire | string | — | New expiration date YYYY-MM-DD; if omitted the next cycle is calculated |
Returns
{ ok, expire, frequency }
Moves the subscriber's due date forward according to the plan's frequency, to settle them after recovering a failed charge. expire = the new expiration date.
Last verified: 2026-09-02 · Owner: equipo-integraciones