# Search in invoices Search the invoices of a subscriptions by different parameters. You can search by subscription, payment or customer ID. **GET** `/authorized_payments/search` ## Request parameters ### Path - `id` (number, required) Unique ID that identifies a invoice. - `preapproval_id` (string, required) Unique subscription ID to find related invoices. - `payment_id` (number, required) Unique payment ID to find related invoice. - `payer_id` (number, required) Unique payer ID to find your related invoices. - `offset` (number, optional) Specifies the offset of the first item in the collection to return. - `limit` (number, optional) Specifies the maximum number of items to return. ## Response parameters - `paging` (object, optional) Information for pagination of search results. - `paging.offset` (number, optional) The offset of the first item in the collection to return. - `paging.limit` (number, optional) The maximum number of entries to return. - `paging.total` (number, optional) The total number of items in the collection. - `results` (array, optional) - `results[].id` (number, optional) Unique invoice identifier. - `results[].type` (string, optional) Type of invoice generated based on recurrence. Possible enum values: - `scheduled` Payment automatically generated and scheduled by the recurrence engine. - `results[].date_created` (string, optional) Invoice creation date. - `results[].last_modified` (string, optional) Invoice last modified date. An invoice is modified when an update occurs in collection attempts or payment. - `results[].preapproval_id` (string, optional) Subscription ID for which the invoice was created. - `results[].reason` (string, optional) It is a short description that the subscriber will see during the checkout process and in the notifications. - `results[].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. - `results[].currency_id` (string, optional) ID of the currency used in the payment. - `results[].transaction_amount` (number, optional) Amount we will charge on each invoice. - `results[].debit_date` (date, optional) Date on which we will try to make the payment. - `results[].retry_attempt` (number, optional) How many times we try to collect the authorized payment. - `results[].status` (string, optional) Status of the invoice. Possible enum values: - `scheduled` Authorized payment scheduled to collect. - `processed` Authorized payment collected or exceeded retries. - `recycling` Authorized payment in attempt to collect. - `canceled` Authorized payment canceled. - `results[].summarized` (string, optional) Summarization status of the invoice result in the subscription. Possible enum values: - `pending` Pending summary in the subscription. - `done` Summarized result in the subscription. - `results[].payment` (object, optional) Payment status related to the authorized payment. - `results[].payment.id` (number, optional) Unique payment identifier. - `results[].payment.status` (string, optional) Payment status. Possible enum values: - `pending` The user has not yet completed the payment process. - `approved` The payment has been approved and accredited. - `authorized` The payment has been authorized but not captured yet. - `in_process` Payment is being reviewed. - `in_mediation` Users have initiated a dispute. - `rejected` Payment was rejected. The user may retry payment. - `canceled` Payment was canceled by one of the parties or because time for payment has expired. - `refunded` Payment was refunded to the user. - `charged_back` Was made a chargeback in the buyer’s credit card. - `results[].payment.status_detail` (string, optional) Payment status detail. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad-request | | 401 | 401 | Unauthorized | | 500 | 500 | Error | ## Request example ### cURL ```bash curl -X GET \ 'https://api.mercadopago.com/authorized_payments/search' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` ## Response example ```json { "paging": { "offset": 0, "limit": 20, "total": 100 }, "results": [ { "id": 6114264375, "type": "scheduled", "date_created": "2022-01-01T11:12:25.892-04:00", "last_modified": "2022-01-01T11:12:25.892-04:00", "preapproval_id": "2c938084726fca480172750000000000", "reason": "Yoga classes", "external_reference": 23546246234, "currency_id": "COP", "transaction_amount": "24.50", "debit_date": "2022-01-01T11:12:25.892-04:00", "retry_attempt": 4, "status": "scheduled", "summarized": "pending", "payment": { "id": 19951521071, "status": "approved", "status_detail": "accredited" } } ] } ```