Server API version 1.0
Java

Results for

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

Get customer details

POST https://{domainname}/v1/{merchantId}/products/{paymentProductId}/customerDetails

Products

Products is your entry on all things related to payment products. You will be able to retrieve all relevant payment products, based on your configuration and provided filters, their associated fields and potential directories. You can retrieve all of the information in one call or do calls on individual payment products. The data returned is designed to give you all the required information to build up your interface towards your consumers in a dynamic fashion. By doing it like that you know that you will be ready for future changes and new payment products without much effort.

Request

Which fields are required depend on the country code. This can determined by performing a getPaymentProduct call and supplying the country code. Each payment product field with the field usedForLookup set to true should be submitted in the request with a valid value.

PayloadGetCustomerDetailsRequest

Input for the retrieval of a customer's details.

     Property Type Required Description
countryCode string yes

The code of the country where the customer should recide.

array yes
A list of keys with a value used to retreive the details of a consumer. Depending on the country code, different keys are required. These can be determined with a getPaymentProduct call and using payment product fields with the field usedForLookup set to true.
object no SDK object type: KeyValuePair
key string no

Name of the key or field

value string no

Value of the key or field

Request example

SDK: Java

This scenario you will probably use the most

  • List<KeyValuePair> values = new ArrayList<KeyValuePair>();
    
    KeyValuePair value1 = new KeyValuePair();
    value1.setKey("fiscalNumber");
    value1.setValue("01234567890");
    
    values.add(value1);
    
    GetCustomerDetailsRequest body = new GetCustomerDetailsRequest();
    body.setCountryCode("SE");
    body.setValues(values);
    
    GetCustomerDetailsResponse response = client.merchant("merchantId").products().customerDetails(9000, body);
    

Responses

Please find below an overview of the possible responses.

Response 200 - OKGetCustomerDetailsResponse

Personal information and address data related to the data in the request is returned.

   Property Type Required Description
city string no

The city in which the customer recides.

country string no

The country in which the customer recides.

emailAddress string no

The email address registered to the customer.

firstName string no

The first name of the customer

fiscalNumber string no

The fiscal number (SSN) for the consumer.

languageCode string no

The code of the language used by the customer.

phoneNumber string no

The phone number registered to the customer.

street string no

The street on which the customer recides.

surname string no

The surname or family name of the customer.

zip string no

The ZIP or postal code for the area in which the customer recides.

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "fiscalNumber" : "01234567890",
        "city" : "Stockholm",
        "street" : "Gustav Adolfs torg 22",
        "zip" : "111 52",
        "firstName" : "Gustav",
        "surname" : "Adolfs",
        "emailAddress" : "gustav.adolfs@stockholm.se",
        "phoneNumber" : "0123456789",
        "languageCode" : ""
    }
    

Response 400 - Bad requestErrorResponse

The request is missing required values or no information could be found with the input data.

     Property Type Required Description
errorId string yes

Unique reference, for debugging purposes, of this error response

array yes
List of one or more errors
object no SDK object type: APIError
category string no

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

Error code

httpStatusCode integer no

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

id string no

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

message string no

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

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

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" : "1214",
                "id" : "CUSTOMER_DETAILS_NOT_FOUND",
                "message" : "No customer details could be found with the provided data."
            }
        ]
    }
    

Response 404 - Not foundErrorResponse

The paymentProductId you submitted does not exist.

     Property Type Required Description
errorId string yes

Unique reference, for debugging purposes, of this error response

array yes
List of one or more errors
object no SDK object type: APIError
category string no

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

Error code

httpStatusCode integer no

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

id string no

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

message string no

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

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

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" : "1070",
                "message" : "UNKNOWN_PAYMENT_PRODUCT_ID"
            }
        ]
    }
    
icon_top_1