> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/wallets/list-wallets-user/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # List Wallets for a User GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/users/{UserId}/wallets Retrieve wallets based on `UserId`. **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/wallets/list-wallets-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) - `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. - `Sort` (string, optional) — **Possible values:** `CreationDate:ASC`, `CreationDate:DESC` **Default value:** `CreationDate:ASC` Indicates the direction in which to sort the list. ## Response ### 200 Success - `Array (Wallets)` (list of ListWalletsForAUserResponseArrayWalletsItems, optional) — The list of wallets 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 ### ListWalletsForAUserResponseArrayWalletsItems - `Object (Wallet)` (ListWalletsForAUserResponseArrayWalletsItemsObjectWallet, optional) — The Wallet object created by the platform. ### ListWalletsForAUserResponseArrayWalletsItemsObjectWallet The Wallet object created by the platform. - `Description` (string, optional) — The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). - `Owners` (list of string, optional) — The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. - `Balance` (ListWalletsForAUserResponseArrayWalletsItemsObjectWalletBalance, optional) — The current balance of the wallet. - `Currency` (string, optional) — **Returned 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 wallet. - `FundsType` (string, optional) — **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: - `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. - `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. - `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. - `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 wallet was created. ### ListWalletsForAUserResponseArrayWalletsItemsObjectWalletBalance The current balance of the 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 [ { "Balance": { "Amount": 99800, "Currency": "EUR" }, "CreationDate": 1719348029, "Currency": "EUR", "Description": "Description of the user's wallet", "FundsType": "DEFAULT", "Id": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Tag": "Created using Mangopay API Postman Collection" }, { "Balance": { "Amount": 0, "Currency": "GBP" }, "CreationDate": 1724921476, "Currency": "GBP", "Description": "Description of the user's wallet", "FundsType": "DEFAULT", "Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Tag": "Created using Mangopay API Postman Collection" } ] ``` **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 Wallet from mangopay.exceptions import APIError user_id = '213753890' try: wallets = Wallet.all(user_id=user_id, ScaContext='USER_PRESENT') for wallet in wallets: pprint(vars(wallet)) 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 listUserWallets = async (userId) => { return await mangopay.Users.getWallets(userId, { parameters: { ScaContext: 'USER_PRESENT' }, resolveWithFullResponse: true, }) .then((response) => { console.info(response.body) return response }) .catch((err) => { console.log(getRedirectUrl(err)) return false }) } listUserWallets('146476890') ``` ```java import com.mangopay.MangoPayApi; import com.mangopay.core.FilterWallets; import com.mangopay.core.ResponseException; import com.mangopay.entities.Wallet; public class ListUserWallets { 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_01HSAVT2J0REPGV5ZRPNK079K9"; FilterWallets filter = new FilterWallets().setScaContext("USER_PRESENT"); try { List wallets = mangopay.getUserApi().getWallets(userId, null, filter, null); for (Wallet wallet : wallets) { System.out.println(wallet); } } 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 FilterWallets { ScaContext = "USER_PRESENT" }; try { var wallets = await api.Users.GetWalletsAsync(userId, new Pagination(1, 10), filter); string prettyPrint = JsonConvert.SerializeObject(wallets, 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\FilterWallets(); $filter->ScaContext = 'USER_PRESENT'; $response = $api->Users->GetWallets($userId, $pagination = null, $sorting = 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 listUserWallets(userId) begin response = MangoPay::User.wallets(userId, {'ScaContext': 'USER_PRESENT'}) puts response return response rescue MangoPay::ResponseError => error puts error.details['RedirectUrl'] return false end end listUserWallets('146476890') ```