Skip to main content
POST
/
v2.01
/
{ClientId}
/
payment-methods
/
metadata
const mangopayInstance = require('mangopay2-nodejs-sdk');
const mangopay = new mangopayInstance({
    clientId: "your-client-id",
    clientApiKey: "your-api-key",
})

let paymentMethod = {
  Type: 'BIN',
  Bin: '540006'
}

const getMetadata = async (paymentMethod) => {
  return await mangopay.PayIns.getPaymentMethodMetadata(paymentMethod)
    .then((response) => {
      console.info(response)
      return response
    })
    .catch((err) => {
      console.log(err)
      return false
    })
}

getMetadata(paymentMethod)  
{
    "Type": "BIN",
    "Bin": "540006",
    "IssuerCountryCode": "US",
    "IssuingBank": "FIRST NATIONAL BANK OF OMAHA",
    "BinData": [
        {
            "CardType": "CREDIT",
            "CommercialIndicator": "PERSONAL",
            "Subtype": "MIXED PRODUCT",
            "Brand": "MASTERCARD"
        }
    ]
}  

Body parameters

Type
string
required
Allowed values: BIN, GOOGLE_PAYThe type of metadata.
Bin
string
Format: 6 or 8 digitsRequired if the Type is BIN.The bank identification number (BIN).
Token
string
Required if the Type is GOOGLE_PAY.The tokenized payment data provided by the third-party payment method.

Responses

Type
string
The type of metadata.
Bin
string
Format: 6 or 8 digitsThe bank identification number (BIN).
IssuerCountryCode
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country where the card was issued.
IssuingBank
string
The name of the card issuer.
BinData
array
objectAdditional data about the card based on the BIN. In the case of co-branded card products, two objects are returned.
Type
string
The type of metadata.
Bin
string
Format: 6 or 8 digitsThe bank identification number (BIN).
IssuerCountryCode
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country where the card was issued.
IssuingBank
string
The name of the card issuer.
BinData
array
objectAdditional data about the card based on the BIN. In the case of co-branded card products, two objects are returned.
Type
string
The type of metadata.
Bin
string
Format: 6 or 8 digitsThe bank identification number (BIN).
IssuerCountryCode
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country where the card was issued.
IssuingBank
string
The name of the card issuer.
BinData
array
objectAdditional data about the card based on the BIN. In the case of co-branded card products, two objects are returned.
Type
string
The type of metadata.
TokenFormat
string
Returned values: PAN_ONLY, CRYPTOGRAM_3DSIn the case of Google Pay, the format of the Token.
  • PAN_ONLY – The card is registered in the Google account and requires 3DS authentication.
  • CRYPTOGRAM_3DS – The card is enrolled in the customer’s Google Wallet and authentication is handled by the Android device.
Bin
string
Format: 6 or 8 digitsThe bank identification number (BIN).
IssuerCountryCode
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country where the card was issued.
IssuingBank
string
The name of the card issuer.
BinData
array
objectAdditional data about the card based on the BIN. In the case of co-branded card products, two objects are returned.
{
    "Type": "BIN",
    "Bin": "540006",
    "IssuerCountryCode": "US",
    "IssuingBank": "FIRST NATIONAL BANK OF OMAHA",
    "BinData": [
        {
            "CardType": "CREDIT",
            "CommercialIndicator": "PERSONAL",
            "Subtype": "MIXED PRODUCT",
            "Brand": "MASTERCARD"
        }
    ]
}  
const mangopayInstance = require('mangopay2-nodejs-sdk');
const mangopay = new mangopayInstance({
    clientId: "your-client-id",
    clientApiKey: "your-api-key",
})

let paymentMethod = {
  Type: 'BIN',
  Bin: '540006'
}

const getMetadata = async (paymentMethod) => {
  return await mangopay.PayIns.getPaymentMethodMetadata(paymentMethod)
    .then((response) => {
      console.info(response)
      return response
    })
    .catch((err) => {
      console.log(err)
      return false
    })
}

getMetadata(paymentMethod)  
I