AI resources
Cancel agreement

This endpoint allows canceling an existing agreement by its ID, revoking the seller's authorization to process payments from the buyer's wallet. When an agreement is canceled, its associated payer_token is also revoked. In case of success, the request will return a response with status 200.

DELETE

https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
Path
agreement_id
string

REQUIRED

Unique identifier of the agreement, returned in the response from the endpoint /v2/wallet_connect/agreements.
Response parameters
Esta solicitação não tem resposta
Errors

403Forbidden.

forbidden

You don't have permission to access the requested resource. Check whether the Access Token used has the permissions and scopes required for this operation.

404Resource not found.

AgreementNotFound

No agreement was found with the provided ID. This same response is returned when the agreement belongs to another application (ClientNotOwner), in order to avoid exposing the existence of other customers' agreements.

ClientNotOwner

The agreement exists but was not created by the current application. The same AgreementNotFound response will be returned to avoid exposing the existence of other customers' agreements.

AlreadyCancelled

The agreement has already been canceled. It may have been canceled by the buyer in the Mercado Pago app or automatically when a new agreement was confirmed for the same buyer.

500Generic error.

internal_error

An internal server error occurred. Please try again later. If the problem persists, contact support and provide the x-request-id and details about the operation performed.

Request
curl -X DELETE \
    'https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
    
Response
// This request has not been responded to.