Recurring billing

Destructive

What 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 only

tilopay_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 only

tilopay_recurring_get_plan

Returns the detail of a recurring billing plan by its ID.

API operation: POST /api/v1/getPlanRepeat

Parameters

ParameterTypeRequiredDescription
idstringyesPlan ID

Returns

{ result }

Raw Tilopay API response under the `result` key.

Subscriber detail

Read only

tilopay_recurring_get_subscriber

Returns the detail of a subscriber of a recurring plan by its ID.

API operation: POST /api/v1/getSuscriptorRepeat

Parameters

ParameterTypeRequiredDescription
idstringyesSubscriber ID

Returns

{ result }

Raw Tilopay API response under the `result` key.

Subscriber payments

Read only

tilopay_recurring_subscriber_payments

Lists the payments made by a recurring subscriber.

API operation: POST /api/v1/getSuscriptorPayments

Parameters

ParameterTypeRequiredDescription
idstringyesSubscriber ID

Returns

{ result }

Raw Tilopay API response under the `result` key.

Failed recurring charges

Read only

tilopay_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

ParameterTypeRequiredDescription
limitintegerMaximum charges (10 by default)
startDatestringFrom, "YYYY-MM-DD HH:mm:ss"
endDatestringTo, "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

Sensitive

tilopay_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

ParameterTypeRequiredDescription
idSubscriberstringyesSubscriber ID
actionstring (pause | reactivate | delete)yesAction to perform
confirmation_codestring6-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

Write

tilopay_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

ParameterTypeRequiredDescription
titlestringyesPlan title
modalityarray<object>yesPlan modalities (at least one): name and amount per cycle
frequencystring (diario | semanal | mensual | anual | quincenal | bimestral | trimestral | cuatrimestral | semestral)yesCharge frequency
descriptionstringPlan description
currencystringISO 4217 currency, e.g. USD or CRC. If omitted, the merchant's country currency is used.
first_amountnumberAmount of the initial payment (0 if there is none)
trial_daysintegerFree trial days (0 if there is no trial)
attemptsintegerRetries on a failed charge (1 by default)
end_atstringPlan end date in DD-MM-YYYY format (optional)
thanks_urlstringThank-you URL after subscribing (optional)
webhook_subscribestringWebhook when a customer subscribes (optional)
webhook_paymentstringWebhook when a payment is charged (optional)
webhook_rejectedstringWebhook when a charge is declined (optional)
webhook_unsubscribestringWebhook when a subscription is cancelled (optional)
webhook_reactivestringWebhook 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

Write

tilopay_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

ParameterTypeRequiredDescription
idstringyesPlan ID
titlestringyesPlan title
frequencystring (diario | semanal | mensual | anual | quincenal | bimestral | trimestral | cuatrimestral | semestral)yesCharge frequency
modalityarray<object>Modalities with their amount per cycle; send them when the plan price changes
currencystringISO 4217 currency
descriptionstringPlan description
first_amountnumberAmount of the initial payment
trial_daysintegerFree trial days
attemptsintegerRetries on a failed charge
statusstring (inactive | active | closed_to_new)Status: inactive, active or closed_to_new (active with no new sign-ups)
end_atstringPlan end date in DD-MM-YYYY format (optional)
thanks_urlstringThank-you URL
webhook_subscribestringWebhook on subscribe
webhook_paymentstringWebhook when a payment is charged
webhook_rejectedstringWebhook when a charge is declined
webhook_unsubscribestringWebhook on cancellation
webhook_reactivestringWebhook on reactivation

Returns

{ result }

result = API response editing the plan. Fields that are not sent are kept.

Delete subscription plan

Sensitive

tilopay_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

ParameterTypeRequiredDescription
idstringyesPlan ID

Returns

{ result }

result = API response deleting the plan. The plan's subscribers stop being charged.

Subscription link for a plan

Read only

tilopay_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

ParameterTypeRequiredDescription
idstringyesPlan ID
emailstringCustomer 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

Sensitive

tilopay_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

ParameterTypeRequiredDescription
idstringyesSubscriber ID
statusstring (active | paused | deleted)New subscriber status
expirestringPlan 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

Write

tilopay_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

ParameterTypeRequiredDescription
planIdstringyesRecurring plan ID
discount_typestring (percentage | fixed)yesDiscount type: percentage or fixed
discountnumberyesDiscount value
expirestringyesCoupon expiration date in YYYY-MM-DD format
allow_existing_usersbooleantrue if already registered customers can also use it (false = new customers only)
emailsarray<string>Authorized emails; if omitted, any email can use it
usageintegerTotal number of uses
renewsintegerRenewals valid with the coupon
renews_by_userintegerUses per single customer

Returns

{ result }

result = API response with the discount coupon created for the plan.

A plan's coupons

Read only

tilopay_recurring_list_coupons

Lists the discount coupons associated with a subscription plan.

API operation: POST /api/v1/getRepeatCoupons

Parameters

ParameterTypeRequiredDescription
planIdstringyesRecurring plan ID

Returns

{ result }

result = the plan's coupons as returned by the API.

Coupon detail

Read only

tilopay_recurring_get_coupon

Returns the detail of a discount coupon by its ID.

API operation: POST /api/v1/getCoupon

Parameters

ParameterTypeRequiredDescription
idstringyesCoupon ID

Returns

{ result }

result = coupon detail as returned by the API.

Delete a coupon

Sensitive

tilopay_recurring_delete_coupon

Deletes a discount coupon of a subscription plan.

API operation: POST /api/v1/deleteCoupon

Parameters

ParameterTypeRequiredDescription
idstringyesCoupon ID

Returns

{ result }

result = API response deleting the coupon.

Start step by step for a subscription plan

Write

tilopay_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

ParameterTypeRequiredDescription
modestring (create | edit)yescreate for a new plan, edit to modify an existing one
plan_idstringPlan ID (required in mode=edit)
titlestringTitle, if the merchant already gave it
frequencystring (diario | semanal | quincenal | mensual | bimestral | trimestral | cuatrimestral | semestral | anual)Frequency, if the merchant already gave it
amountnumberAmount per cycle, if the merchant already gave it
currencystringISO currency if the merchant indicated it with a symbol or name ($ or dollars = USD, ₡ or colones = CRC)
descriptionstringDescription, 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

Write

tilopay_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

ParameterTypeRequiredDescription
answerstringyesWhat 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

Write

tilopay_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

Write

tilopay_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.

Settle a subscriber

Write

tilopay_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

ParameterTypeRequiredDescription
subscriber_idstringyesSubscriber ID
plan_idstringSubscription plan ID
frequencystring (diario | semanal | quincenal | mensual | bimestral | trimestral | cuatrimestral | semestral | anual)Plan frequency; if omitted it is queried from the plan or assumed monthly
expirestringNew 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

View as raw Markdown