API Reference

Server API version 1.0
Java

Results for

icon-search-large No search results yet
Enter your search query above

Get IIN details

POST https://{domainname}/v1/{merchantId}/services/getIINdetails

Services

Under services you find several calls that can be used to support your payment flow:

  • Test your connection to us
  • Convert an amount from one currency to another
  • Convert between different bank account notations
  • Retrieve the card type and country where the card was issued based on the IIN of the card

Request

This call lets you verify that we can process a card from a certain issuer (by looking up the first 6 digits) and what the best card type would be, based on your configuration. Some cards are dual branded and could be processed as either a local card (with a local brand) or an international card (with an international brand). In case you are not setup to process these local cards, the response will not contain that card type. As soon as the first 6 digits of the card number have been captured you can use this API to verify the card type and check if you can accept this card. The returned paymentProductId can be used to provide visual feedback to the user by showing the appropriate payment product logo.

PayloadGetIINDetailsRequest

Input for the retrieval of the IIN details request.

Property Type Required Details
bin string (19) yes read close
close

Description

The first digits of the credit card number from left to right with a minimum of 6 digits, or the full credit card number.
paymentContext object no read close
close

Description

Optional payment context to refine the IIN lookup to filter out payment products not applicable to your payment.
  • SDK Object type
    PaymentContext
amountOfMoney object no read close
close

Description

The payment amount
  • SDK Object type
    AmountOfMoney
amount integer (12) yes read close
close

Description

Amount in cents and always having 2 decimals
currencyCode string (3) yes read close
close

Description

Three-letter ISO currency code representing the currency for the amount
countryCode string no read close
close

Description

The country the payment takes place in
isRecurring boolean no read close
close

Description

True if the payment is recurring

Request example

SDK: Java

This scenario you will probably use the most

  • GetIINDetailsRequest body = new GetIINDetailsRequest();
    body.setBin("4567350000427977");
    
    GetIINDetailsResponse response = client.merchant("merchantId").services().getIINdetails(body);
    
  • GetIINDetailsRequest body = new GetIINDetailsRequest();
    body.setBin("****************");
    
    GetIINDetailsResponse response = client.merchant("merchantId").services().getIINdetails(body);
    
  • AmountOfMoney amountOfMoney = new AmountOfMoney();
    amountOfMoney.setAmount(1000L);
    amountOfMoney.setCurrencyCode("USD");
    
    PaymentContext paymentContext = new PaymentContext();
    paymentContext.setAmountOfMoney(amountOfMoney);
    paymentContext.setCountryCode("US");
    paymentContext.setIsRecurring(false);
    
    GetIINDetailsRequest body = new GetIINDetailsRequest();
    body.setBin("*******");
    body.setPaymentContext(paymentContext);
    
    GetIINDetailsResponse response = client.merchant("merchantId").services().getIINdetails(body);
    

Responses

Please find below an overview of the possible responses.

Response 200 - OKGetIINDetailsResponse

The IIN submitted in your request matches a known card type that is configured for your account. The response contains information on that card type.

Property Type Required Details
coBrands array of object no read close
close

Description

Populated only if the card has multiple brands. A list with for every brand of the card, the payment product identifier associated with that brand, and if you submitted a payment context, whether that payment product is allowed in the context.
items object no read close
close
  • SDK Object type
    IINDetail
isAllowedInContext boolean no read close
close

Description

Populated only if you submitted a payment context.
  • true - The payment product is allowed in the submitted context.
  • false - The payment product is not allowed in the submitted context. Note that in this case, none of the brands of the card will be allowed in the submitted context.
paymentProductId integer no read close
close

Description

Payment product identifier
Please see payment products for a full overview of possible values.
countryCode string no read close
close

Description

The ISO 3166-1 alpha-2 country code of the country where the card was issued. If we don't know where the card was issued, then the countryCode will return the value '99'.
isAllowedInContext boolean no read close
close

Description

Populated only if you submitted a payment context.
  • true - The payment product is allowed in the submitted context.
  • false - The payment product is not allowed in the submitted context. Note that in this case, none of the brands of the card will be allowed in the submitted context.
paymentProductId integer no read close
close

Description

The payment product identifier associated with the card. If the card has multiple brands, then we select the most appropriate payment product based on your configuration and the payment context, if you submitted one.
Please see payment products for a full overview of possible values

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "countryCode" : "RU",
        "paymentProductId" : 3
    }
    

Response 400 - Bad requestErrorResponse

Property Type Required Details
errorId string yes read close
close

Description

Unique reference, for debugging purposes, of this error response
errors array of object yes read close
close

Description

List of one or more errors
items object no read close
close
  • SDK Object type
    APIError
category string no read close
close

Description

Category the error belongs to. The category should give an indication of the type of error you are dealing with. Possible values:
  • CONNECT_PLATFORM_ERROR - indicating that a functional error has occurred in the Connect platform.
  • PAYMENT_PLATFORM_ERROR - indicating that a functional error has occurred in the Payment platform.
  • IO_ERROR - indicating that a technical error has occurred within the Connect platform or between Connect and any of the payment platforms or third party systems.
code string yes read close
close

Description

Error code
httpStatusCode integer no read close
close

Description

HTTP status code for this error that can be used to determine the type of error
id string no read close
close

Description

ID of the error. This is a short human-readable message that briefly describes the error.
message string no read close
close

Description

Human-readable error message that is not meant to be relayed to consumer as it might tip off people who are trying to commit fraud
propertyName string no read close
close

Description

Returned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query.
Some common examples:
  • a.b selects the value of property b of root property a,
  • a[1] selects the first element of the array in root property a,
  • a[b='some value'] selects all elements of the array in root property a that have a property b with value 'some value'.
requestId string no read close
close

Description

ID of the request that can be used for debugging purposes

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "errorId" : "15eabcd5-30b3-479b-ae03-67bb351c07e6-00000092",
        "errors" : [
            {
                "code" : "20000000",
                "propertyName" : "bankAccountBban.accountNumber",
                "message" : "PARAMETER_NOT_FOUND_IN_REQUEST"
            }
        ]
    }
    

Response 404 - Not foundErrorResponse

When the IIN does not match any of the products that are configured on your account an HTTP 404 response is returned. This means that we will not be able to process this card, most likely due to the fact that your account is not set up for certain specific card products that the consumer is trying to make the payment with.

Property Type Required Details
errorId string yes read close
close

Description

Unique reference, for debugging purposes, of this error response
errors array of object yes read close
close

Description

List of one or more errors
items object no read close
close
  • SDK Object type
    APIError
category string no read close
close

Description

Category the error belongs to. The category should give an indication of the type of error you are dealing with. Possible values:
  • CONNECT_PLATFORM_ERROR - indicating that a functional error has occurred in the Connect platform.
  • PAYMENT_PLATFORM_ERROR - indicating that a functional error has occurred in the Payment platform.
  • IO_ERROR - indicating that a technical error has occurred within the Connect platform or between Connect and any of the payment platforms or third party systems.
code string yes read close
close

Description

Error code
httpStatusCode integer no read close
close

Description

HTTP status code for this error that can be used to determine the type of error
id string no read close
close

Description

ID of the error. This is a short human-readable message that briefly describes the error.
message string no read close
close

Description

Human-readable error message that is not meant to be relayed to consumer as it might tip off people who are trying to commit fraud
propertyName string no read close
close

Description

Returned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query.
Some common examples:
  • a.b selects the value of property b of root property a,
  • a[1] selects the first element of the array in root property a,
  • a[b='some value'] selects all elements of the array in root property a that have a property b with value 'some value'.
requestId string no read close
close

Description

ID of the request that can be used for debugging purposes

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "errorId" : "657b10da-d2f9-4088-a948-bf190ef516b1-00000312",
        "errors" : [
            {
                "code" : "210380",
                "propertyName" : "bin",
                "message" : "NO BIN RANGE FOUND"
            }
        ]
    }
    
icon_top_1