AI resources
Search in subscriptionshttps://api.mercadopago.com/preapproval/search
Search for subscriptions by using different parameters.
GET
Request parameters
Header
Authorization
string
REQUIRED
Access Token obtained through the developer panel. Must be sent in all requests.
Path
q
string
Free search field.
payer_id
number
Unique customer ID to find related subscriptions.
payer_email
string
Allows you to search for subscriptions registered with this email.
preapproval_plan_id
string
Specifies a plan ID for filtering results from the search.
Response parameters
paging
object
Information for pagination of search results.
results
array
The page of items. This will be an empty array if there are no results.
Errors
400Error
400
Bad request
401Error
401
Unauthorized
500Error
500
Error
Request
curl -X GET \
'https://api.mercadopago.com/preapproval/search'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
Response
{
"paging": {
"offset": 0,
"limit": 20,
"total": 100
},
"results": [
{
"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,
"payer_first_name": "María",
"payer_last_name": "González",
"card_id": 123123123,
"payment_method_id": "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": "24.50",
"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"
}
]
}