Home
Documentation
Resources
Certifications
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Community

Get the latest news, ask others for help and share your knowledge.

Integration configuration - Money Out - Mercado Pago Developers

Intelligent search powered by OpenAI 

Integration configuration

The integration of Money Out is done by making a single API call to v1/transaction-intents. This way, the transaction is created and processed in a single request and, if successful, the money will be available to be withdrawn to the destination account, without the need for additional steps.

Important
To set up the integration and test its proper functioning before going live, you'll need to use your test Access Token.

To integrate Money Out with destination to bank accounts, you will need to send a POST request, with your Access Token in the Authorization header and your idempotency key in the X-Idempotency-Key header, to the endpoint /v1/transaction-intents/process. You should send the corresponding parameters following the instructions in the table below.

Note
Please note that only one destination account (transaction.to) per call is allowed.

curl

curl -X POST \
    'https://api.mercadopago.com/v1/transaction-intents/process'\
    -H 'Content-Type: application/json' \
       -H 'X-Idempotency-Key: {{idempotency_key}}' \
       -H 'x-Signature: true' \
       -H 'x-enforce-signature: false' \
       -H 'Authorization: Bearer TEST-7719*********832-03141*********ec9309854*********f1e54b5-1*********' \
    -d '{
  "external_reference": "MP0001",
  "point_of_interaction": "{"type":"PSP_TRANSFER"}",
  "seller_configuration": {
    "notification_info": {
      "notification_url": "http://example.cl/notification"
    }
  },
  "transaction": {
    "from": {
      "accounts": [
        {
          "amount": 100
        }
      ]
    },
    "to": {
      "accounts": [
        {
          "amount": 100,
          "bank_id": "99999004",
          "type": "current",
          "number": "10266732",
          "owner": {
            "identification": {
              "type": "RUT",
              "number": "111111111111"
            }
          }
        }
      ]
    },
    "total_amount": 100
  }
}'
FieldDescriptionRequired/OptionalExample
x-signatureHeader. Request signature with the body encrypted in base64 using the integrator's public and private keys. Check the End-to-end encryption section if you need more information.Required only in the production environment.-
x-enforce-signatureHeader. Boolean to indicate whether the integrator will send the signature or not.Not required in the testing environment, and required in the production environment, where sending the signature is mandatory.-
external_referenceBody. String with a reference to identify the transaction. It is generated by the integrator and it can be any value that allows transactions to be tracked as long as it does not have special characters (“”, [ ], (), @) and does not exceed 64 characters. Numbers (1234), letters (abcde) and middle and underscore hyphens (-; _) are allowed. Its value cannot be duplicated with another transaction.OptionalMP0001
point_of_interaction.typeBody. Fix value. It must always be {"type":"PSP_TRANSFER"}Required{"type":"PSP_TRANSFER"}
seller_configuration.notification_info.notification_urlBody. URL where notifications of events related to the transaction, such as status changes, will be received. This field has a limit of 500 characters.Optionalhttp://example.cl/notification
transaction.from.accounts.amountBody. Transaction amount, which will be withdrawn from the source account from. The minimum value is 0, and the maximum is 10000000000.Required100,00
transaction.to.accounts.amountBody. Amount to be sent to the destination account indicated in to. It must be the same value indicated for from.accounts.amount.Required100,00
transaction.to.accounts.bank_idBody. Identification number of the bank to which the destination account belongs.Required99999004
transaction.to.accounts.typeBody. Destination account type. Possible values are current, for bank accounts, and mercadopago, for Mercado Pago accounts.Requiredcurrent / mercadopago
transaction.to.accounts.numberBody. Unique number representing the destination bank account.Required10266732
transaction.to.accounts.owner.identification.typeBody. Type of identification of the holder of the destination account.Required“CPF”
“CNPJ”
transaction.to.accounts[n].owner.identification.numberBody. Identification number of the holder of the destination account.Required1234567890
transaction.total_amount Body.Total amount of the transaction. It must be the same value indicated for from.accounts.amount and to.accounts.amount.Required100,00

If the execution was successful, you will automatically receive a response with status code 202, indicating that the transaction was accepted, as in the example below.

Important
Please note that this response may take a few seconds, and if its status is pending, you should make a call to Get information about a transaction to check its update.

json

{
  "created_date": "2021-01-01T00:00:00.000Z",
  "external_reference": "123456",
  "id": "0d5020ed",
  "last_updated_date": "2021-01-01T00:00:00.000Z",
  "point_of_interaction": {
    "type": "{\"type\":\"PSP_TRANSFER\"}"
  },
  "seller_configuration": {
    "notification_info": {
      "notification_url": "http://example.cl/notification"
    }
  },
  "status": "approved",
  "transaction": {
    "from": {
      "accounts": [
        {
          "amount": "100,00"
        }
      ]
    },
    "paid_amount": 100,
    "payer": {
      "id": 123456543
    },
    "refunded_amount": 1,
    "to": {
      "accounts": [
        {
          "amount": "100,00",
          "origin_id": "01AAAM001A1AY43FBR8WCM9CES",
          "status_details": [
            {}
          ],
          "owner": {
            "identification": {
              "number": "1234567890",
              "type": "RUT"
            }
          },
          "bank_id": "0000014",
          "type": "checking_account",
          "number": "123456"
        }
      ]
    },
    "total_amount": 100,
    "statement_descriptor": "test"
  }
}
AttributeDescription
created_dateTransaction creation date. It will be in YYYY-MM-DDTHH:MM:SS.SSSZ format.
external_referenceExternal reference of the transaction, generated by the integrator when creating it.
idAutomatically generated unique transaction identifier.
last_updated_dateLast update of the transaction status. It will be in YYYY-MM-DDTHH:MM:SS.SSSZ format.
point_of_interaction.typePoint of interaction. It is a fix value, always {"type":"PSP_TRANSFER"}.
seller_configuration.notification_info.notification_urlURL where notifications of events related to the transaction, such as status changes, will be received.
statusTransaction status. To learn about possible status, go to Possible transaction status.
transaction.from.accounts.amountAmount debited from the origin Mercado Pago account.
transaction.paid_amountTotal amount charged to the account holder of the origin account. It will be equal to from.accounts.amount, unless there has been a total or partial refund, indicated in refunded_amount.
transaction.payer.idIdentifier of the integrator holding the origin account.
transaction.refunded_amountIn case of a refund, it will indicate the total amount refunded to the account holder of the origin account. If there was no refund, its value will be 0.
transaction.to.accounts.amountAmount transferred to the destination account. Its value will be equal to from.accounts.amount, unless there has been a total or partial refund, the latter indicated in the transaction.refunded_amount field.
transaction.to.accounts.origin_idIdentifier that allows the transaction to be tracked within the banking system.
transaction.to.accounts.amount.status_detailDetailed information about the transaction status. To learn about possible status_detail, refer to Possible transaction status.
transaction.to.accounts.owner.identification.numberdentification number of the holder of the destination account.
transaction.to.accounts.owner.identification.typeType of identification of the destination account holder.
transaction.to.accounts.bank_idIdentification number of the bank to which the destination account belongs.
transaction.to.accounts.typeDestination account type.
transaction.to.accounts.numberUnique number that represents the destination bank account.
transaction.total_amountTotal value of the transaction.
transaction.statement_descriptorAdditional message to the transaction.

Set up notifications

In order to keep track of the status of your transactions, you must configure the Webhook notifications. These are messages sent by the Mercado Pago server in response to events that occur in your application. Specifically for Money Out, these events can be either the creation of a transaction or the status updates that the transaction goes through during its processing.

You can configure your Webhook notifications when creating a transaction by using the notification_url field. Simply fill it with the URL where you want to receive your updates.

You can see examples of the messages you will receive when registering an event below.

- Message for transaction creation.

json

{
  "action": "transaction_intent.created",
  "api_version": "v1",
  "data": {
    "id": "1108917506-01GGTH198RP0K71H133EK9BJAT" // ID of the transaction intent
  },
  "date_created": "2022-11-01T17:19:53.915-04:00",
  "id": "103686924004", // ID of the notification
  "last_updated": "0001-01-01T00:00:00Z",
  "status": "new",
  "type": "transaction_intent"
}

- Message for a transaction update.

json

{
  "action": "transaction_intent.updated",
  "api_version": "v1",
  "data": {
    "id": "1108917506-01GGTH198RP0K71H133EK9BJAT" // ID of the transaction intent
  },
  "date_created": "2022-11-01T17:19:53.915-04:00",
  "id": "103686918006", // ID of the notification
  "last_updated": "2022-11-01T17:19:55.001-04:00",
  "status": "partially_processed",
  "type": "transaction_intent"
}

The data.id attribute corresponds to the ID of the transaction being notified to you, the id parameter will be the identifier of the notification, and status will inform you whether it is the creation of the transaction or the update of its status.

Required actions after receiving the notification

When you receive a notification on your platform, you should first validate the information of the notified resource. To do this, execute the request for Get information about a transaction using the transaction ID that was notified to you.

Once the transaction data is cross-validated and verified, Mercado Pago expects a response to ensure that the notification was received correctly. To do this, you should return an HTTP STATUS 200 (OK) or 201 (CREATED) to the URL sent in the notification_url field. If this response is not sent, it will be understood that you have not received the notification and a new sending attempt will be made until the response is received.

In the following table, you can find the main events, deadlines, and waiting time to receive new notification attempts.

EventDeadline after the first sendingConfirmation waiting time
Sending-22 seconds
First attempt15 minutes5 seconds
Second attempt30 minutes5 seconds
Third attempt6 hours5 seconds
Fourth attempt48 hours5 seconds
Fifth attempt96 hours5 seconds

Get information about a transaction

If you wish, you can retrieve information about a transaction. This can be useful to confirm that it was created correctly, to check its status, or to verify the information received in your notifications.

To do so, send a GET request with your Access Token to the endpoint /v1/transaction-intents/{{transaction_intent_id}}, replacing transaction_intent_id with the ID obtained in the response at the time of creating the transaction.

curl

curl --location --request GET 'https://api.mercadopago.com/v1/transaction-intents/{{transaction_intent_id}}' \
--header 'Authorization: Bearer {{access_token}}'

If the data sent in the call is correct, you will receive a response like the following:

json

{
  "created_date": "2021-01-01T00:00:00.000Z",
  "external_reference": "123456",
  "id": "0d5020ed",
  "last_updated_date": "2021-01-01T00:00:00.000Z",
  "point_of_interaction": {
    "type": "{\"type\":\"PSP_TRANSFER\"}"
  },
  "seller_configuration": {
    "notification_info": {
      "notification_url": "http://example.cl/notification"
    }
  },
  "status": "approved",
  "transaction": {
    "from": {
      "accounts": [
        {
          "amount": "100,00"
        }
      ]
    },
    "paid_amount": 100,
    "payer": {
      "id": 123456543
    },
    "refunded_amount": 1,
    "to": {
      "accounts": [
        {
          "amount": "100,00",
          "origin_id": "01AAAM001A1AY43FBR8WCM9CES",
          "status_details": [
            {}
          ],
          "owner": {
            "identification": {
              "number": "1234567890",
              "type": "RUT"
            }
          },
          "bank_id": "0000014",
          "type": "checking_account",
          "number": "123456"
        }
      ]
    },
    "total_amount": 100,
    "statement_descriptor": "test"
  }
}

To know the details of each returned attribute, refer to the response in the Withdrawals Configuration.

Possible transaction status

When you create a transaction or when you query information related to it, the responses will return two fields that allow you to know the state in which it currently stands.

On one hand, the status field will provide information regarding the current processing status. On the other hand, the status_detail field, found as an attribute of transaction.to.accounts, will allow you to understand the reasons or details that resulted in that status.

Below, you can see all the possible status a transaction can go through during its processing.

statusstatus_detailDescription
processedapprovedThe transaction processing was successful.
approvedpartially_refundedThe transaction was partially refunded by the destination bank.
transaction_in_processpending_authorizedThe transaction is in process, awaiting final status, and awaits authorization.
transaction_in_processpending_bankThe destination bank did not respond, so the transaction is pending final status.
refundedrefundedThe transaction was refunded by the destination bank.
rejectedby_bankThe destination bank rejected the transfer. Please make the request again.
rejectedby_providerThe provider rejected the transfer. Please make the request again.
rejectedhigh_riskThe transaction is rejected due to fraud risk. Please make the request again.
rejectedinsufficient_fundsTransaction rejected due to insufficient funds in the origin account. Please make the request again.
rejectedother_reasonTransaction rejected by default due to internal issues during processing. Please make the request again.
rejectedreview_manualThe transaction is rejected and referred to fraud prevention for analysis. Please make the request again.