MercadoPago Balance Consultation

1

Someone knows if there is an API developed to show the MercadoPago balance There is no information on link Thanks!

    
asked by Martin Gentile 05.07.2017 в 18:26
source

2 answers

2

In the developers page you will find the following information to be able to consult your balance in the Mercado Pago account: See Documentation .

  

How does it work?

     

You can request information, for example about a payment or the balance of   your account, using HTTP (similar to a browser).

     

For example: "I want to know the balance of my account."

     

For that, you should go to:

     

https://api.mercadopago.com/users/TU_ID_DE_USUARIO/mercadopago_account/balance?access_token=TU_TOKEN_DE_ACCESO

     

And you will receive an answer like this:

{
    "user_id": TU_ID_DE_USUARIO,
    "total_amount": 1000,
    "available_balance": 1000,
    .
    .
    . }
    
answered by 07.07.2017 в 21:08
0

It's very simple: First you need your client_id and client_secret, you get it from here:

link

Then you ask for the balance data and filter what you want:

<?php

require_once ('../mercadopago/mercadopago.php');

$mp = new MP ("Client_ID", "Client_Secrt");

$balance = $mp->get ("/users/TU_ID_USUARIO/mercadopago_account/balance");

$balence = json_encode($balance);

echo "Total ML: ".$balance['response']['total_amount'];
echo "<br>Disponible: ".$balance['response']['available_balance'];
echo "<br>Pendiente: ".$balance['response']['unavailable_balance'];

?>
    
answered by 18.07.2017 в 19:52