GET
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
mandates
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $userId = '146476890 '; 
    
    $response = $api->Users->GetMandates($userId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
[
    {
        "Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ",
        "CreationDate": 1663244376,
        "Status": "FAILED",
        "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
        "ExecutionType": "WEB",
        "MandateType": "DIRECT_DEBIT",
        "Tag": "Created using the Mangopay API Postman collection",
        "ResultCode": "001807",
        "ResultMessage": "User has let the mandate session expire without confirming"
    },
    {
        "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ",
        "CreationDate": 1669040333,
        "Status": "ACTIVE",
        "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
        "ExecutionType": "WEB",
        "MandateType": "DIRECT_DEBIT",
        "Tag": "Created using the Mangopay API Postman collection",
        "ResultCode": "000000",
        "ResultMessage": "Success"
    }
]

Path parameters

UserId
string
required

The unique identifier of the user.

Responses

[
    {
        "Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ",
        "CreationDate": 1663244376,
        "Status": "FAILED",
        "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
        "ExecutionType": "WEB",
        "MandateType": "DIRECT_DEBIT",
        "Tag": "Created using the Mangopay API Postman collection",
        "ResultCode": "001807",
        "ResultMessage": "User has let the mandate session expire without confirming"
    },
    {
        "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ",
        "CreationDate": 1669040333,
        "Status": "ACTIVE",
        "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
        "ExecutionType": "WEB",
        "MandateType": "DIRECT_DEBIT",
        "Tag": "Created using the Mangopay API Postman collection",
        "ResultCode": "000000",
        "ResultMessage": "Success"
    }
]
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $userId = '146476890 '; 
    
    $response = $api->Users->GetMandates($userId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}