> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/transactions/list-transactions-user/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # List Transactions for a User GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/users/{UserId}/transactions This call returns transactions with the same `AuthorId`. **Note – ScaContext default value is USER\_PRESENT** On this endpoint, the default value for `ScaContext` is `USER_PRESENT`. If the `PendingUserAction.RedirectUrl` value is returned, you need to redirect the user to perform SCA. With approval from Mangopay, your platform may be able to use the `USER_NOT_PRESENT` value provided you also have a legal proxy in place with the user and the user's consent to access wallet balances and transactions on their behalf (read more about [proxy management](/guides/sca/proxy-management)). **Note – SCA triggered by this endpoint** This endpoint requires the user to [perform SCA to authenticate](/guides/sca/wallets) the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (or unless your platform is using a [proxy and user consent](/guides/sca/proxy-management)). When SCA is required, this endpoint returns a **401 - Unauthorized** response (see [errors below](#response.error) for details). 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](/guides/sca/session) guide. In Sandbox, you can bypass SCA by including the word `accept` in the `Email` value of the [Natural User](/api-reference/users/natural-user-object-sca) or the `LegalRepresentative.Email` value of the [Legal User](/api-reference/users/legal-user-object-sca) – for example `accept@example.com` or `john.doe+accept@example.com`. Reference: https://docs.mangopay.com/api-reference/transactions/list-transactions-user ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. - `UserId` (string, required) — The unique identifier of the user. ### Query parameters - `ScaContext` (string, optional) — **Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT` The SCA context of the request, which is **required** if the user's `UserCategory` is `OWNER`: - `USER_PRESENT` – The user is taking the SCA-triggering action of accessing their wallet. The platform must [redirect the user](/guides/sca/session) using the `PendingUserAction.RedirectUrl` returned so that the user can complete the SCA session (unless exempted because a successful SCA session for wallet access occurred in the last 180 days, so no redirection link was returned). - `USER_NOT_PRESENT` – The platform is taking the action under proxy from the user and the user has previously given consent to Mangopay (via the SCA hosted experience) to allow the action. If the user has not given (or has revoked) their consent, then `USER_NOT_PRESENT` returns a 403 error. Read more about [managing proxy and user consent](/guides/sca/proxy-management) **→** **Note:** For existing platforms, the parameter is technically optional if the User is an `OWNER`, and the default value will become `USER_PRESENT` from **Dec 15, 2025** (Dec 1 in Sandbox) - `Sort` (string, optional) — **Possible values:** `CreationDate:ASC`, `CreationDate:DESC` **Default value:** `CreationDate:ASC` Indicates the direction in which to sort the list. - `per_page` (integer, optional) — Min. value: `1`; max. value: `100` **Default value:** `10` Indicates the number of items returned for each page of the pagination. - `page` (integer, optional) — Start value: `1` **Default value:** `1` Indicates the index of the page for the pagination. - `Status` (string, optional) — **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. - `ResultCode` (string, optional) — The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. - `BeforeDate` (integer, optional) — 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` (integer, optional) — 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, optional) — **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, optional) — **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. ## Response ### 200 Success - `Array (Transactions)` (list of ListTransactionsResponseArrayTransactionsItems, optional) — The list of transactions created by the platform. ## Errors ### 401 Unauthorized Error SCA required to retrieve data because no successful SCA session for wallet access occurred in the last 180 days. In this case, the user needs to authenticate the action. The 401 response includes a `WWW-Authenticate` header with the `RedirectUrl` value needed. - `any` ## Types ### ListTransactionsResponseArrayTransactionsItems - `Object (transaction)` (TransactionResponse, optional) ### TransactionResponse - `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object. - `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`. - `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created. - `AuthorId` (string, optional) — The unique identifier of the user at the source of the transaction. - `CreditedUserId` (string, optional) — **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. - `DebitedFunds` (TransactionResponseDebitedFunds, optional) — Information about the debited funds. - `CreditedFunds` (TransactionResponseCreditedFunds, optional) — Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). - `Fees` (TransactionResponseFees, optional) — Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). - `Status` (string, optional) — **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. - `ResultCode` (string, optional) — The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. - `ResultMessage` (string, optional) — The explanation of the result code. - `ExecutionDate` (integer, optional) — Unix timestamp (UTC) of the date and time the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. - `Type` (string, optional) — **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. - `Nature` (string, optional) — **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: - `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. - `REPUDIATION` – Automatic withdrawal of funds from the platform's repudiation wallet as part of the dispute process (when the user has requested a chargeback). - `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). - `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. - `CreditedWalletId` (string, optional) — The unique identifier of the credited wallet. - `DebitedWalletId` (string, optional) — The unique identifier of the debited wallet. ### TransactionResponseDebitedFunds Information about the debited funds. - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### TransactionResponseCreditedFunds Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### TransactionResponseFees Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ## Examples **Response** ```json [ { "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreationDate": 1711103498, "CreditedFunds": { "Amount": 6732, "Currency": "EUR" }, "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedWalletId": "wlt_m_01HSDQGSRYK3CXPA5RBJ08R2XJ", "DebitedFunds": { "Amount": 6732, "Currency": "EUR" }, "DebitedWalletId": null, "DepositId": null, "ExecutionDate": 1711103498, "Fees": { "Amount": 0, "Currency": "EUR" }, "Id": "payin_m_01HSJVEP9KCCQK6FKC7973B3TZ", "Nature": "REGULAR", "ResultCode": "000000", "ResultMessage": "Success", "Status": "SUCCEEDED", "Tag": "Created using the Mangopay API Postman collection", "Type": "PAYIN" } ] ``` **SDK Code** ```python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Transaction from mangopay.exceptions import APIError user_id = '146476890' try: transactions = Transaction.all(user_id=user_id, ScaContext='USER_PRESENT') for transaction in transactions: pprint(transaction._data) except APIError as ex: redirect_url = ex.headers.get('www-authenticate', '').partition('RedirectUrl=')[2] print(redirect_url) ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const getRedirectUrl = (err) => { const authenticate = err.headers?.['www-authenticate'] || '' const match = authenticate.match(/RedirectUrl=([^\s]+)/) return match ? match[1] : null } const listUserTransactions = async (userId) => { return await mangopay.Users.getTransactions(userId, { parameters: { ScaContext: 'USER_PRESENT' }, resolveWithFullResponse: true, }) .then((response) => { console.info(response.body) return response }) .catch((err) => { console.log(getRedirectUrl(err)) return false }) } listUserTransactions('146476890') ``` ```java import com.mangopay.MangoPayApi; import com.mangopay.core.FilterTransactions; import com.mangopay.core.ResponseException; import com.mangopay.entities.Transaction; public class ListUserTransactions { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; FilterTransactions filter = new FilterTransactions(); filter.setScaContext("USER_PRESENT"); try { List transactions = mangopay.getUserApi().getTransactions(userId, null, filter, null); for (Transaction transaction : transactions) { System.out.println(transaction); } } catch (ResponseException e) { System.out.println(e.getData().get("RedirectUrl")); } } } ``` ```csharp using MangoPay.SDK; using MangoPay.SDK.Core; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var filter = new FilterTransactions { ScaContext = "USER_PRESENT" }; try { var viewTransactions = await api.Users.GetTransactionsAsync(userId, new Pagination(1, 100), filter, new Sort()); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } catch (ResponseException ex) { Console.WriteLine(ex.ResponseError.Data["RedirectUrl"]); } } } ``` ```php Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $filter = new \MangoPay\FilterTransactions(); $filter->ScaContext = 'USER_PRESENT'; $response = $api->Users->GetTransactions($userId, $pagination = null, $filter); print_r($response); } catch(MGPResponseException $e) { print_r($e->GetErrorDetails()->Data['RedirectUrl']); } catch(MGPException $e) { print_r($e); } ``` ```ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransactionsUser(userId) begin response = MangoPay::User.transactions(userId, {'ScaContext': 'USER_PRESENT'}) puts response return response rescue MangoPay::ResponseError => error puts error.details['RedirectUrl'] return false end end listTransactionsUser('146476890') ```