# MD for: https://www.mercadopago.com.uy/developers/es/docs/wallet-connect/resources/integration-errors.md \# Possible errors See the list of possible errors returned by the APIs used in the Wallet Connect integration and how to correct them. :::AccordionComponent{title="Agreements API"} Errors returned in the agreement creation, payment token generation, query and cancellation operations. | Error Type | Status | Code | Description and possible solutions | |:---:|:---:|:---:|:---:| | Request error | 400 | \`RedirectUriMismatch\` | The redirect URI does not match the one registered for this application. Check the value sent in \`return\_uri\` and confirm that it is registered in your application settings. | | Request error | 400 | \`ReturnUriNull\` | The \`return\_uri\` field is required and was not provided. Make the request again including it. | | Request error | 400 | \`ReturnUriTooLong\` | The \`return\_uri\` value exceeds the maximum allowed length of 2048 characters. Reduce the size of the URI sent. | | Request error | 400 | \`ExternalUserNull\` | The \`external\_user\` field is required and was not provided. Make the request again including the buyer's identifier in your system. | | Request error | 400 | \`ExternalFlowIdTooLong\` | The \`external\_flow\_id\` value exceeds the maximum allowed length of 64 characters. Reduce the size of the identifier sent. | | Request error | 400 | \`AgreementDataDescriptionInvalid\` | The \`agreement\_data.description\` value is invalid. Check the content sent and respect the 256-character limit. | | Request error | 400 | \`CodeMismatch\` | The provided code does not match the validation code for this agreement. Use the \`code\` returned in the \`return\_uri\` or in the confirmation webhook of the corresponding agreement. | | Request error | 400 | \`InvalidCodeFormat\` | The code format is invalid. It must be a 32-character lowercase alphanumeric string. | | Request error | 400 | \`AlreadyCreated\` | A payment token for this agreement has already been generated. Use the \`payer\_token\` obtained previously, as the same \`code\` cannot be reused. | | Request error | 400 | \`WindowExpired\` | The time window for generating a payment token has expired. It will be necessary to create a new agreement and obtain a new approval from the buyer. | | Request error | 400 | \`AgreementNotConfirmedByUser\` | The agreement has not been confirmed by the buyer yet. Wait for the approval flow to be completed before requesting the payment token. | | Request error | 400 | \`UserIdEqualsCollectorId\` | The buyer and seller cannot be the same Mercado Pago user. Use distinct accounts to perform the agreement. | | Request error | 400 | \`invalid\_path\_param\` | The \`agreement\_id\` provided in the path is not valid. Please confirm it and provide a valid id to try again. | | Request error | 403 | \`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. | | Request error | 404 | \`AgreementNotFound\` | No agreement was found with the provided ID. This same response is returned when the agreement belongs to another application, in order to avoid exposing the existence of other customers' agreements. | | Request error | 404 | \`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. | | Request error | 404 | \`AlreadyCancelled\` | The agreement has already been cancelled. Remember that it can also be cancelled by the buyer through the Mercado Pago app or automatically when a new agreement is confirmed for the same buyer. | | API error | 500 | \`internal\_error\` | An internal server error occurred. Please try again later. If the problem persists, contact support, provide the \`x-request-id\` and more details about the operation performed. | ::: :::AccordionComponent{title="Orders API"} Errors returned in the order creation, capture, query, cancellation and refund operations. | Error Type | Status | Code | Description and possible solutions | |:---:|:---:|:---:|:---:| | Request error | 400 | \`json\_syntax\_error\` | An invalid JSON was sent. Make sure the request has a valid JSON structure and check the message returned in the error details to identify the problem. | | Request error | 400 | \`required\_properties\` | Some required properties are missing. Check the message returned in the error details and make sure to include all required properties according to the API documentation. | | Request error | 400 | \`unsupported\_properties\` | A property not supported by the API was sent. Review the request and remove or correct the unsupported properties. | | Request error | 400 | \`minimum\_properties\` | The minimum number of required properties was not sent. Add the necessary properties to complete the request. | | Request error | 400 | \`property\_type\` | The type of some informed property is invalid. Make sure the value sent in the request matches the expected type. | | Request error | 400 | \`property\_value\` | The value of some informed property is invalid. Check the value sent and adjust it to match the allowed values. | | Request error | 400 | \`maximum\_items\` | The array size exceeds the maximum allowed. Reduce the number of sent items. Remember that Wallet Connect orders accept only one payment transaction. | | Request error | 400 | \`minimum\_items\` | The array size is below the minimum allowed. Add more items to the request to meet the API requirements. | | Request error | 400 | \`invalid\_properties\` | Incorrect information was provided. Review the sent properties and check whether they comply with the API specifications. | | Request error | 400 | \`invalid\_path\_param\` | The \`order\_id\` provided in the path is not valid. Please confirm it and provide a valid id to try again. | | Request error | 400 | \`invalid\_order\_type\` | The order \`type\` is invalid or unsupported. For payments with Wallet Connect, the only possible value is \`online\`. | | Request error | 400 | \`invalid\_total\_amount\` | The value informed in \`total\_amount\` does not match the sum of the \`transactions.payments.amount\` field of all transactions. Check whether the values are correct. | | Request error | 400 | \`empty\_required\_header\` | The \`X-Idempotency-Key\` header is required and was not sent. Make the request again including it. | | Request error | 400 | \`invalid\_idempotency\_key\_length\` | The value sent in the \`X-Idempotency-Key\` header must be between 1 and 64 characters. | | Request error | 400 | \`refund\_amount\_exceeds\` | The refund amount is greater than the amount available in the transaction. Check the available amount and adjust the requested value so as not to exceed this limit. | | Authentication error | 401 | \`unauthorized\` | The value sent as the Access Token is incorrect. Check it and try sending the request again with the correct value. | | Authentication error | 401 | \`unauthorized\_payer\_token\` | The \`payer\_token\` provided is not authorized for this transaction. Check whether the token is valid, belongs to the authenticated buyer and whether the agreement has not been cancelled. If it has, the \[agreement flow\](https://www.mercadopago.com.uy/developers/en/docs/wallet-connect/configure-agreements) must be repeated. | | Authentication error | 401 | \`invalid\_credentials\` | Test :toolTipComponent\[credentials\]{link="/developers/en/docs/wallet-connect/resources/credentials" linkText="Credentials" content="Unique access keys that we use to identify an integration in your account, linked to your application. For more information, access the link below."} are not supported. Use \*\*test users with production credentials\*\* for the \[test environment\](https://www.mercadopago.com.uy/developers/en/docs/wallet-connect/integration-test) (sandbox) and \*\*your production credentials\*\* for the \[production environment\](https://www.mercadopago.com.uy/developers/en/docs/wallet-connect/go-to-production). | | Processing error | 402 | \`failed\` | The order was created but some transaction failed. Check the \`errors\` field of the response to identify the reason, such as insufficient balance in the buyer's wallet (\`insufficient\_amount\`). | | Request error | 404 | \`order\_not\_found\` | Order not found. Check whether the sent id is correct. | | Request error | 404 | \`payment\_not\_found\` | Payment not found. Check whether the sent \`payment\_id\` is correct. | | Request error | 404 | \`transaction\_not\_found\` | Transaction not found. Check whether the sent \`transaction\_id\` is correct. | | Idempotency error | 409 | \`idempotency\_key\_already\_used\` | The value sent as the idempotency header (\`X-Idempotency-Key\`) has already been used. Each key must be unique to ensure the operation is performed only once. Use a new value for the next request. | | Request error | 409 | \`operation\_not\_supported\` | The operation is not supported for this order. Check the order \`status\` and \`status\_detail\` and try again. | | Request error | 409 | \`cannot\_capture\_order\` | The order cannot be captured because it is not in a status that allows capture. Only orders with the \`action\_required\` status created with \`capture\_mode\` set to \`manual\` can be captured. | | Request error | 409 | \`cannot\_cancel\_order\` | The order cannot be cancelled because it is not in a status that allows cancellation. Only orders with the \`action\_required\` status can be cancelled. To reverse a payment that has already been captured, use the refund. | | Request error | 409 | \`order\_already\_canceled\` | The order has already been cancelled. It is not possible to perform operations on an order that is already in this status. | | Request error | 409 | \`cannot\_refund\_order\` | The order cannot be refunded. Make sure it is in a status that allows a refund to be performed. | | Request error | 409 | \`order\_already\_refunded\` | The order has already been fully refunded. It is not possible to process a new refund in this scenario. | | Request error | 409 | \`order\_refund\_already\_in\_process\` | There is already a full refund request in process for this order. Wait for it to complete before sending a new request. | | Request error | 422 | \`unprocessable\_entity\` | The payment profile associated with the \`payer\_token\` is corrupted or incomplete. Ask the buyer to redo the wallet agreement. | | Idempotency error | 423 | \`resource\_locked\` | The idempotency key (\`X-Idempotency-Key\`) is locked by an ongoing request. Wait a few moments and try executing the request again. | | Idempotency error | 500 | \`idempotency\_validation\_failed\` | Idempotency validation failed. Try resending the request with a new and unique idempotency key to avoid conflicts. If the problem persists, contact support, provide the \`x-request-id\` and more details about the operation performed. | | API error | 500 | \`internal\_error\` | An internal server error occurred. Please try again later. If the problem persists, contact support, provide the \`x-request-id\` and more details about the operation performed. | ::: For more information about how to send the requests, requirements and necessary validations, please refer to our :TagComponent{tag="API" text="API Reference" href="/developers/en/reference/online-payments/wallet-connect/overview" color="accent"}.