This site requires javascript to be enabled.

  • Search AI-powered

Results for

xxx

Get IIN details

POST https://{domainname}/client/v1/{customerId}/services/getIINdetails

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
close

Description

The 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.
close

Description

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

Description

The payment amount
  • SDK Object type
    AmountOfMoney
close

Description

Amount in cents and always having 2 decimals
close

Description

Three-letter ISO currency code representing the currency for the amount
close

Description

The country the payment takes place in
close

Description

True 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.
close

Description

True if the payment is recurring

Request example

SDK: Swift

This scenario you will probably use the most

  • import IngenicoConnectKit
    
    let clientSessionId = "<clientSessionId from Create Session>"
    let customerId = "<customerId from Create Session>"
    let baseURL = "<clientApiUrl from Create Session>"
    let assetBaseURL = "<assetUrl from Create Session>"
    let appIdentifier = "<your app name>"
    
    let session = Session(clientSessionId: clientSessionId, customerId: customerId,
                          baseURL: baseURL, assetBaseURL: assetBaseURL, appIdentifier: appIdentifier)
    
    session.iinDetails(forPartialCreditCardNumber: "54694894848", context: nil, success: { response in
        if response.status == .supported {
            let productId = response.paymentProductId
            let status = response.status
            let coBrands = response.coBrands
            let countryCode = response.countryCode
            let allowed = response.allowedInContext
            // Process IIN details.
        }
        else {
            // Handle other status codes
        }
    }, failure: { error in
        Macros.DLog(message: "Error while retrieving IIN details: \(error.localizedDescription)")
    })
    
  • import IngenicoConnectKit
    
    let clientSessionId = "<clientSessionId from Create Session>"
    let customerId = "<customerId from Create Session>"
    let baseURL = "<clientApiUrl from Create Session>"
    let assetBaseURL = "<assetUrl from Create Session>"
    let appIdentifier = "<your app name>"
    
    let session = Session(clientSessionId: clientSessionId, customerId: customerId,
                          baseURL: baseURL, assetBaseURL: assetBaseURL, appIdentifier: appIdentifier)
    
    session.iinDetails(forPartialCreditCardNumber: "****************", context: nil, success: { response in
        if response.status == .supported {
            let productId = response.paymentProductId
            let status = response.status
            let coBrands = response.coBrands
            let countryCode = response.countryCode
            let allowed = response.allowedInContext
            // Process IIN details.
        }
        else {
            // Handle other status codes
        }
    }, failure: { error in
        Macros.DLog(message: "Error while retrieving IIN details: \(error.localizedDescription)")
    })
    
  • import IngenicoConnectKit
    
    let clientSessionId = "<clientSessionId from Create Session>"
    let customerId = "<customerId from Create Session>"
    let baseURL = "<clientApiUrl from Create Session>"
    let assetBaseURL = "<assetUrl from Create Session>"
    let appIdentifier = "<your app name>"
    
    let session = Session(clientSessionId: clientSessionId, customerId: customerId,
                          baseURL: baseURL, assetBaseURL: assetBaseURL, appIdentifier: appIdentifier)
    
    let amountValue = 1000
    let currencyCode: CurrencyCode = .USD
    let countryCode: CountryCode = .US
    let isRecurring = false
    
    let amountOfMoney = PaymentAmountOfMoney(totalAmount: amountValue, currencyCode: currencyCode)
    let context = PaymentContext(amountOfMoney: amountOfMoney, isRecurring: isRecurring, countryCode: countryCode)
    
    session.iinDetails(forPartialCreditCardNumber: "*******", context: context, success: { response in
        if response.status == .supported {
            let productId = response.paymentProductId
            let status = response.status
            let coBrands = response.coBrands
            let countryCode = response.countryCode
            let allowed = response.allowedInContext
            // Process IIN details.
        }
        else {
            // Handle other status codes
        }
    }, failure: { error in
        Macros.DLog(message: "Error while retrieving IIN details: \(error.localizedDescription)")
    })
    
  • import IngenicoConnectKit
    
    let clientSessionId = "<clientSessionId from Create Session>"
    let customerId = "<customerId from Create Session>"
    let baseURL = "<clientApiUrl from Create Session>"
    let assetBaseURL = "<assetUrl from Create Session>"
    let appIdentifier = "<your app name>"
    
    let session = Session(clientSessionId: clientSessionId, customerId: customerId,
                          baseURL: baseURL, assetBaseURL: assetBaseURL, appIdentifier: appIdentifier)
    
    let amountValue = 1000
    let currencyCode: CurrencyCode = .USD
    let countryCode: CountryCode = .US
    let isRecurring = false
    
    let amountOfMoney = PaymentAmountOfMoney(totalAmount: amountValue, currencyCode: currencyCode)
    let context = PaymentContext(amountOfMoney: amountOfMoney, isRecurring: isRecurring, countryCode: countryCode)
    
    session.iinDetails(forPartialCreditCardNumber: "*******", context: context, success: { response in
        if response.status == .supported {
            let productId = response.paymentProductId
            let status = response.status
            let coBrands = response.coBrands
            let countryCode = response.countryCode
            let allowed = response.allowedInContext
            // Process IIN details.
        }
        else {
            // Handle other status codes
        }
    }, failure: { error in
        Macros.DLog(message: "Error while retrieving IIN details: \(error.localizedDescription)")
    })
    

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
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.
close
  • SDK Object type
    IINDetail
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.
close

Description

Payment product identifier
Please see payment products for a full overview of possible values.
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'.
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.
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: Swift

This scenario you will probably use the most

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

Response 400 - Bad requestErrorResponse

Properties
Property Type Required Details
close

Description

Unique reference, for debugging purposes, of this error response
close

Description

List of one or more errors
close
  • SDK Object type
    APIError
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.
close

Description

Error code
close

Description

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

Description

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

Description

Human-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
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'.
close

Description

ID of the request that can be used for debugging purposes

Response example

SDK: Swift

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
close

Description

Unique reference, for debugging purposes, of this error response
close

Description

List of one or more errors
close
  • SDK Object type
    APIError
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.
close

Description

Error code
close

Description

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

Description

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

Description

Human-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
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'.
close

Description

ID of the request that can be used for debugging purposes

Response example

SDK: Swift

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"
            }
        ]
    }