Get IIN details
Services
Request
This call lets you verify that we can process a card from a certain Issuer (by looking up the first 6 or more 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, this API call will not return that card type in its response. 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
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
bin | string (19) | yes | read close |
close
DescriptionThe first digits of the credit card number from left to right with a minimum of 6 digits. Providing additional digits can result in more co-brands being returned.
|
|||
object | no | read close | |
close
DescriptionOptional payment context to refine the IIN lookup to filter out payment products not applicable to your payment.
|
|||
object | no | read close | |
amount | integer (12) | yes | read close |
close
DescriptionAmount in cents and always having 2 decimals
|
|||
currencyCode | string (3) | yes | read close |
close
DescriptionThree-letter ISO currency code representing the currency for the amount
|
|||
countryCode | string | no | read close |
close
DescriptionThe country the payment takes place in
|
|||
isInstallments | boolean | no | read close |
close
DescriptionTrue if the payment is to be paid in multiple installments (numberOfInstallments > 1 for the payment). When true only payment products that support installments will be allowed in context.
|
|||
isRecurring | boolean | no | read close |
close
DescriptionTrue if the payment is recurring
|
Request example
This scenario you will probably use the most
-
// In order to call this method, you must initialize the Connect SDK first. ConnectSDK.getClientApi().getIINDetails(bin = "411111", { iinDetailsResponse: IinDetailsResponse -> // Process iinDetailsResponse object }, { apiErrorResponse: ApiErrorResponse -> // Indicate that an API error occurred }, { failure: Throwable -> // Indicate that an error occurred } )
-
// In order to call this method, you must initialize the Connect SDK first. ConnectSDK.getClientApi().getIINDetails(bin = "411111", { iinDetailsResponse: IinDetailsResponse -> // Process iinDetailsResponse object }, { apiErrorResponse: ApiErrorResponse -> // Indicate that an API error occurred }, { failure: Throwable -> // Indicate that an error occurred } )
-
// In order to call this method, you must initialize the Connect SDK first. ConnectSDK.getClientApi().getIINDetails(bin = "411111", { iinDetailsResponse: IinDetailsResponse -> // Process iinDetailsResponse object }, { apiErrorResponse: ApiErrorResponse -> // Indicate that an API error occurred }, { failure: Throwable -> // Indicate that an error occurred } )
-
// In order to call this method, you must initialize the Connect SDK first. ConnectSDK.getClientApi().getIINDetails(bin = "411111", { iinDetailsResponse: IinDetailsResponse -> // Process iinDetailsResponse object }, { apiErrorResponse: ApiErrorResponse -> // Indicate that an API error occurred }, { failure: Throwable -> // Indicate that an error occurred } )
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.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
array of object | no | read close | |
close
DescriptionPopulated 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.
|
|||
object | no | read close | |
isAllowedInContext | boolean | no | read close |
close
DescriptionPopulated only if you submitted a payment context.
|
|||
paymentProductId | integer | no | read close |
close
DescriptionPayment product identifier
Please see payment products for a full overview of possible values. |
|||
countryCode | string | no | read close |
close
DescriptionThe 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
DescriptionPopulated only if you submitted a payment context.
|
|||
paymentProductId | integer | no | read close |
close
DescriptionThe 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
This scenario you will probably use the most
-
{ "countryCode" : "RU", "paymentProductId" : 3 }
Response 400 - Bad requestErrorResponse
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
object | no | read close | |
category | string | no | read close |
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
code | string | yes | read close |
close
DescriptionError code
|
|||
httpStatusCode | integer | no | read close |
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
id | string | no | read close |
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
message | string | no | read close |
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
propertyName | string | no | read close |
close
DescriptionReturned 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:
|
|||
requestId | string | no | read close |
close
DescriptionID of the request that can be used for debugging purposes
|
Response example
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.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
object | no | read close | |
category | string | no | read close |
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
code | string | yes | read close |
close
DescriptionError code
|
|||
httpStatusCode | integer | no | read close |
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
id | string | no | read close |
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
message | string | no | read close |
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
propertyName | string | no | read close |
close
DescriptionReturned 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:
|
|||
requestId | string | no | read close |
close
DescriptionID of the request that can be used for debugging purposes
|
Response example
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" } ] }