Intelligent search powered by OpenAI
Update a subscription
PUT
Products that use it:
Request's parameters
PATH
id
Unique subscription identifier you want to modify.string
REQUIRED
BODY
reason
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.string
external_reference
Reference to sync with your system. This is a free text field to help you with your integration to link the entities.string
back_url
Successful return URL. Use this setting to redirect your customers after our checkout to your site.string
auto_recurring
Configuration data for recurrence.object
Response parameters
id
Unique subscription identifier.string
version
Indicates how many times the subscription was modified.number
application_id
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.number
collector_id
Unique ID that identifies your user as a seller. This ID matches your User ID in our ecosystem.number
Errors
400Error
400
Bad-request
401Error
401
Unauthorized
500Error
500
Error
Request
curl -X PUT \
'https://api.mercadopago.com/preapproval/{id}'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TEST-7719*********832-03141*********ec9309854*********f1e54b5-1*********' \
-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": "visa",
"status": "pending"
}'
Sample answer
{
"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": 10,
"free_trial": {
"frequency": 1,
"frequency_type": "months"
}
},
"first_invoice_offset": 7,
"payer_id": 123123123,
"card_id": 123123123,
"payment_method_id": "account_money",
"card_id_secondary": 123123123,
"payment_method_id_secondary": "visa",
"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": 1000,
"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"
}