const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: "your-client-id",
clientApiKey: "your-api-key",
})
let myCard = {
Id: 'card_m_01HRAB5X7K39MDNS5NV6DD68G8'
}
let myCardValidation = {
Id: '5b0ab172-e1fd-47d7-a1f8-d674986630d2'
}
const viewCardValidation = async (cardValidationId) => {
return await mangopay.Cards.getCardValidation(myCard.Id, cardValidationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewCardValidation(myCardValidation.Id)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.CardValidation;
public class ViewCardValidation {
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 cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB";
String cardValidationId = "68230c33-fcf7-486a-9275-74c9e6064968";
CardValidation viewCardValidation = mangopay.getCardApi().getCardValidation(cardId, cardValidationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewCardValidation);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4";
var cardValidationId = "a5309b17-0455-45cb-9f94-061784604bd3";
var viewCardValidation = await api.Cards.GetCardValidationAsync(cardId, cardValidationId);
string prettyPrint = JsonConvert.SerializeObject(viewCardValidation, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"AuthorId": "user_m_01KHRMAQT1ZPVBWK2KYM6S0N7M",
"Status": "SUCCEEDED",
"SecureModeReturnURL": "http://example.com?cardValidationId=wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"SecureModeRedirectURL": null,
"SecureModeNeeded": true,
"IpAddress": "466b:ed49:0966:f7fe:1e09:d7de:4e24:b612",
"BrowserInfo": {
"AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
"JavaEnabled": true,
"Language": "fr",
"ColorDepth": 32,
"ScreenHeight": 667,
"ScreenWidth": 375,
"TimeZoneOffset": -120,
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"JavascriptEnabled": true
},
"PreferredCardNetwork": null,
"SecureMode": "DEFAULT",
"PaymentCategory": "ECommerce",
"Type": "CARD_VALIDATION",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"ValidationUsage": "MIT",
"Validity": "VALID",
"CreationDate": 1771580513,
"Applied3DSVersion": "V2_1",
"ResultCode": "000000",
"ResultMessage": "Success",
"Tag": "Created using the Mangopay API Postman collection",
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"SubType": null,
"Brand": "VISA"
},
"AuthenticationResult": {
"AuthenticationType": "CHALLENGE"
}
}
Card validations
View a Card Validation
GET
/
V2.01
/
{ClientId}
/
cards
/
{CardId}
/
validation
/
{ValidationId}
const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: "your-client-id",
clientApiKey: "your-api-key",
})
let myCard = {
Id: 'card_m_01HRAB5X7K39MDNS5NV6DD68G8'
}
let myCardValidation = {
Id: '5b0ab172-e1fd-47d7-a1f8-d674986630d2'
}
const viewCardValidation = async (cardValidationId) => {
return await mangopay.Cards.getCardValidation(myCard.Id, cardValidationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewCardValidation(myCardValidation.Id)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.CardValidation;
public class ViewCardValidation {
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 cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB";
String cardValidationId = "68230c33-fcf7-486a-9275-74c9e6064968";
CardValidation viewCardValidation = mangopay.getCardApi().getCardValidation(cardId, cardValidationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewCardValidation);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4";
var cardValidationId = "a5309b17-0455-45cb-9f94-061784604bd3";
var viewCardValidation = await api.Cards.GetCardValidationAsync(cardId, cardValidationId);
string prettyPrint = JsonConvert.SerializeObject(viewCardValidation, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"AuthorId": "user_m_01KHRMAQT1ZPVBWK2KYM6S0N7M",
"Status": "SUCCEEDED",
"SecureModeReturnURL": "http://example.com?cardValidationId=wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"SecureModeRedirectURL": null,
"SecureModeNeeded": true,
"IpAddress": "466b:ed49:0966:f7fe:1e09:d7de:4e24:b612",
"BrowserInfo": {
"AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
"JavaEnabled": true,
"Language": "fr",
"ColorDepth": 32,
"ScreenHeight": 667,
"ScreenWidth": 375,
"TimeZoneOffset": -120,
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"JavascriptEnabled": true
},
"PreferredCardNetwork": null,
"SecureMode": "DEFAULT",
"PaymentCategory": "ECommerce",
"Type": "CARD_VALIDATION",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"ValidationUsage": "MIT",
"Validity": "VALID",
"CreationDate": 1771580513,
"Applied3DSVersion": "V2_1",
"ResultCode": "000000",
"ResultMessage": "Success",
"Tag": "Created using the Mangopay API Postman collection",
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"SubType": null,
"Brand": "VISA"
},
"AuthenticationResult": {
"AuthenticationType": "CHALLENGE"
}
}
Path parameters
string
required
The unique identifier of the Card object, obtained during the card registration process.
string
The unique identifier of the Card Validation object.
Responses
200 - Response parameters
200 - Response parameters
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the user at the source of the transaction.
string
Returned values:
CREATED, SUCCEEDED, FAILEDThe status of the transaction.string
Max. length: 255 charactersThe URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the
SecureModeNeeded parameter is set to true).string
Max. length: 255 charactersThe URL to which to redirect the user to proceed to 3DS2 validation.
boolean
Whether or not the
SecureMode was used.string
The IP address of the end user initiating the transaction, in IPV4 or IPV6 format.
object
Information about the browser used by the end user (author) to perform the payment.
Show properties
Show properties
string
The exact content of the HTTP accept headers as sent to the platform from the end user’s browser.
boolean
Whether or not the end user’s browser has the ability to execute Java.
string
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example:
en-US; pattern:^[a-zA-Z]{2}(-[a-zA-Z]{2})?$)The language of the browser.integer
The value representing the depth of the screen’s color palette for displaying images, in bits per pixel.
integer
Max. length: 6 charactersThe height of the screen in pixels.
integer
Max. length: 6 charactersThe width of the screen in pixels.
integer
The difference in minutes between the browser’s timezone and UTC.
string
Max. length: 255 charactersThe exact content of the HTTP User-Agent header.
boolean
Whether or not the end user’s browser has the ability to execute JavaScript.
string
Returned values:
VISA, MASTERCARD, CB, MAESTROThe card network to use, as chosen by the cardholder, in case of co-branded cards.string
Default value: DEFAULT
Allowed values: DEFAULT, FORCE, NO_CHOICEThe mode applied for the 3DS protocol for CB, Visa, and Mastercard. The options are:
Allowed values: DEFAULT, FORCE, NO_CHOICEThe mode applied for the 3DS protocol for CB, Visa, and Mastercard. The options are:
DEFAULT– Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer.FORCE– Requests SCA.NO_CHOICE– Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA.
string
Default value: MIT
Allowed values: MIT, CITIndicates the intended usage of the card:
Allowed values: MIT, CITIndicates the intended usage of the card:
- CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation.
- MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation.
string
Returned values:
UNKNOWN, VALID, INVALIDWhether the card is valid or not.UNKNOWN– No payment or card validation has been processed, so the validity of the card remains unknown.VALID– The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration.INVALID– The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration wasCREATEDfor more than 24 hours.
Once a card is set toINVALID, it cannot be set back toVALID. A new card registration will be necessary to make a payment.
Unix timestamp
The date and time at which the object was created.
string
Returned values:
CARD_VALIDATIONThe type of the card validation.string | null
Returned values:
V1, V2_1The 3DS protocol version applied to the transaction.string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
string
The explanation of the result code.
string
Max. length: 255 charactersCustom data that you can add to this object.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
string
Information about the card used for the transaction.If the information or data is not available,
null is returned.Show properties
Show properties
string
The 6-digit bank identification number (BIN) of the card issuer.
string
The name of the card issuer.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country where the card was issued.
string
Returned values:
DEBIT, CREDIT, CHARGE CARD.The type of card product.string
The card brand. Examples include:
AMERICAN EXPRESS, DISCOVER, JCB, MASTERCARD, VISA, etc.Note: The possible returned values are numerous and liable to evolve over time.string
The subtype of the card product. Examples include:
CLASSIC, GOLD, PLATINUM, PREPAID, etc.Note: The possible returned values are numerous and liable to evolve over time.object | null
Information about the authentication result, based on the request made by Mangopay and the decision of the issuer regarding the type of authentication to be enforced (if applicable).
Show properties
Show properties
string | null
Response values:
CHALLENGE, FRICTIONLESS, DIRECT_AUTHORIZATIONThe type of authentication:CHALLENGE– The issuer requested SCA to be enforced (for example, using 3DS).FRICTIONLESS– The transaction was exempted from SCA because an exemption was granted by the issuer.DIRECT_AUTHORIZATION– The transaction was sent to the issuer for authorization without any frictionless or challenge (for example, if SCA doesn’t apply).
null value typically indicates that authentication was not requested (for example, because the request failed before being sent) or a decision was not received.{
"Id": "wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"AuthorId": "user_m_01KHRMAQT1ZPVBWK2KYM6S0N7M",
"Status": "SUCCEEDED",
"SecureModeReturnURL": "http://example.com?cardValidationId=wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
"SecureModeRedirectURL": null,
"SecureModeNeeded": true,
"IpAddress": "466b:ed49:0966:f7fe:1e09:d7de:4e24:b612",
"BrowserInfo": {
"AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
"JavaEnabled": true,
"Language": "fr",
"ColorDepth": 32,
"ScreenHeight": 667,
"ScreenWidth": 375,
"TimeZoneOffset": -120,
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"JavascriptEnabled": true
},
"PreferredCardNetwork": null,
"SecureMode": "DEFAULT",
"PaymentCategory": "ECommerce",
"Type": "CARD_VALIDATION",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"ValidationUsage": "MIT",
"Validity": "VALID",
"CreationDate": 1771580513,
"Applied3DSVersion": "V2_1",
"ResultCode": "000000",
"ResultMessage": "Success",
"Tag": "Created using the Mangopay API Postman collection",
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"SubType": null,
"Brand": "VISA"
},
"AuthenticationResult": {
"AuthenticationType": "CHALLENGE"
}
}
const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: "your-client-id",
clientApiKey: "your-api-key",
})
let myCard = {
Id: 'card_m_01HRAB5X7K39MDNS5NV6DD68G8'
}
let myCardValidation = {
Id: '5b0ab172-e1fd-47d7-a1f8-d674986630d2'
}
const viewCardValidation = async (cardValidationId) => {
return await mangopay.Cards.getCardValidation(myCard.Id, cardValidationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewCardValidation(myCardValidation.Id)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.CardValidation;
public class ViewCardValidation {
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 cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB";
String cardValidationId = "68230c33-fcf7-486a-9275-74c9e6064968";
CardValidation viewCardValidation = mangopay.getCardApi().getCardValidation(cardId, cardValidationId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewCardValidation);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4";
var cardValidationId = "a5309b17-0455-45cb-9f94-061784604bd3";
var viewCardValidation = await api.Cards.GetCardValidationAsync(cardId, cardValidationId);
string prettyPrint = JsonConvert.SerializeObject(viewCardValidation, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?