GET
/
v2.01
/
{ClientId}
/
wallets
/
{WalletId}
/
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 {
    $walletId = '148968396';

    $response = $api->Wallets->GetTransactions($walletId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
[
    {
        "Id": "xfer_m_01J8F1J0KBFTRP5CMYMFFTG4W4",
        "Tag": "Created using Mangopay API Postman Collection",
        "CreationDate": 1727081808,
        "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "DebitedFunds": {
            "Currency": "EUR",
            "Amount": 500
        },
        "CreditedFunds": {
            "Currency": "EUR",
            "Amount": 490
        },
        "Fees": {
            "Currency": "EUR",
            "Amount": 10
        },
        "Status": "SUCCEEDED",
        "ResultCode": "000000",
        "ResultMessage": "Success",
        "ExecutionDate": 1727081809,
        "Type": "TRANSFER",
        "Nature": "REGULAR",
        "CreditedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9",
        "DebitedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1",
        "DepositId": null
    },
    {
        "Id": "refund_m_01J8F1JZ6XCEFCZ71W34N9DWRR",
        "Tag": "Created using Mangopay API Postman Collection",
        "CreationDate": 1727081839,
        "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "CreditedUserId": null,
        "DebitedFunds": {
            "Currency": "EUR",
            "Amount": 490
        },
        "CreditedFunds": {
            "Currency": "EUR",
            "Amount": 500
        },
        "Fees": {
            "Currency": "EUR",
            "Amount": -10
        },
        "Status": "SUCCEEDED",
        "ResultCode": "000000",
        "ResultMessage": "Success",
        "ExecutionDate": 1727081840,
        "Type": "TRANSFER",
        "Nature": "REFUND",
        "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1",
        "DebitedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9",
        "DepositId": null
    }
]

This call returns the transactions (pay-in, transfers, conversions, and payouts) of a given wallet.

Note – SCA triggered by this endpoint

This endpoint requires the user to complete SCA to authenticate the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (read more about SCA on wallet access).

When SCA is required, this endpoint returns a 401 - Unauthorized response.

To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the RedirectUrl from the WWW-Authenticate response header, add an encoded returnUrl query parameter, and redirect the user. Read more about how to redirect them in the SCA session guide.

Path parameters

WalletId
string
required

The unique identifier of the wallet.

Query parameters

ScaContext
string

Possible values: USER_PRESENT, USER_NOT_PRESENT

Default value: null

The SCA context of the request, which should be considered required if the user’s UserCategory is OWNER:

  • USER_PRESENT – The user is initiating the wallet access request and is actively present. The platform must redirect the user for SCA using the PendingUserAction.RedirectUrl returned, unless a successful SCA session for wallet access occurred in the last 180 days.
  • USER_NOT_PRESENT – No user is present: the access is automated by the platform as part of their declared and authorized workflow. On these requests, SCA redirection is not initially required, but in future Mangopay may be required to override the request.

Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.

Note: ScaContext is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send USER_PRESENT by default. Read more about SCA on wallet access

Status
string

Allowed values: CREATED, SUCCEEDED, FAILED

The 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
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
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, PAYOUT

The type of the transaction. You can filter on multiple values by separating them with a comma.

Nature
string

Allowed values: REGULAR, REPUDIATION, REFUND, SETTLEMENT

The 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": "xfer_m_01J8F1J0KBFTRP5CMYMFFTG4W4",
        "Tag": "Created using Mangopay API Postman Collection",
        "CreationDate": 1727081808,
        "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "DebitedFunds": {
            "Currency": "EUR",
            "Amount": 500
        },
        "CreditedFunds": {
            "Currency": "EUR",
            "Amount": 490
        },
        "Fees": {
            "Currency": "EUR",
            "Amount": 10
        },
        "Status": "SUCCEEDED",
        "ResultCode": "000000",
        "ResultMessage": "Success",
        "ExecutionDate": 1727081809,
        "Type": "TRANSFER",
        "Nature": "REGULAR",
        "CreditedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9",
        "DebitedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1",
        "DepositId": null
    },
    {
        "Id": "refund_m_01J8F1JZ6XCEFCZ71W34N9DWRR",
        "Tag": "Created using Mangopay API Postman Collection",
        "CreationDate": 1727081839,
        "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
        "CreditedUserId": null,
        "DebitedFunds": {
            "Currency": "EUR",
            "Amount": 490
        },
        "CreditedFunds": {
            "Currency": "EUR",
            "Amount": 500
        },
        "Fees": {
            "Currency": "EUR",
            "Amount": -10
        },
        "Status": "SUCCEEDED",
        "ResultCode": "000000",
        "ResultMessage": "Success",
        "ExecutionDate": 1727081840,
        "Type": "TRANSFER",
        "Nature": "REFUND",
        "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1",
        "DebitedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9",
        "DepositId": 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 {
    $walletId = '148968396';

    $response = $api->Wallets->GetTransactions($walletId);

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