GET
/
v2.01
/
{ClientId}
/
cards
/
{CardId}
/
transactions
<?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 {
    $cardId = '156285393';

    $response = $api->Cards->GetTransactions($cardId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
[
    {
        "Id":"145498191",
        "Tag":"Custom meta",
        "CreationDate":1657175185,
        "AuthorId":"145494935",
        "CreditedUserId":"145397183",
        "DebitedFunds":{
            "Currency":"EUR",
            "Amount":1200
        },
        "CreditedFunds":{
            "Currency":"EUR",
            "Amount":1100
        },
        "Fees":{
            "Currency":"EUR",
            "Amount":10
        },
        "Status":"SUCCEEDED",
        "ResultCode":"000000",
        "ResultMessage":"Success",
        "ExecutionDate":1661859994,
        "Type":"PAYIN",
        "Nature":"REGULAR",
        "CreditedWalletId":"145397873",
        "DebitedWalletId":null
    }
]  

This call returns all the transactions of a given card.

Path parameters

CardId
string
required
The unique identifier of the Card object, obtained during the card registration process.

Query parameters

Status
string
Allowed values: CREATED, SUCCEEDED, FAILEDThe status of the transaction. You can filter on multiple values by separating them with a comma.
ResultCode
string
The code indicating the result of the operation. You can filter on multiple values by separating them with a comma.
BeforeDate
Unix timestamp
The date before which the transaction was created (based on the transaction’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.
AfterDate
Unix timestamp
The date after which the transaction was created (based on the transaction’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.
Type
string
Allowed values: PAYIN, TRANSFER, CONVERSION, PAYOUTThe type of the transaction. You can filter on multiple values by separating them with a comma.
Nature
string
Allowed values: REGULAR, REPUDIATION, REFUND, SETTLEMENTThe nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma.

Responses

[
    {
        "Id":"145498191",
        "Tag":"Custom meta",
        "CreationDate":1657175185,
        "AuthorId":"145494935",
        "CreditedUserId":"145397183",
        "DebitedFunds":{
            "Currency":"EUR",
            "Amount":1200
        },
        "CreditedFunds":{
            "Currency":"EUR",
            "Amount":1100
        },
        "Fees":{
            "Currency":"EUR",
            "Amount":10
        },
        "Status":"SUCCEEDED",
        "ResultCode":"000000",
        "ResultMessage":"Success",
        "ExecutionDate":1661859994,
        "Type":"PAYIN",
        "Nature":"REGULAR",
        "CreditedWalletId":"145397873",
        "DebitedWalletId":null
    }
]  

<?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 {
    $cardId = '156285393';

    $response = $api->Cards->GetTransactions($cardId);

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