# Update subscription Renew the data of a subscription. Indicate the preapproval ID and send the body with the information you want to update. You can update reason, amount, payment method, status and other information that compose the subscription. **PUT** `/preapproval/{id}` ## Request parameters ### Path - `id` (string, required) Unique subscription identifier you want to modify. - `reason` (string, optional) It is a short description that the subscriber will see during the checkout process and in the notifications. It is only required for subscriptions without a plan. - `external_reference` (string, optional) Reference to sync with your system. This is a free text field to help you with your integration to link the entities. - `back_url` (string, optional) Successful return URL. Use this setting to redirect your customers after our checkout to your site. - `auto_recurring` (object, optional) Configuration data for recurrence. - `auto_recurring.transaction_amount` (number, optional) Amount we will charge on each invoice. - `auto_recurring.currency_id` (string, optional) ID of the currency used in the payment. - `card_token_id` (number, optional) Unique identifier to retrieve data from the card used as a payment method. - `card_token_id_secondary` (number, optional) Unique identifier to recover details of the card used as secondary payment method. This parameter must be used with payment_method_id_secondary and is mandatory for card payment method. - `payment_method_id_secondary` (string, optional) Identifier of the secondary payment method. - `status` (string, optional) Status Possible enum values: - `pending` Preapproval without a payment method - `authorized` Preapproval with a valid payment method. - `paused` Preapproval with temporally discontinued collection of payments. - `canceled` Preapproval terminated. This is an irreversible state. ## Response parameters - `id` (string, optional) Unique subscription identifier. - `version` (number, optional) Indicates how many times the subscription was modified. - `application_id` (number, optional) Unique ID that identifies your application/integration. One of the keys in the pair that make up the credentials that identify an application/integration in your account. - `collector_id` (number, optional) Unique ID that identifies your user as a seller. This ID matches your User ID in our ecosystem. - `preapproval_plan_id` (string, optional) Unique subscription plan identifier. This parameter is only available when it is a subscription with a plan and indicates from which plan the subscription was created. - `reason` (string, optional) It is a short description that the subscriber will see during the checkout process and in the notifications. It is only required for subscriptions without a plan. - `external_reference` (string, optional) Reference to sync with your system. This is a free text field to help you with your integration to link the entities. - `back_url` (string, optional) Successful return URL. Use this setting to redirect your customers to your site after our checkout. - `init_point` (string, optional) URL to checkout to add or modify payment method. - `auto_recurring` (object, optional) Configuration data for recurrence. - `auto_recurring.frequency` (number, optional) Indicates the frequency value. Together with frequency_type they define the invoice cycle that a subscription will have. - `auto_recurring.frequency_type` (string, optional) Indicates the type of frequency. Together with frequency they define the invoice cycle that a subscription will have. Possible enum values: - `days` Indicate a frequency in units of days. - `months` Indicate a frequency in units of months. - `auto_recurring.start_date` (string, optional) Date from which the subscription will be active and we start collecting invoices. - `auto_recurring.end_date` (string, optional) Date until which the subscription will be active and we will stop charging invoices. - `auto_recurring.currency_id` (string, optional) ID of the currency used in the payment. - `auto_recurring.transaction_amount` (number, optional) Amount that will be charged on each invoice. - `auto_recurring.free_trial` (object, optional) Free trial data. - `auto_recurring.free_trial.frequency` (number, optional) Indicates the frequency value. Along with frequency_type they define the invoice cycle that a subscription will have. - `auto_recurring.free_trial.frequency_type` (string, optional) Indicates the type of frequency. Along with frequency they define the invoice cycle that a subscription will have. Possible enum values: - `days` Indicate a frequency in units of days. - `months` Indicate a frequency in units of months. - `first_invoice_offset` (number, optional) Number of days to collect the first invoice. - `payer_id` (number, optional) Unique customer identifier. This is created from the email you used to create the subscription. - `card_id` (number, optional) Unique identifier to retrieve data from the card used as a payment method. - `payment_method_id` (string, optional) Payment method configured. - `card_id_secondary` (number, optional) Unique identifier to retrieve data from the card used as secondary payment method. - `payment_method_id_secondary` (string, optional) Secondary payment method configured. - `next_payment_date` (string, optional) Date of the next payment debit. - `date_created` (string, optional) Creation date. - `last_modified` (string, optional) Date of last modification. - `summarized` (object, optional) Summary information on subscription invoices and charges. - `summarized.quotas` (number, optional) How many payments are going to be made. - `summarized.charged_quantity` (number, optional) Total charged of charged quotas. - `summarized.charged_amount` (number, optional) Total amount collected to date. - `summarized.pending_charge_quantity` (number, optional) Pending quotas to charge. - `summarized.pending_charge_amount` (number, optional) Amount pending collection. - `summarized.last_charged_date` (number, optional) Date of last charge. - `summarized.last_charged_amount` (number, optional) Date of last charged amount. - `summarized.semaphore` (number, optional) Subscription collection status summary. Possible enum values: - `green` All collections made. - `yellow` With collection problems. We are trying to collect an invoice. - `red` With pending collections. An invoice could not be collected. - `blank` Discounted collection. - `status` (string, optional) Status Possible enum values: - `pending` Preapproval without a payment method. - `authorized` Preapproval with a valid payment method. - `paused` Preapproval with temporally discontinued collection of payments. - `canceled` Preapproval terminated. This is an irreversible state. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad-request | | 401 | 401 | Unauthorized | | 500 | 500 | Error | ## Request example ### cURL ```bash curl -X PUT \ 'https://api.mercadopago.com/preapproval/{id}' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "reason": "Yoga classes.", "external_reference": 23546246234, "back_url": "https://www.mercadopago.com.ar", "auto_recurring": { "transaction_amount": 10, "currency_id": "ARS" }, "card_token_id": 123123123, "card_token_id_secondary": 123123123, "payment_method_id_secondary": "master", "status": "pending" }' ``` ## Response example ```json { "id": "2c938084726fca480172750000000000", "version": 0, "application_id": 1234567812345678, "collector_id": 100200300, "preapproval_plan_id": "2c938084726fca480172750000000000", "reason": "Yoga classes.", "external_reference": 23546246234, "back_url": "https://www.mercadopago.com.ar", "init_point": "https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_id=2c938084726fca480172750000000000", "auto_recurring": { "frequency": 1, "frequency_type": "months", "start_date": "2020-06-02T13:07:14.260Z", "end_date": "2022-07-20T15:59:52.581Z", "currency_id": "ARS", "transaction_amount": "24.50", "free_trial": { "frequency": 1, "frequency_type": "months" } }, "first_invoice_offset": 7, "payer_id": 123123123, "card_id": 123123123, "payment_method_id": "master", "card_id_secondary": 123123123, "payment_method_id_secondary": "master", "next_payment_date": "2022-01-01T11:12:25.892-04:00", "date_created": "2022-01-01T11:12:25.892-04:00", "last_modified": "2022-01-01T11:12:25.892-04:00", "summarized": { "quotas": 6, "charged_quantity": 3, "charged_amount": "50.00", "pending_charge_quantity": 1, "pending_charge_amount": 200, "last_charged_date": "2022-01-01T11:12:25.892-04:00", "last_charged_amount": 100, "semaphore": "green" }, "status": "pending" } ```