API · Edit recurring plan
API v1POST /api/v1/editPlanRepeatWhat it does#
Edits an existing plan, including its status.
Authentication#
Requires the API bearer token in the Authorization header — see authentication.
Parameters#
Tilopay integration key.
Recurring plan id.
Recurring plan title.
Plan description.
Charge frequency.
| Code | Value |
|---|---|
| 1 | Daily |
| 2 | Weekly |
| 3 | Monthly |
| 4 | Yearly |
| 5 | Fortnightly |
| 6 | Every two months |
| 7 | Quarterly |
| 8 | Every four months |
| 9 | Every six months |
Currency code in ISO 4217 format.
Initial payment amount.
Enables the free trial period: 0 no, 1 yes.
Days of the free trial period.
Number of retries for failed charges.
Status of the recurring plan.
| Code | Value |
|---|---|
| 0 | Inactive |
| 1 | Active |
| 2 | Active but with no new sign-ups |
Optional field. The merchant's own thank-you URL; it must support the GET method.
Optional field. Webhook URL, over POST, that receives the callback in the request body when a customer successfully takes out a subscription. Example of the data sent: {'id_plan' : 1, 'email' : 'email@email.com', 'modality' : 'ModalityName', 'amount' : 25, 'frequency' : '', 'coupon' : '5HT5W8YT', 'free_trial' : 1, 'next_payment_date' : '2023-02-25'}
Optional field. Webhook URL, over POST, that receives the callback in the request body when the customer is charged successfully. Example of the data sent: {'id_plan' : 1, 'email' : 'email@email.com', 'amount' : 25, 'auth' : '123456', 'orderNumber' : 'PRE123456'}
Optional field. Webhook URL, over POST, that receives the callback in the request body when a payment fails. Example of the data sent: {'id_plan' : 1, 'email' : 'email@email.com', 'amount' : 25}
Optional field. Webhook URL, over POST, that receives the callback in the request body when a customer cancels the subscription to one of their plans. Example of the data sent: {'id_plan' : 1, 'email' : 'email@email.com', 'expire' : '2023-02-25'}
Optional field. Webhook URL, over POST, that receives the callback in the request body when a customer reactivates the subscription to one of their plans. Example of the data sent: {'id_plan' : 1, 'email' : 'email@email.com', 'next_payment_date' : '2023-02-25'}
End date of the recurring plan, d-m-Y format (for example 25-09-2022). When the plan has no end date, send it empty.
Request example#
The <...> values are placeholders: replace them with your own credentials and data.
{
"key": "<api_key>",
"id": 3,
"title": "Plan title",
"description": "Plan description",
"frecuency": 2,
"currency": "USD",
"first_amount": 0,
"trial": 0,
"trial_days": 0,
"attempts": 5,
"status": 1,
"thanks_url": "",
"webhook_subscribe": "",
"webhook_payment": "",
"webhook_rejected": "",
"webhook_unsubscribe": "",
"webhook_reactive": "",
"end_at": "25-10-2023"
}To interpret a response that is not a success, see how to read an error response.
Last verified: 2026-08-29 · Owner: equipo-integraciones