> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/card-registrations/view-card-registration/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # View a Card Registration GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations/{CardRegistrationId} View a Card Registration Reference: https://docs.mangopay.com/api-reference/card-registrations/view-card-registration ## 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. - `CardRegistrationId` (string, required) — The unique identifier of the Card Registration object. ## Response ### 200 Success - `Id` (string, optional) — The unique identifier of the Card Registration 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}"`. This value will also be inherited by the Card object's `Tag` parameter and cannot be edited. - `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created. - `UserId` (string, optional) — The unique identifier of the user the card belongs to. - `AccessKey` (string, optional) — The secure value to use when tokenizing the card via the dedicated endpoint. - `PreregistrationData` (string, optional) — The secure value to identify the registration when tokenizing the card via the dedicated endpoint. - `RegistrationData` (string, optional) — The string returned by the tokenization server, which must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. - `CardId` (string, optional) — The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. - `CardType` (string, optional) — **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. - `CardRegistrationURL` (string, optional) — The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. - `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. - `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 card. - `Status` (string, optional) — **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn't be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. ## Examples **Response** ```json { "Id": "cardreg_wt_80b891e6-15f2-4f41-92f6-6e1a4bd85f2c", "Tag": null, "CreationDate": 1726239743, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "AccessKey": "0dEUcnUbQTdNXi3WF4WM", "PreregistrationData": "lW7pQ21Gv8eJh5u4qWUKd8PUVwdHTGBDaBGXeVcQdSjIGJ7HqsEgrWMKFcQlGUPrn6X2n88FG9yZmJa932yIDyK6lpGoNUYyrgeQDsluRU9", "RegistrationData": "data=qc_ShKapgXF-A2t_OC72KsUngOEnxFTIhI4U9nqKay8J_UGfLFelDx_8GUFWt5zp8HH5DRSTnhLZ_RIB_OJ35ZsP3bOVmF1YdoePYUxf8CWOxMdP0Uc0Rm6ABJRWHIWYn7Rs6J2udgLD-WrTkZpRtw", "CardId": "card_m_GhrYYFpBoNeXXRFx", "CardType": "CB_VISA_MASTERCARD", "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiRU50VVhTc2RhSUpBVUJ6VCJ9", "ResultCode": "000000", "ResultMessage": "Success", "Currency": "EUR", "Status": "VALIDATED" } ``` **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 CardRegistration card_registration = CardRegistration( id = '213600973' ) try: view_card_registration = CardRegistration.get(card_registration.id) pprint(vars(view_card_registration)) except CardRegistration.DoesNotExist: print('Card registration {} does not exist.'.format(view_card_registration.id)) ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let userCardRegistration = { Id: 'cardreg_m_01HRETW28RKJFC8RB9H625RVBD', } const viewCardRegistration = async (cardRegistrationId) => { return await mangopay.CardRegistrations.get(cardRegistrationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewCardRegistration(userCardRegistration.Id) ``` ```java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardRegistration; public class ViewCardRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String cardRegId = "cardreg_m_01HXY9VZN4J1TERYG1BNPDHENN"; CardRegistration viewCardRegistration = mangopay.getCardRegistrationApi().get(cardRegId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCardRegistration); System.out.println(prettyJson); } } ``` ```csharp using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; 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 cardRegistrationId = "cardreg_m_01J2Y3ZTFTZSKB5XWAKCNMPWFC"; var viewCardRegistration = await api.CardRegistrations.GetAsync(cardRegistrationId); string prettyPrint = JsonConvert.SerializeObject(viewCardRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ```php Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardRegistrationId = '192900791'; $response = $api->CardRegistrations->Get($cardRegistrationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } 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 viewCardRegistration(cardRegistrationId) begin response = MangoPay::CardRegistration.fetch(cardRegistrationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Card Registration: #{error.message}" puts "Error details: #{error.details}" return false end end myCardRegistration = { Id: '195067583' } viewCardRegistration(myCardRegistration[:Id]) ```