Get IIN details
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
- Retrieve the ARN (Acquirer Reference Number), RRN (Retrieval Reference Number), Amount and Currency for a payment
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, 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.
Payloaddomain.GetIINDetailsRequest
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
-
// Assigning literals to pointer variables directly is not supported. // The below code uses helper function connectsdk.NewString to overcome this issue. // This helper function is provided by the SDK's root package. // http://stackoverflow.com/a/30716481 lists a few more alternatives. var body domain.GetIINDetailsRequest body.Bin = connectsdk.NewString("4567350000427977") response, err := client.V1().Merchant("merchantId").Services().GetIINdetails(body, nil)
-
// Assigning literals to pointer variables directly is not supported. // The below code uses helper function connectsdk.NewString to overcome this issue. // This helper function is provided by the SDK's root package. // http://stackoverflow.com/a/30716481 lists a few more alternatives. var body domain.GetIINDetailsRequest body.Bin = connectsdk.NewString("****************") response, err := client.V1().Merchant("merchantId").Services().GetIINdetails(body, nil)
-
// Assigning literals to pointer variables directly is not supported. // The below code uses helper functions connectsdk.NewBool, connectsdk.NewInt64 and connectsdk.NewString to overcome this issue. // These helper functions are provided by the SDK's root package. // http://stackoverflow.com/a/30716481 lists a few more alternatives. var amountOfMoney domain.AmountOfMoney amountOfMoney.Amount = connectsdk.NewInt64(1000) amountOfMoney.CurrencyCode = connectsdk.NewString("USD") var paymentContext domain.PaymentContext paymentContext.AmountOfMoney = &amountOfMoney paymentContext.CountryCode = connectsdk.NewString("US") paymentContext.IsRecurring = connectsdk.NewBool(false) var body domain.GetIINDetailsRequest body.Bin = connectsdk.NewString("*******") body.PaymentContext = &paymentContext response, err := client.V1().Merchant("merchantId").Services().GetIINdetails(body, nil)
-
// Assigning literals to pointer variables directly is not supported. // The below code uses helper functions connectsdk.NewBool, connectsdk.NewInt64 and connectsdk.NewString to overcome this issue. // These helper functions are provided by the SDK's root package. // http://stackoverflow.com/a/30716481 lists a few more alternatives. var amountOfMoney domain.AmountOfMoney amountOfMoney.Amount = connectsdk.NewInt64(1000) amountOfMoney.CurrencyCode = connectsdk.NewString("USD") var paymentContext domain.PaymentContext paymentContext.AmountOfMoney = &amountOfMoney paymentContext.CountryCode = connectsdk.NewString("US") paymentContext.IsInstallments = connectsdk.NewBool(true) paymentContext.IsRecurring = connectsdk.NewBool(false) var body domain.GetIINDetailsRequest body.Bin = connectsdk.NewString("*******") body.PaymentContext = &paymentContext response, err := client.V1().Merchant("merchantId").Services().GetIINdetails(body, nil)
Responses
Please find below an overview of the possible responses.
Response 200 - OKdomain.GetIINDetailsResponse
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 requestdomain.ErrorResponse
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 | |
close
DescriptionContains detailed information on one single error.
|
|||
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 founddomain.ErrorResponse
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 | |
close
DescriptionContains detailed information on one single error.
|
|||
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" } ] }