# MD for: https://www.mercadopago.com.br/developers/pt/docs/payouts/integration-test.md \# Integration test Before going live, we recommend testing the proper functioning of your integration and transaction processing. This will allow you to verify if the integration was done correctly and if payments are being processed without errors. See below how to test your integration. > NOTE > > If you wish, before testing your integration you can encrypt your data to perform your test transactions. To learn how to create this encryption, go to \[Security encryption\](https://www.mercadopago.com.br/developers/en/docs/payouts/go-to-production#bookmark\_security\_encryption). Remember that this encryption is \*\*only required when going live with your integration, that is, for your real transactions\*\*. The Payouts integration test consists of creating transactions with predefined status. These status will be defined based on the value you send for the \`external\_reference\` field. In other words, you will send data to create a transaction based on the \`status\` you want to obtain as a response and, in this way, you can verify if the processing is happening correctly. For example, if the field \`external\_reference=new\`, a \`status=new\` should be returned. To test your integration with Payouts, create transactions by sending a \*\*POST\*\*, with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago and used in the \_backend\_. You can access it through \*Your integrations > Integration data > Tests > Test credentials\*."} and the \`X-test-token:true\` \_header\_ to the endpoint :TagComponent{tag="API" text="/v1/transaction-intents/process" href="/developers/en/reference/online-payments/payouts/create-bank-transaction/post"} so the request is made in a test environment. Modify the \`external\_reference\` field according to the status you want to obtain. Below, you will find an example \`curl\` and a table with details about the different states. \* Transfers via Pix: \`\`\`curl curl --location 'https://api.mercadopago.com/v1/transaction-intents/process' \\ --header 'X-enforce-signature: false' \\ --header 'Authorization: Bearer ' \\ --header 'Content-Type: application/json' \\ --header 'X-test-token: true' \\ --data '{ "external\_reference": "MP0197", "point\_of\_interaction": { "type": "PSP\_TRANSFER" }, "seller\_configuration": { "notification\_info": { "notification\_url": "https://link-your-webhook-notification.com" } }, "transaction": { "from": { "accounts": \[ { "amount": 10 } \] }, "to": { "accounts": \[ { "amount": 10, "owner": { "identification": { "number": "38437455871", "type": "CPF" } }, "chave": { "type": "CPF", "value": "38437455871" } } \] }, "total\_amount": 10 } }' \`\`\` \* Transfers to bank accounts: \`\`\`curl curl --location 'https://api.mercadopago.com/v1/transaction-intents/process' \\ --header 'X-enforce-signature: false' \\ --header 'Authorization: Bearer ' \\ --header 'Content-Type: application/json' \\ --header 'X-test-token: true' \\ --data '{ "external\_reference": "MP0197", "point\_of\_interaction": { "type": "PSP\_TRANSFER" }, "seller\_configuration": { "notification\_info": { "notification\_url": "https://link-your-webhook-notification.com" } }, "transaction": { "from": { "accounts": \[ { "amount": 5 } \] }, "to": { "accounts": \[ { "type": "current", "amount": 5, "bank\_id": "99999004", "branch": "0001", "currency\_id": "BRL", "holder": "EWALD DAVIS", "number": "10266732", "provider\_id": "spi", "owner": { "identification": { "number": "38437455871", "type": "CPF" } } } \] }, "total\_amount": 5 } }' \`\`\` > NOTE > > To learn how to send the remaining fields to execute this request, go to \[Integration Configuration\](https://www.mercadopago.com.br/developers/en/docs/payouts/integration-configuration). | Value of the \`external\_reference\` field | Response | |---|---| | \`new\` | A new transaction will be created and the response will return the value \`new\` for the \`status\` field. | | \`failed\_by\_bank\` | A new transaction will be created, this time rejected by the bank. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`by\_bank\`. | | \`failed\_by\_provider\` | A new transaction will be created, this time rejected by the provider. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`by\_provider\`. | | \`failed\_by\_caps\` | A new transaction will be created, this time rejected for non-compliance with Central Bank regulations. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`by\_caps\`. | | \`failed\_other\_reason\` | A new transaction will be created, this time rejected for other reasons. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`other\_reason\`. | | \`failed\_by\_high\_risk\` | A new transaction will be created, this time rejected due to fraud risk. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`by\_high\_risk\`. | | \`failed\_by\_compliance\` | A new transaction will be created, this time rejected due to non-compliance with regulations. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`by\_compliance\`. | | \`failed\_insufficient\_funds\` | A new transaction will be created, this time rejected due to insufficient funds in the source account. The response will return the value \`failed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`insufficient\_funds\`. | | \`partially\_processed\` | A new transaction will be created whose processing has not yet been completed. The response will return the value \`partially\_processed\` for the \`status\` field. | | \`partially\_processed\_pending\_bank\` | A new transaction will be created whose processing has not yet been completed due to issues related to the destination account. The response will return the value \`partially\_processed\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`pending\_bank\`. | | \`reverted\` | A new transaction will be created, this time refunded. The response will return the value \`reverted\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`refunded\`. | | \`partially\_reverted\_partially\_refunded\` | A new transaction will be created, this time partially refunded. The response will return the value \`partially\_reverted\` for the \`status\` field. The \`status\_detail\` within the \`from.accounts\` object will be \`partially\_refunded\`. | | \`timeout\` | A new transaction will be created that will exceed the time limit. The response will return the value \`processed\` for the \`status\` field, but it will arrive after 2 minutes. | | \`internal\_server\_error\` | A new transaction will be created that will fail due to system errors. It will return an \`Error 500\`. | | Any other value | New resources will be generated with status \`processed\`. | Ready! Once these steps are completed, the integration is complete and you can \[go to production\](https://www.mercadopago.com.br/developers/en/docs/payouts/go-to-production).