> 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/view-wallet/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # View a Wallet GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/wallets/{WalletId} Retrieve a wallet by its `Id`. **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/view-wallet ## 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. - `WalletId` (string, required) — The unique identifier of the wallet. ### 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) ## Response ### 200 Success - `Description` (string, optional) — Max. length: 255 characters 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. - `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object. - `Balance` (UserWalletResponseBalance, optional) — 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 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. - `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. ## 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 ### UserWalletResponseBalance 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 { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "Balance": { "Currency": "EUR", "Amount": 99800 }, "Currency": "EUR", "FundsType": "DEFAULT", "Tag": "Created using Mangopay API Postman collection", "CreationDate": 1719348029 } ``` **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 wallet_id = '148968396' try: view_wallet = Wallet.get(wallet_id, ScaContext='USER_PRESENT') pprint(vars(view_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 viewWallet = async (walletId) => { return await mangopay.Wallets.get(walletId, { parameters: { ScaContext: 'USER_PRESENT' }, resolveWithFullResponse: true, }) .then((response) => { console.info(response.body) return response }) .catch((err) => { console.log(getRedirectUrl(err)) return false }) } viewWallet('148968396') ``` ```java import com.mangopay.MangoPayApi; import com.mangopay.core.ResponseException; import com.mangopay.entities.Wallet; public class ViewWallet { 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 walletId = "wlt_m_01HSV2W1JYHZQMW24EWREKEN62"; try { Wallet wallet = mangopay.getWalletApi().get(walletId, "USER_PRESENT"); System.out.println(wallet); } catch (ResponseException e) { System.out.println(e.getData().get("RedirectUrl")); } } } ``` ```csharp using MangoPay.SDK; using MangoPay.SDK.Core; 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 walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT"; try { var viewWallet = await api.Wallets.GetAsync(walletId, "USER_PRESENT"); string prettyPrint = JsonConvert.SerializeObject(viewWallet, 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 { $walletId = '193572861'; $response = $api->Wallets->Get($walletId, 'USER_PRESENT'); 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 viewWallet(walletId) begin response = MangoPay::Wallet.fetch(walletId, nil, {'ScaContext': 'USER_PRESENT'}) puts response return response rescue MangoPay::ResponseError => error puts error.details['RedirectUrl'] return false end end viewWallet('194311640') ```