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_PAY

The type of metadata.

Bin
string

Format: 6 or 8 digits

Required 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": "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)