tempest_fastapi_sdk.integrations.payment.mercado_pago¶
A superfície do Mercado Pago: cliente, schemas e webhook.
MercadoPagoClient
¶
MercadoPagoClient(client: HTTPClient)
Client for MercadoPago API (version 1.0.0).
Initialize the client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
HTTPClient
|
The transport to issue requests
through. Build it with
|
required |
search_authorized_payments
async
¶
search_authorized_payments(
*,
preapproval_id: str | None = None,
payment_id: int | None = None,
payer_id: int | None = None,
status: AuthorizedPaymentStatus | None = None,
limit: int | None = None,
offset: int | None = None,
) -> AuthorizedPaymentSearchResult
Search subscription invoices.
Search billing invoices generated by subscriptions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preapproval_id
|
str | None
|
The preapproval_id value. Omitted from the query when None. |
None
|
payment_id
|
int | None
|
The payment_id value. Omitted from the query when None. |
None
|
payer_id
|
int | None
|
The payer_id value. Omitted from the query when None. |
None
|
status
|
AuthorizedPaymentStatus | None
|
The status value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
AuthorizedPaymentSearchResult |
AuthorizedPaymentSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
get_authorized_payment
async
¶
Get subscription invoice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AuthorizedPayment |
AuthorizedPayment
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
create_preference
async
¶
Create a preference.
Creates a Checkout Pro preference. The response contains init_point
(production) and Webhook events triggered: payment, merchant_order
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PreferenceRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Preference |
Preference
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
search_preferences
async
¶
search_preferences(
*,
external_reference: str | None = None,
marketplace: str | None = None,
site_id: str | None = None,
sponsor_id: int | None = None,
limit: int | None = None,
offset: int | None = None,
) -> SearchPreferencesResponse
Search preferences.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
external_reference
|
str | None
|
The external_reference value. Omitted from the query when None. |
None
|
marketplace
|
str | None
|
The marketplace value. Omitted from the query when None. |
None
|
site_id
|
str | None
|
The site_id value. Omitted from the query when None. |
None
|
sponsor_id
|
int | None
|
The sponsor_id value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SearchPreferencesResponse |
SearchPreferencesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_preference
async
¶
Get preference by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Preference |
Preference
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404. |
update_preference
async
¶
Update a preference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
PreferenceRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Preference |
Preference
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
put_checkout_preferences_by_id_expire
async
¶
Expires a Preference.
Expires a payment preference. Enter the preference ID and it will be expired.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
Preference ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Preference |
Preference
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 500. |
create_qr_integrator_config
async
¶
Create or update QR integrator configuration.
Configures the integrator settings for QR in-store payments.
Not routed. Probed against the sandbox and answered the way a path the API does not route answers — measured 2026-10-09, PATCH, POST and PUT on /instore/integrator all answer the edge's 404 'resource not found' with and without the sandbox token. The GET on the same path was removed on 2026-08-28.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateQrIntegratorConfigBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
confirm_cashout_qr
async
¶
Confirm QR cashout status.
Confirms the cashout status for a QR-based cash withdrawal order. Available in: Argentina, Brazil (MLA, MLB)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
merchant_order_id
|
str
|
The merchant_order_id value. |
required |
body
|
ConfirmCashoutQrBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
create_merchant_order
async
¶
Create a merchant order.
Webhook events triggered: merchant_order
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateMerchantOrderBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateMerchantOrderResponse |
CreateMerchantOrderResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
search_merchant_orders
async
¶
search_merchant_orders(
*,
status: MerchantOrderStatus | None = None,
preference_id: str | None = None,
application_id: str | None = None,
payer_id: int | None = None,
sponsor_id: int | None = None,
external_reference: str | None = None,
site_id: CreateMerchantOrderBodySiteId | None = None,
marketplace: str | None = None,
date_created_from: datetime | None = None,
date_created_to: datetime | None = None,
last_updated_from: datetime | None = None,
last_updated_to: datetime | None = None,
limit: int | None = None,
offset: int | None = None,
) -> SearchMerchantOrdersResponse
Search merchant orders.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
MerchantOrderStatus | None
|
The status value. Omitted from the query when None. |
None
|
preference_id
|
str | None
|
The preference_id value. Omitted from the query when None. |
None
|
application_id
|
str | None
|
The application_id value. Omitted from the query when None. |
None
|
payer_id
|
int | None
|
The payer_id value. Omitted from the query when None. |
None
|
sponsor_id
|
int | None
|
The sponsor_id value. Omitted from the query when None. |
None
|
external_reference
|
str | None
|
The external_reference value. Omitted from the query when None. |
None
|
site_id
|
CreateMerchantOrderBodySiteId | None
|
The site_id value. Omitted from the query when None. |
None
|
marketplace
|
str | None
|
The marketplace value. Omitted from the query when None. |
None
|
date_created_from
|
datetime | None
|
The date_created_from value. Omitted from the query when None. |
None
|
date_created_to
|
datetime | None
|
The date_created_to value. Omitted from the query when None. |
None
|
last_updated_from
|
datetime | None
|
The last_updated_from value. Omitted from the query when None. |
None
|
last_updated_to
|
datetime | None
|
The last_updated_to value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SearchMerchantOrdersResponse |
SearchMerchantOrdersResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_merchant_order
async
¶
Get merchant order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetMerchantOrderResponse |
GetMerchantOrderResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
update_merchant_order
async
¶
Update merchant order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The id value. |
required |
body
|
UpdateMerchantOrderBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
create_o_auth_token
async
¶
Create OAuth token.
Exchanges authorization codes for access tokens, refreshes expired tokens, or
requests client credentials tokens for machine-to-machine flows. Security
notes: - The state parameter is mandatory for authorization_code flows to
prevent CSRF. - Store refresh tokens in server-side encrypted storage — never in
localStorage. - Rotate client_secret regularly and store in a secrets manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateOAuthTokenBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateOAuthTokenResponse |
CreateOAuthTokenResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
list_point_devices
async
¶
List Point devices.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Returns:
| Name | Type | Description |
|---|---|---|
ListPointDevicesResponse |
ListPointDevicesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_point_payment_intent
async
¶
create_point_payment_intent(
deviceid: str, *, body: CreatePointPaymentIntentBody
) -> CreatePointPaymentIntentResponse
Create a payment intent on a Point device.
Creates a payment intent that is sent to a Point POS device for the customer to
tap/insert their card. The device handles card capture. Available in:
Argentina, Brazil, Mexico (MLA, MLB, MLM) Idempotent: Supports
X-Idempotency-Key header to safely retry without duplicate charges. Webhook
events triggered: point_integration_wh
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deviceid
|
str
|
The deviceid value. |
required |
body
|
CreatePointPaymentIntentBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreatePointPaymentIntentResponse |
CreatePointPaymentIntentResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
cancel_point_payment_intent
async
¶
Cancel a payment intent.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deviceid
|
str
|
The deviceid value. |
required |
paymentintentid
|
str
|
The paymentintentid value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_point_refund_intent
async
¶
create_point_refund_intent(
deviceid: str, *, body: CreatePointRefundIntentBody
) -> CreatePointRefundIntentResponse
Create a refund intent on a terminal.
Initiates a refund intent on a Point terminal device.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deviceid
|
str
|
Terminal device identifier |
required |
body
|
CreatePointRefundIntentBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreatePointRefundIntentResponse |
CreatePointRefundIntentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
cancel_point_refund_intent
async
¶
Cancel a refund intent on a terminal.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deviceid
|
str
|
The deviceid value. |
required |
refundintentid
|
str
|
The refundintentid value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
get_point_payment_intent
async
¶
Get payment intent details.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paymentintentid
|
str
|
The paymentintentid value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_point_refund_intent
async
¶
Get a refund intent status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refundintentid
|
str
|
Refund intent identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetPointRefundIntentResponse |
GetPointRefundIntentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
search_pos
async
¶
search_pos(
*,
external_id: str | None = None,
external_store_id: str | None = None,
store_id: str | None = None,
category: int | None = None,
) -> SearchPosResponse
Search points of sale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
external_id
|
str | None
|
The external_id value. Omitted from the query when None. |
None
|
external_store_id
|
str | None
|
The external_store_id value. Omitted from the query when None. |
None
|
store_id
|
str | None
|
The store_id value. Omitted from the query when None. |
None
|
category
|
int | None
|
The category value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SearchPosResponse |
SearchPosResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_pos
async
¶
Create a point of sale.
Creates a point of sale in a store to receive payments for products or services. Each POS will have a unique QR code linked to it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PosRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Pos |
Pos
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_pos
async
¶
Get a point of sale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
POS identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Pos |
Pos
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
update_pos
async
¶
Update a point of sale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
PosRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Pos |
Pos
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
delete_pos
async
¶
Delete a point of sale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
POS identifier to delete |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
search_claims
async
¶
search_claims(
*,
id: int | None = None,
type: ClaimType | None = None,
stage: ClaimStage | None = None,
status: ClaimStatus | None = None,
limit: int | None = None,
offset: int | None = None,
) -> ClaimSearchResult
Search claims.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int | None
|
The id value. Omitted from the query when None. |
None
|
type
|
ClaimType | None
|
The type value. Omitted from the query when None. |
None
|
stage
|
ClaimStage | None
|
The stage value. Omitted from the query when None. |
None
|
status
|
ClaimStatus | None
|
The status value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ClaimSearchResult |
ClaimSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401. |
get_claim
async
¶
Get claim details.
Returns full details of a post-sale claim including status, stage, and players.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Claim |
Claim
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404. |
upload_shipping_evidence
async
¶
Upload shipping evidence.
Uploads shipping evidence (tracking code, proof of delivery) to support the seller's case in a claim. Accepted as part of the claims resolution process.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
body
|
UploadShippingEvidenceBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 201 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
request_claim_mediation
async
¶
Request claim mediation.
Escalates a claim to mediation, requesting MP to intervene in the dispute.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
send_claim_message
async
¶
send_claim_message(
claim_id: int, *, body: SendMessageRequest, application_id: str | None = None
) -> None
Send a message in a claim.
Sends a text message (with optional attachments) in the claim thread.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
body
|
SendMessageRequest
|
The request body. |
required |
application_id
|
str | None
|
The application_id value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 201 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
attach_claim_file
async
¶
Attach a file to a claim message.
Uploads and attaches a file (image, PDF) to a claim. Supported formats: JPEG, PNG, PDF. Max size: 10 MB.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
file
|
bytes
|
File to attach (JPEG, PNG, or PDF, max 10 MB) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AttachClaimFileResponse |
AttachClaimFileResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_claim_file
async
¶
Get attached file metadata.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
file_name
|
str
|
The fileName value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetClaimFileResponse |
GetClaimFileResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
download_claim_file
async
¶
Download an attached file.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
file_name
|
str
|
The fileName value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers application/octet-stream, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
get_claim_evidence
async
¶
Get claim evidence.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[ClaimEvidence]
|
list[ClaimEvidence]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_claim_mediation_resolutions
async
¶
Get expected mediation resolutions.
Returns the possible resolution options for a claim at the mediation stage.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[MediationResolution]
|
list[MediationResolution]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_claim_messages
async
¶
Get claim messages.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[ClaimMessage]
|
list[ClaimMessage]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_claim_history
async
¶
Get claim status history.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claim_id
|
int
|
The claim_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[ClaimHistoryEntry]
|
list[ClaimHistoryEntry]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_subscription
async
¶
Create a subscription.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SubscriptionRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Subscription |
Subscription
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 500. |
export_subscriptions
async
¶
export_subscriptions(
*,
collector_id: int,
preapproval_plan_id: str | None = None,
status: SubscriptionRequestStatus | None = None,
sort: ExportSubscriptionsSort | None = None,
) -> bytes
Export subscriptions.
Exports a list of subscriptions for a collector as a downloadable file. Filter by plan ID, status, and sort order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collector_id
|
int
|
Collector (seller) user ID |
required |
preapproval_plan_id
|
str | None
|
Filter by plan ID. Omitted from the query when None. |
None
|
status
|
SubscriptionRequestStatus | None
|
The status value. Omitted from the query when None. |
None
|
sort
|
ExportSubscriptionsSort | None
|
The sort value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers text/csv, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
search_subscriptions
async
¶
search_subscriptions(
*,
q: str | None = None,
payer_id: int | None = None,
payer_email: EmailStr | None = None,
preapproval_plan_id: str | None = None,
transaction_amount: float | None = None,
semaphore: str | None = None,
status: SubscriptionRequestStatus | None = None,
sort: str | None = None,
limit: int | None = None,
offset: int | None = None,
) -> SubscriptionSearchResult
Search subscriptions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
str | None
|
The q value. Omitted from the query when None. |
None
|
payer_id
|
int | None
|
The payer_id value. Omitted from the query when None. |
None
|
payer_email
|
EmailStr | None
|
The payer_email value. Omitted from the query when None. |
None
|
preapproval_plan_id
|
str | None
|
The preapproval_plan_id value. Omitted from the query when None. |
None
|
transaction_amount
|
float | None
|
The transaction_amount value. Omitted from the query when None. |
None
|
semaphore
|
str | None
|
The semaphore value. Omitted from the query when None. |
None
|
status
|
SubscriptionRequestStatus | None
|
The status value. Omitted from the query when None. |
None
|
sort
|
str | None
|
The sort value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SubscriptionSearchResult |
SubscriptionSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
get_subscription
async
¶
Get subscription.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Subscription |
Subscription
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403, 404, 500. |
update_subscription
async
¶
Update subscription.
Update subscription status or billing details. Common use: {"status":
"paused"} to pause, {"status": "authorized"} to resume, {"status":
"cancelled"} to cancel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
SubscriptionUpdateRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Subscription |
Subscription
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
create_subscription_plan
async
¶
Create a subscription plan.
Creates a recurring billing plan. Individual subscriptions reference this plan.
The response includes init_point to send subscribers to authorize billing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SubscriptionPlanRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SubscriptionPlan |
SubscriptionPlan
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 500. |
search_subscription_plans
async
¶
search_subscription_plans(
*,
status: SubscriptionPlanStatus | None = None,
q: str | None = None,
sort: str | None = None,
criteria: SearchSubscriptionPlansCriteria | None = None,
limit: int | None = None,
offset: int | None = None,
) -> SubscriptionSearchResult
Search subscription plans.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
SubscriptionPlanStatus | None
|
The status value. Omitted from the query when None. |
None
|
q
|
str | None
|
The q value. Omitted from the query when None. |
None
|
sort
|
str | None
|
The sort value. Omitted from the query when None. |
None
|
criteria
|
SearchSubscriptionPlansCriteria | None
|
The criteria value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SubscriptionSearchResult |
SubscriptionSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
get_subscription_plan
async
¶
Get subscription plan.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SubscriptionPlan |
SubscriptionPlan
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404, 500. |
update_subscription_plan
async
¶
Update a subscription plan.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
SubscriptionPlanRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SubscriptionPlan |
SubscriptionPlan
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 500. |
create_terminal_action
async
¶
Create a terminal print action.
Sends a print action to a Point terminal — either a receipt image or a DTE
(electronic tax document, available in Chile/MLC only). Set type to
PRINT_INFO for image printing or PRINT_DTE for DTE. Available in:
Argentina, Brazil, Chile, Mexico (MLA, MLB, MLC, MLM)
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateTerminalActionBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateTerminalActionResponse |
CreateTerminalActionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
get_terminal_action
async
¶
Get terminal action status.
Available in: Argentina, Brazil, Chile, Mexico (MLA, MLB, MLC, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
str
|
The action_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetTerminalActionResponse |
GetTerminalActionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
cancel_terminal_action
async
¶
Cancel a terminal action.
Available in: Argentina, Brazil, Chile, Mexico (MLA, MLB, MLC, MLM)
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_id
|
str
|
The action_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
list_terminals
async
¶
Get list of terminals.
Returns all Point hardware terminals registered to the account. Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Returns:
| Name | Type | Description |
|---|---|---|
ListTerminalsResponse |
ListTerminalsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401. |
update_terminal_operation_mode
async
¶
Update terminal operation mode.
Changes the operating mode of one or more terminals. PDV — integrated POS mode (connected to your system); STANDALONE — independent mode (no system integration). Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
UpdateTerminalOperationModeBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
get_authenticated_user
async
¶
Get the authenticated user.
Returns the account the credentials belong to.
Absent from the vendored document. The response is modelled from the one the sandbox returned on 2026-10-09: every declared field was observed, none is required, and fields not declared are kept as extra fields rather than dropped.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/user.py:get.
Returns:
| Name | Type | Description |
|---|---|---|
AuthenticatedUser |
AuthenticatedUser
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_pos
async
¶
List POS devices for a user.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
int
|
The user_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_store
async
¶
Create a store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
int
|
The user_id value. |
required |
body
|
CreateStoreBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 201 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
search_stores
async
¶
Search stores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
int
|
The user_id value. |
required |
external_id
|
str | None
|
Filter by your external store ID. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SearchStoresResponse |
SearchStoresResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
update_store
async
¶
Update a store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
int
|
The user_id value. |
required |
id
|
str
|
The id value. |
required |
body
|
StoreRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Store |
Store
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
delete_store
async
¶
Delete a store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
int
|
The user_id value. |
required |
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
get_release_report
async
¶
Get releases report list.
Not routed. Probed against the sandbox and answered the way a path the API
does not route answers — measured 2026-10-10 with a test seller's token, GET
answers 405 'Method GET is not supported' while
/v1/account/release_report/list and /search answer 200.
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_release_report
async
¶
Create a releases report.
Generates a one-time releases report for the specified date range. Returns a task ID to poll for completion via the task endpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportTask |
ReportTask
|
The 202 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
get_release_report_config
async
¶
Get releases report configuration.
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_release_report_config
async
¶
Create releases report configuration.
Creates the configuration for automatic releases report generation. Defines columns, schedule frequency, file format, and optional SFTP delivery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportConfig
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
update_release_report_config
async
¶
Update releases report configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportConfig
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_scheduled_release_reports
async
¶
List scheduled releases reports.
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
enable_release_report_schedule
async
¶
Enable automatic releases report generation.
Enables scheduled report generation based on the configured frequency.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401. |
disable_release_report_schedule
async
¶
Disable automatic releases report generation.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
search_release_reports
async
¶
search_release_reports(
*, begin_date: datetime | None = None, end_date: datetime | None = None
) -> ReportListResult
Search releases reports.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
begin_date
|
datetime | None
|
The begin_date value. Omitted from the query when None. |
None
|
end_date
|
datetime | None
|
The end_date value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_release_report_task
async
¶
Get releases report task status.
Polls the status of a report generation task. Check until status=done.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
The task_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportTask |
ReportTask
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
download_release_report
async
¶
Download a releases report file.
Downloads the generated report CSV file by filename.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
The file_name value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers text/csv, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
get_settlement_report
async
¶
Get settlements report list.
Not routed. Probed against the sandbox and answered the way a path the API
does not route answers — measured 2026-10-10 with a test seller's token, GET
answers 404 'Resource /account/settlement_report not found.' while
/v1/account/settlement_report/list and /search answer 200.
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_settlement_report
async
¶
Create a settlements report.
Generates a one-time all-transactions report for the specified date range. Returns a task ID to poll for completion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportTask |
ReportTask
|
The 202 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
get_settlement_report_config
async
¶
Get settlements report configuration.
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_settlement_report_config
async
¶
Create settlements report configuration.
Creates the configuration for automatic all-transactions (settlements) report generation. Defines columns, schedule frequency, file format, and optional SFTP delivery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportConfig
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
update_settlement_report_config
async
¶
Update settlements report configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ReportConfig
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportConfig |
ReportConfig
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_scheduled_settlement_reports
async
¶
List scheduled settlements reports.
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
enable_settlement_report_schedule
async
¶
Enable automatic settlements report generation.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
disable_settlement_report_schedule
async
¶
Disable automatic settlements report generation.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
search_settlement_reports
async
¶
search_settlement_reports(
*, begin_date: datetime | None = None, end_date: datetime | None = None
) -> ReportListResult
Search settlements reports.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
begin_date
|
datetime | None
|
The begin_date value. Omitted from the query when None. |
None
|
end_date
|
datetime | None
|
The end_date value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ReportListResult |
ReportListResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_settlement_report_task
async
¶
Get settlements report task status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
The task_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ReportTask |
ReportTask
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
download_settlement_report
async
¶
Download a settlements report file.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
The file_name value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers text/csv, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
create_advanced_payment
async
¶
create_advanced_payment(
*,
body: CreateAdvancedPaymentBody,
x_idempotency_key: UUID,
x_meli_session_id: str | None = None,
) -> CreateAdvancedPaymentResponse
Create an advanced payment.
Creates a Wallet Connect advanced payment (marketplace split payment).
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateAdvancedPaymentBody
|
The request body. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
x_meli_session_id
|
str | None
|
The X-Meli-Session-Id value. Omitted from the request headers when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CreateAdvancedPaymentResponse |
CreateAdvancedPaymentResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
search_advanced_payments
async
¶
search_advanced_payments(
*, limit: int | None = None, offset: int | None = None
) -> dict[str, Any]
Search advanced payments.
Searches advanced payments matching the given filters.
Absent from the vendored document. limit and offset are declared because
every other search in this document declares them — that is this document's
convention, not a measurement. The remaining filters and the response are not
modelled.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/advanced_payment.py:search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_advanced_payment
async
¶
Get an advanced payment.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
int
|
The advanced_payment_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetAdvancedPaymentResponse |
GetAdvancedPaymentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 500. |
update_advanced_payment
async
¶
update_advanced_payment(
advanced_payment_id: int, *, body: UpdateAdvancedPaymentBody
) -> UpdateAdvancedPaymentResponse
Capture or cancel an advanced payment.
Capture (capture=true) or cancel (status=cancelled).
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
int
|
The advanced_payment_id value. |
required |
body
|
UpdateAdvancedPaymentBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateAdvancedPaymentResponse |
UpdateAdvancedPaymentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 500. |
create_disbursement_refund
async
¶
create_disbursement_refund(
advanced_payment_id: str, disbursement_id: str, *, body: dict[str, Any]
) -> dict[str, Any]
Refund one disbursement of an advanced payment.
Refunds a single disbursement, in full or by amount.
Absent from the vendored document, and built through a local variable in the SDK. Neither the body nor the response is modelled.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/disbursement_refund.py:create.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
str
|
The advanced_payment_id value. |
required |
disbursement_id
|
str
|
The disbursement_id value. |
required |
body
|
dict[str, Any]
|
The request body. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
update_advanced_payment_release_date
async
¶
update_advanced_payment_release_date(
advanced_payment_id: str, *, body: dict[str, Any]
) -> dict[str, Any]
Update the release date of a disbursement.
Moves the money release date of an advanced payment's disbursements.
Absent from the vendored document. Neither the body nor the response is modelled.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/advanced_payment.py:update_release_date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
str
|
The advanced_payment_id value. |
required |
body
|
dict[str, Any]
|
The request body. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_disbursement_refunds
async
¶
List the refunds of an advanced payment.
Lists every disbursement refund of one advanced payment.
Absent from the vendored document, and invisible to a reader that only follows literal arguments: the SDK builds this URL through a local variable. The response is not modelled.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/disbursement_refund.py:list_all.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
str
|
The advanced_payment_id value. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_disbursement_refunds
async
¶
Refund an advanced payment.
Creates a refund covering the advanced payment's disbursements.
Absent from the vendored document. Neither the body nor the response is modelled
— nobody here has credentials to observe either — so both are dict[str, Any].
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/disbursement_refund.py:create_all.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
advanced_payment_id
|
str
|
The advanced_payment_id value. |
required |
body
|
dict[str, Any]
|
The request body. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_card_token
async
¶
Create a card token (client-side only).
CLIENT-SIDE ONLY. Creates a single-use card token from raw card data. Call this from your frontend using MercadoPago.js with the PUBLIC_KEY. Never call this endpoint server-side — doing so puts raw PAN and CVV on your server and brings your integration into full PCI DSS scope. PCI scope: Handling this endpoint brings your integration into PCI DSS scope. Auth note: Use PUBLIC_KEY for this endpoint (not ACCESS_TOKEN). Public key is safe in frontend code. Using ACCESS_TOKEN here from the browser exposes your server credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CardTokenRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CardToken |
CardToken
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_card_token
async
¶
Get a card token.
PCI scope: Handling this endpoint brings your integration into PCI DSS scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CardToken |
CardToken
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
search_chargebacks
async
¶
Search chargebacks.
Searches the chargebacks of one payment.
Absent from the vendored document. Measured on 2026-10-10 with a test seller's
token: without payment_id the call answers 400 Wrong parameters in Search
Cases (also with only limit and offset, or only a date filter); with it,
200 and the paging envelope modelled here. limit=10 came back as
paging.limit 25, so limit and offset are not declared. The items of
results were never observed — every search returned none — and stay untyped.
Declared by scripts/mercadopago_overlay.py from mercadopago 3.5.0
resources/chargeback.py:search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_id
|
str
|
The payment_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ChargebackSearchResponse |
ChargebackSearchResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_chargeback
async
¶
Get chargeback by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetChargebackResponse |
GetChargebackResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
update_chargeback
async
¶
Upload chargeback documentation.
Not routed. Probed against the sandbox and answered the way a path the API
does not route answers — measured 2026-10-09, PUT /v1/chargebacks/
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
UpdateChargebackBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_customer
async
¶
Create a customer.
Creates a customer profile for storing payment methods. The customer email is unique per account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CustomerRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Customer |
Customer
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
search_customers
async
¶
search_customers(
*,
email: EmailStr | None = None,
limit: int | None = None,
offset: int | None = None,
) -> CustomerSearchResult
Search customers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
email
|
EmailStr | None
|
The email value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CustomerSearchResult |
CustomerSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
list_customer_addresses
async
¶
List customer addresses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[Address]
|
list[Address]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401. |
create_customer_address
async
¶
Create a customer address.
Adds a shipping or billing address to a customer profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
body
|
Address
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Address |
Address
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 429. |
get_customer_address
async
¶
Get a customer address.
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
address_id
|
str
|
The address_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Address |
Address
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
update_customer_address
async
¶
Update a customer address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
address_id
|
str
|
The address_id value. |
required |
body
|
Address
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Address |
Address
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
delete_customer_address
async
¶
Delete a customer address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
address_id
|
str
|
The address_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
list_cards
async
¶
List customer cards.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
Returns:
| Type | Description |
|---|---|
list[Card]
|
list[Card]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
save_card
async
¶
Save a card to a customer.
Saves a tokenized card to a customer profile for future payments. The token must be created client-side via MercadoPago.js. Raw card data must never pass through your server. PCI scope: Handling this endpoint brings your integration into PCI DSS scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
body
|
SaveCardRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Card |
Card
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_card
async
¶
Get a saved card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Card |
Card
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
update_card
async
¶
Update a saved card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
id
|
str
|
The id value. |
required |
body
|
UpdateCardRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Card |
Card
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
delete_card
async
¶
Delete a saved card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customer_id
|
str
|
The customer_id value. |
required |
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Card |
Card
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
get_customer
async
¶
Get customer by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Customer |
Customer
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
update_customer
async
¶
Update a customer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
body
|
CustomerRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Customer |
Customer
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
delete_customer
async
¶
Delete a customer.
Permanently deletes a customer profile. This action cannot be undone. Saved cards associated with the customer will also be removed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Customer ID to delete |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Customer |
Customer
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404. |
list_identification_types
async
¶
List identification types.
Returns valid ID document types for the credential's site_id. Examples: CPF/CNPJ (Brazil), DNI/CUIL/CUIT (Argentina), RFC/CURP (Mexico). Use this to populate identification type selectors and validate inputs.
Returns:
| Type | Description |
|---|---|
list[ListIdentificationTypesResponseItem]
|
list[ListIdentificationTypesResponseItem]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
search_orders
async
¶
search_orders(
*,
begin_date: datetime,
end_date: datetime,
external_reference: str | None = None,
type: OrderRequestType | None = None,
status: OrderStatus | None = None,
limit: int | None = None,
offset: int | None = None,
) -> OrderSearchResult
Search orders.
Search for orders using date range and optional filters. begin_date and end_date are required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
begin_date
|
datetime
|
Start of date range (ISO 8601) |
required |
end_date
|
datetime
|
End of date range (ISO 8601) |
required |
external_reference
|
str | None
|
The external_reference value. Omitted from the query when None. |
None
|
type
|
OrderRequestType | None
|
The type value. Omitted from the query when None. |
None
|
status
|
OrderStatus | None
|
The status value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
offset
|
int | None
|
The offset value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
OrderSearchResult |
OrderSearchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
create_order
async
¶
Create an order.
Creates an Order for processing payment transactions. Supports automatic (single-stage, set processing_mode=automatic) and manual (multi-stage, set processing_mode=manual) modes.
In automatic mode, include the transactions.payments array with the payment method. In manual mode, omit transactions and add them later via POST /v1/orders/{id}/transactions, then trigger processing with POST /v1/orders/{id}/process.
Available for: credit card, debit card, Pix (MLB), Boleto (MLB), OXXO (MLM), SPEI (MLM), PSE (MCO), Rapipago (MLA), Pago Fácil (MLA).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
OrderRequest
|
The request body. |
required |
x_idempotency_key
|
UUID
|
Unique key per order creation attempt. Prevents duplicate orders on retry. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Order |
Order
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 422, 423, 500. |
get_order
async
¶
Get order by ID.
Returns all order information for the given order ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Order ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Order |
Order
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
cancel_order
async
¶
Cancel an order.
Cancels an order and all its transactions. Only orders with status=action_required or status=created can be canceled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Order |
Order
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
capture_order
async
¶
Capture an authorized order.
Fully captures a previously authorized order (capture_mode=manual). All associated authorized transactions are captured in full.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CaptureOrderResponse |
CaptureOrderResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
process_order
async
¶
Process an order.
Triggers processing of an order and all its transactions. Only available for manual-mode orders (processing_mode=manual). After calling this endpoint the order transitions to processed or action_required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Order |
Order
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
refund_order
async
¶
refund_order(
order_id: str, *, body: OrderRefundRequest | None = None, x_idempotency_key: UUID
) -> RefundOrderResponse
Refund an order.
Performs a full or partial refund of transactions associated with an order. For a full refund, send an empty request body (omit transactions). For a partial refund, include the transactions array with the specific transaction IDs and amounts to refund.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
body
|
OrderRefundRequest
|
The request body. Optional. |
None
|
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
RefundOrderResponse |
RefundOrderResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
add_order_transaction
async
¶
add_order_transaction(
order_id: str, *, body: AddOrderTransactionBody, x_idempotency_key: UUID
) -> AddOrderTransactionResponse
Add a transaction to an order.
Adds a payment transaction to an order. Only available when processing_mode=manual. The order must be in status=created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
body
|
AddOrderTransactionBody
|
The request body. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AddOrderTransactionResponse |
AddOrderTransactionResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 422. |
update_order_transaction
async
¶
update_order_transaction(
order_id: str,
transaction_id: str,
*,
body: UpdateOrderTransactionBody,
x_idempotency_key: UUID,
) -> OrderTransactionPayment
Update a transaction on an order.
Updates the payment method of a pending transaction on a manual-mode order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
transaction_id
|
str
|
The transaction_id value. |
required |
body
|
UpdateOrderTransactionBody
|
The request body. |
required |
x_idempotency_key
|
UUID
|
The X-Idempotency-Key value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
OrderTransactionPayment |
OrderTransactionPayment
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
delete_order_transaction
async
¶
Delete a transaction from an order.
Removes a transaction from a manual-mode order. Only available before processing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
The order_id value. |
required |
transaction_id
|
str
|
The transaction_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 204 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
list_payment_methods
async
¶
List available payment methods.
Returns all payment methods available for the credential's site_id. Use this to build payment method selectors and validate method availability before attempting a payment.
Returns:
| Type | Description |
|---|---|
list[ListPaymentMethodsResponseItem]
|
list[ListPaymentMethodsResponseItem]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
get_installments
async
¶
get_installments(
*,
payment_method_id: str,
amount: float,
issuer_id: str | None = None,
bin: str | None = None,
) -> list[GetInstallmentsResponseItem]
Get installment options.
Returns available installment plans for a given card BIN, amount, and site. Use this to populate installment selectors in your checkout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_method_id
|
str
|
The payment_method_id value. |
required |
amount
|
float
|
The amount value. |
required |
issuer_id
|
str | None
|
The issuer_id value. Omitted from the query when None. |
None
|
bin
|
str | None
|
First 6 digits of the card (BIN) for more accurate installment pricing. Omitted from the query when None. |
None
|
Returns:
| Type | Description |
|---|---|
list[GetInstallmentsResponseItem]
|
list[GetInstallmentsResponseItem]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_payout
async
¶
Create a batch of payout transactions.
Available in: Argentina, Mexico (MLA, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreatePayoutBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 201 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_payout_transactions
async
¶
List payout transactions.
Available in: Argentina, Mexico (MLA, MLM)
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payout_id
|
str
|
The payout_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
cancel_payout_transaction
async
¶
Cancel a payout transaction.
Available in: Argentina, Mexico (MLA, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payout_id
|
str
|
The payout_id value. |
required |
transaction_id
|
str
|
The transaction_id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
process_transaction_intent
async
¶
Create a disbursement (Pix or bank transfer).
Creates a Pix or bank transfer disbursement for Brazil. The payment_method_id
determines the method: - pix — instant Pix transfer (available 24/7) -
bank_transfer — TED/DOC bank transfer Available in: Brazil (MLB)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ProcessTransactionIntentBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 201 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
get_transaction_intent
async
¶
Get disbursement status.
Available in: Brazil (MLB)
Unverified. Neither the provider's SDK nor an unauthenticated probe covers this operation, so nothing here confirms the API routes it. See issue #227.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
create_wallet_agreement
async
¶
create_wallet_agreement(
*,
body: CreateWalletAgreementBody,
client_id: str | None = None,
x_platform_id: str | None = None,
) -> CreateWalletAgreementResponse
Create a Wallet Connect agreement.
Creates an authorization agreement for Wallet Connect. Returns an agreement token to redirect the payer to MP for wallet authorization. Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateWalletAgreementBody
|
The request body. |
required |
client_id
|
str | None
|
The client.id value. Omitted from the query when None. |
None
|
x_platform_id
|
str | None
|
The x-platform-id value. Omitted from the request headers when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CreateWalletAgreementResponse |
CreateWalletAgreementResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_wallet_agreement
async
¶
get_wallet_agreement(
agreement_id: str, *, client_id: str | None = None, x_platform_id: str | None = None
) -> GetWalletAgreementResponse
Get a Wallet Connect agreement.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agreement_id
|
str
|
The agreement_id value. |
required |
client_id
|
str | None
|
The client.id value. Omitted from the query when None. |
None
|
x_platform_id
|
str | None
|
The x-platform-id value. Omitted from the request headers when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GetWalletAgreementResponse |
GetWalletAgreementResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
delete_wallet_agreement
async
¶
delete_wallet_agreement(
agreement_id: str, *, client_id: str | None = None, x_platform_id: str | None = None
) -> None
Revoke a Wallet Connect agreement.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agreement_id
|
str
|
The agreement_id value. |
required |
client_id
|
str | None
|
The client.id value. Omitted from the query when None. |
None
|
x_platform_id
|
str | None
|
The x-platform-id value. Omitted from the request headers when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
create_wallet_payer_token
async
¶
create_wallet_payer_token(
agreement_id: str,
*,
body: CreateWalletPayerTokenBody,
x_platform_id: str | None = None,
) -> CreateWalletPayerTokenResponse
Create a payer token from agreement.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agreement_id
|
str
|
The agreement_id value. |
required |
body
|
CreateWalletPayerTokenBody
|
The request body. |
required |
x_platform_id
|
str | None
|
The x-platform-id value. Omitted from the request headers when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CreateWalletPayerTokenResponse |
CreateWalletPayerTokenResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
validate_wallet_coupon
async
¶
validate_wallet_coupon(
*, body: ValidateWalletCouponBody, x_payer_token: str
) -> ValidateWalletCouponResponse
Validate a coupon.
Checks coupon status and returns description and legal terms.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ValidateWalletCouponBody
|
The request body. |
required |
x_payer_token
|
str
|
The x-payer-token value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ValidateWalletCouponResponse |
ValidateWalletCouponResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
create_wallet_discount
async
¶
create_wallet_discount(
*, body: CreateWalletDiscountBody, x_payer_token: str
) -> CreateWalletDiscountResponse
Create a discount promise.
Validates a coupon and returns discount amount and legal terms.
Available in: Argentina, Brazil, Mexico (MLA, MLB, MLM)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateWalletDiscountBody
|
The request body. |
required |
x_payer_token
|
str
|
Payer wallet token from agreement flow. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateWalletDiscountResponse |
CreateWalletDiscountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 500. |
DEFAULT_BASE_URL
module-attribute
¶
The only server the specification declares.
Kept as a constant rather than an enum of environments precisely because there is nothing to choose between. An enum here would suggest a safety that does not exist.
MercadoPagoEventEnum
¶
Bases: BaseStrEnum
A notification topic, as Mercado Pago names it.
Attributes:
| Name | Type | Description |
|---|---|---|
PAYMENT |
str
|
A payment was created or changed state. |
MERCHANT_ORDER |
str
|
A merchant order changed. |
POINT_INTEGRATION |
str
|
An in-person (Point) terminal event. |
ORDER |
str
|
An order of the Orders API was created or changed
state. The |
UNKNOWN |
str
|
A topic this SDK version does not name. The delivery is still verified and still reaches the caller — only the classification is absent. |
to_cents
¶
Turn an amount Mercado Pago states in reais into exact cents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount
|
float | int | str | Decimal
|
The amount as the API typed
it. A |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The amount in cents. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the amount is negative, or carries a fraction of a cent. Both mean the caller's assumption about the field is wrong, and silently rounding would hide a real mismatch behind a plausible number. |
A float is routed through repr before Decimal so that
19.9 reads as Decimal("19.9") rather than the binary expansion
Decimal(19.9) would produce.
from_cents
¶
Turn exact cents into the amount Mercado Pago expects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cents
|
int
|
The amount in cents. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Decimal |
Decimal
|
The amount in reais, quantized to two places. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Returns a Decimal rather than a float on purpose. Serializing a
Decimal to JSON produces the digits you asked for; going through a
float first can produce 19.900000000000002, which some providers
reject and all of them log.
format_amount
¶
Render an amount for a log line or a receipt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cents
|
int
|
The amount in cents. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The amount with two decimal places and no currency symbol — |
str
|
|
|
str
|
whoever is displaying it. |
MercadoPagoWebhookEvent
dataclass
¶
MercadoPagoWebhookEvent(
topic: str,
event: MercadoPagoEventEnum | None = None,
data_id: str = "",
payload: dict[str, Any] = dict(),
body: bytes = b"",
)
A verified Mercado Pago notification.
A dataclass rather than a BaseSchema: this is the value handed to a
route, not a wire DTO. BaseSchema sets use_enum_values=True,
which would store :attr:event as a bare str — and then
event.event is MercadoPagoEventEnum.PAYMENT would be silently False
on every delivery.
Attributes:
| Name | Type | Description |
|---|---|---|
topic |
str
|
The notification type exactly as delivered. |
event |
MercadoPagoEventEnum | None
|
The parsed topic.
:attr: |
data_id |
str
|
The resource id the notification points at, read
from the |
payload |
dict[str, Any]
|
The decoded body. Not covered by the
signature: the manifest signs |
body |
bytes
|
The raw body, byte-for-byte, for logging or a second verification. |
SignatureHeader
dataclass
¶
The parsed x-signature value.
Attributes:
| Name | Type | Description |
|---|---|---|
timestamp |
str
|
The |
hashes |
Mapping[str, str]
|
Every |
digest
¶
digest(versions: Sequence[str] = DEFAULT_SIGNATURE_VERSIONS) -> str
Pick the digest for the first version present.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
versions
|
Sequence[str]
|
Versions to try, in preference order. |
DEFAULT_SIGNATURE_VERSIONS
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The hex digest, or |
str
|
them — which is what a provider migration to an unsupported |
|
str
|
version looks like from here. |
DEFAULT_SIGNATURE_VERSIONS
module-attribute
¶
Hash versions accepted by default, in preference order.
Upstream defaults to ['v1'] and iterates in order, so a header carrying
both v1 and v2 verifies against whichever the caller lists first.
Passing ("v2", "v1") is how an integrator adopts a new version before
this package ships one.
DEFAULT_TOLERANCE_SECONDS
module-attribute
¶
Maximum drift, in seconds, between a delivery's ts and the clock.
Five minutes, the value the Stripe verifier in this package uses. Upstream
leaves the window opt-in, which means a delivery captured off the wire
verifies forever: the signature covers a timestamp nobody checks. This
package turns it on by default; pass tolerance_seconds=None to keep the
upstream behaviour, or a larger number when a delivery legitimately arrives
late.
MERCADO_PAGO_DATA_ID_QUERY
module-attribute
¶
Query-string parameter carrying the resource id, part of the manifest.
make_mercado_pago_webhook_dependency
¶
make_mercado_pago_webhook_dependency(
secret: str,
*,
tolerance_seconds: float | None = DEFAULT_TOLERANCE_SECONDS,
versions: Sequence[str] = DEFAULT_SIGNATURE_VERSIONS,
error_message: str = "Invalid Mercado Pago webhook signature",
) -> Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]
Build a FastAPI dependency yielding a verified notification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
str
|
The webhook secret from the Mercado Pago dashboard.
An empty secret rejects every delivery, as
:func: |
required |
tolerance_seconds
|
float | None
|
Maximum drift between |
DEFAULT_TOLERANCE_SECONDS
|
versions
|
Sequence[str]
|
Hash versions to accept, in preference
order. Defaults to :data: |
DEFAULT_SIGNATURE_VERSIONS
|
error_message
|
str
|
Message on the raised
:class: |
'Invalid Mercado Pago webhook signature'
|
Returns:
| Type | Description |
|---|---|
Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]
|
Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]: An |
Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]
|
async dependency that reads |
Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]
|
|
Callable[..., Coroutine[Any, Any, MercadoPagoWebhookEvent]]
|
and returns a :class: |
Raises:
| Type | Description |
|---|---|
UnauthorizedException
|
Raised by the returned dependency when
|
The signature covers data.id, x-request-id and ts — not
the body. data_id on the returned event is therefore the one
value the provider vouched for; payload and topic came along
unsigned. Re-read the resource from the API by data_id before
acting on it.
A body that is not JSON does not fail the request: the delivery
verified, and rejecting it would discard a notification the provider
considers sent. payload stays empty and body carries the bytes.
The topic is read from the body's type, falling back to the
type query parameter Mercado Pago also appends; a topic this SDK
version does not name becomes :attr:MercadoPagoEventEnum.UNKNOWN rather
than an error, so a provider release does not become an outage here.
verify_signature
¶
verify_signature(
*,
secret: str,
signature_header: str,
data_id: str = "",
request_id: str = "",
versions: Sequence[str] = DEFAULT_SIGNATURE_VERSIONS,
tolerance_seconds: float | None = DEFAULT_TOLERANCE_SECONDS,
now: Callable[[], float] | None = None,
) -> bool
Check a delivery's signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
str
|
The webhook secret from the dashboard. |
required |
signature_header
|
str
|
The raw |
required |
data_id
|
str
|
The |
''
|
request_id
|
str
|
The |
''
|
versions
|
Sequence[str]
|
Hash versions to accept, in preference
order. Defaults to :data: |
DEFAULT_SIGNATURE_VERSIONS
|
tolerance_seconds
|
float | None
|
Maximum drift between |
DEFAULT_TOLERANCE_SECONDS
|
now
|
Callable[[], float] | None
|
Clock for the tolerance check, in
seconds since the epoch. Defaults to :func: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Whether the delivery verifies. Comparison goes through |
bool
|
func: |
|
bool
|
one byte at a time through timing. |
A False here covers every rejection: no secret, a malformed header,
a timestamp that is not all digits, no hash for a supported version, a
digest that does not match, or drift past tolerance_seconds. The
reason is deliberately not returned — a route that branches on why a
signature failed tends to grow a path that accepts one of them.
An empty secret always returns False. Treating "no secret
configured" as "everything is valid" is how an unauthenticated endpoint
ships to production believing it is protected.
Turning the tolerance off
With tolerance_seconds=None a delivery captured off the wire
verifies forever: the signature covers a timestamp nobody is
checking. Upstream ships it that way; this package does not.
sign_manifest
¶
Compute the HMAC-SHA256 digest of one delivery's manifest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
secret
|
str
|
The webhook secret from the Mercado Pago dashboard. |
required |
data_id
|
str
|
The |
''
|
request_id
|
str
|
The |
''
|
timestamp
|
str
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The lowercase hex digest. |
Exposed publicly because a test — yours or this package's — needs to
produce a valid signature without duplicating the manifest rules. The
data_id is lowercased by :func:build_manifest, as the provider
does, so passing the id exactly as a delivery carries it signs what the
provider would sign.
build_manifest
¶
Build the string Mercado Pago signs, omitting the pairs it omits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_id
|
str
|
The |
''
|
request_id
|
str
|
The |
''
|
timestamp
|
str
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The manifest — present pairs joined by |
str
|
|
|
str
|
|
|
str
|
|
|
str
|
empty |
The omission rule is the reason this function exists instead of a
format string: a fixed template turns an absent data.id into
id:;, which hashes to something the provider never signed. Ported
from mercadopago/sdk-nodejs, src/utils/webhook/index.ts
(buildManifest) at commit 99857f33.
The data.id is lowercased, which that commit no longer does. Live
Orders deliveries are signed over the lowercased id (ORD01... arrives,
ord01... is signed), so a manifest with the id as delivered rejected
every one of them; the module docstring has the history.
parse_signature_header
¶
parse_signature_header(header: str) -> SignatureHeader
Split ts=...,v1=... into its components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
header
|
str
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SignatureHeader |
SignatureHeader
|
The timestamp and every version hash present. A |
SignatureHeader
|
malformed header yields empty components rather than an exception: |
|
SignatureHeader
|
it means an untrusted caller, not a bug. |
Keys are lowercased and values trimmed, matching upstream — TS= and
V1= parse. Unknown keys are ignored, so a component the provider
adds later does not break parsing.