# Click to Pay

\
[Start a Project](https://developer.visa.com/portal/#users/new) \
[API Overview](https://developer.visa.com/capabilities/visa-secure-remote-commerce)

Search API Reference

- [Merchants and PSPs](https://developer.visa.com/capabilities/visa-secure-remote-commerce/docs-merchants-psps)
- [Visa Click to Pay Overview](https://developer.visa.com/capabilities/visa-secure-remote-commerce/ctp-api-overview)
- [Getting Started](https://developer.visa.com/capabilities/visa-secure-remote-commerce/getting-started)
- [API Fundamentals](https://developer.visa.com/capabilities/visa-secure-remote-commerce/api-fundamentals)
- [First Steps](https://developer.visa.com/capabilities/visa-secure-remote-commerce/first-steps)
- [Introduction to Visa Click to Pay API](https://developer.visa.com/capabilities/visa-secure-remote-commerce/introduction-to-visa-click-to-pay-api)
- [Use Cases](https://developer.visa.com/capabilities/visa-secure-remote-commerce/use-cases)
- [Tutorials and Guides](https://developer.visa.com/capabilities/visa-secure-remote-commerce/tutorials-guides)
- [Error Codes and Troubleshooting](https://developer.visa.com/capabilities/visa-secure-remote-commerce/error-codes-and-troubleshooting)
- [Terms of Service and Privacy Notice](https://developer.visa.com/capabilities/visa-secure-remote-commerce/terms-privacy)
- [Product Terms](https://developer.visa.com/capabilities/visa-secure-remote-commerce/product-terms)
- [Glossary](https://developer.visa.com/capabilities/visa-secure-remote-commerce/glossary)
- [Request & Response Codes](https://developer.visa.com/request_response_codes)

## Secure Remote Commerce

Enable partners  to securely add, manage, and use Visa tokenized credentials for digital purchases built on EMV standards.

## Identity Lookup  v1 - Latest

The Identity Lookup operation uses a provided consumer identity (email address or mobile phone number) to determine whether it is associated with an SRC profile.

**Authentication Requirements:**

- HTTP Header: x-pay-token - JWT token for authentication
- Query Parameter: apikey - API key issued during onboarding

### Request

##### Request Body schema: application/json

|     |     |
| --- | --- |
| consumerIdentity<br>required | object<br>Consumer identity. |
| |     |     |
| --- | --- |
| identityType<br>required | string<br>(Required) Type of consumer identity transmitted or collected.<br>Enum:"EMAIL_ADDRESS" "MOBILE_PHONE_NUMBER" |
| identityValue<br>required | string [ 1 .. 255 ] characters <br>(Required) Consumer identity value that corresponds to the consumer identity type.<br>Format: String for a valid email address. For a mobile number, use the E.164 format with a maximum length of 15, including the country code. Remove special characters: All spaces, dashes, and parentheses should be removed, and all characters should be numeric. The mobile number must not include "+".<br>Example: [user@example.com](mailto:user@example.com), 61423123456 |
| identityProvider | string<br>(Optional) Identity provider of the Consumer Identity. The default value is SRC<br>Enum:"SRC" "SRCI" | |
| srcClientId<br>required | string <= 100 characters <br>This is the ID shared by the SRC system with the client that identifies the connecting<br>client, such as SRCi, DCF, or SRC Issuer (SRCPI). If an API key was provided, use the API key as the srcClientId. |

### Responses

#### 200
The operation is processed successfully, and the lookup result is included in the response body.

##### Response Schema: application/json

|     |     |
| --- | --- |
| consumerPresent1<br>required | boolean<br>Indicates whether the Identity Lookup operation was successful. |
| consumerStatus | string<br>Status of the consumer. Must be provided if the specified consumer identity was recognized by the SRC system.<br>Enum:"ACTIVE" "SUSPENDED" "LOCKED" |
| idLookupSessionId | string<br>Session identifier of format UUID, returned by SRC System following an Identity Lookup operation. Can be used in subsequent Initiate Identity Validation operation.<br>Not supported in Visa SRC system. |
| lastUsedCardTimestamp | string <number> <br>Timestamp of the last used card. UTC time in Unix epoch format. |

#### 400
Bad request. See error object for details.

##### Response Schema: application/json

|     |     |
| --- | --- |
| message<br>required | string [ 1 .. 255 ] characters <br>Error message associated with the HTTP status code. |
| reason<br>required | string [ 1 .. 32 ] characters <br>Error reason associated with the HTTP status code are<br>| Reason Code | Description |<br>|----------------------------|--------------------------------------------------------------------------------------|<br>| INVALID_PARAMETER | The value provided for one or more request parameters is considered invalid. This error is also generated in case of a missing, required, request parameter. |<br>| INVALID_REQUEST | The server is not able to adequately parse the request. Usually occurs when some request parameter is expected to be in a particular format but is not. |<br>| NOT_FOUND | The requested resource/business entity does not exist. The resource might also be hidden for security reasons <br>| AUTH_INVALID | Invalid federated idToken |<br>| ACCT_INACCESSIBLE | The account exists but is not currently accessible (e.g. is locked) |<br>| INTERNAL_ERROR | Some error happened on the server which caused the error. Either show a generic message or retry the same request again (it might succeed). <br>| SERVICE_UNAVAILABLE | The service is currently unavailable. Retry after some time. |<br>|-------------------------------------------------------------------------------------------------------------------| |
| status<br>required | string 3 characters <br>HTTP status code to categorize the errors. |
| errorDetail | Array of objects<br>List of error details providing additional information about the error. |
| Array

|     |     |
| --- | --- |
| message | string [ 0 .. 32 ] characters <br>Error message. |
| reason | string [ 0 .. 32 ] characters <br>Error reason associated with the error detail<br>| Reason Code | Description |<br>|----------------------------|----------------------------------------------------------------------------------------------------------|<br>| MISSING_REQUIRED_FIELD | A required field is missing in the request. |<br>| INVALID_IDENTITY_TYPE | The identity type provided is invalid. |<br>| INVALID_EMAIL_FORMAT | The email address format is invalid. |<br>| INVALID_PHONE_FORMAT | The phone number format is invalid. |<br>| INVALID_IDENTITY_PROVIDER | The identity provider is invalid. |<br>| EMPTY_IDENTITY_VALUE | The identity value is empty. |<br>| MISSING_CONDITIONAL_FIELD | A field required under certain conditions is missing in the request. |<br>| CONSUMER_IDENTITY_NOT_FOUND | The specified consumer identity was not found. |<br>| SESSION_ID_NOT_FOUND | The specified session ID was not found. |<br>| INVALID_VALIDATION_DATA | The validation data provided is invalid. |<br>| EMPTY_VALIDATION_DATA | The validation data provided is empty. |<br>| INCORRECT_OTP | The one-time password (OTP) provided is incorrect. |<br>| EXPIRED_OTP | The one-time password (OTP) provided has expired. |<br>| VALIDATION_SESSION_NOT_FOUND | The specified validation session ID was not found. |<br>| MAX_ATTEMPTS_EXCEEDED | The maximum number of validation attempts has been exceeded. |<br>| VALIDATION_ALREADY_COMPLETED | The identity validation has already been completed for the specified session ID. |<br>| VALIDATION_NOT_INITIATED | The identity validation has not been initiated for the specified session ID. |<br>| INVALID_JWT_FORMAT | The format of the provided JWT is invalid. |<br>| EMPTY_ARRAY | The provided array is empty. |<br>| INVALID_TRANSACTION_AMOUNT | The transaction amount provided is invalid. |<br>| INVALID_CURRENCY_CODE | The currency code provided is invalid. |<br>| SRC_PROFILE_NOT_FOUND | The specified SRC profile was not found. |<br>| INVALID_PAYLOAD_TYPE | The payload type provided is invalid. |<br>| INVALID_COUNTRY_CODE | The country code provided is invalid. |<br>| INVALID_BILLING_ADDRESS | The billing address provided is invalid. |<br>| DIGITAL_CARD_NOT_FOUND | The specified digital card was not found. |<br>| DPA_NOT_FOUND | The specified DPA was not found. |<br>| CORRELATION_ID_NOT_FOUND | The specified correlation ID was not found. |<br>|--------------------------------------------------------------------------------------------------------------------| |
| source | string [ 0 .. 255 ] characters <br>Name of the source that generated this error. |
| sourceType | string [ 0 .. 255 ] characters <br>Type of the source that generated this error. |

#### 401
Unauthorized. See error object for details, such as authorization token validation failure.

##### Response Schema: application/json

|     |     |
| --- | --- |
| message | string [ 0 .. 32 ] characters <br>Error message. |
| reason | string [ 0 .. 32 ] characters <br>Error reason associated with the error detail<br>| Reason Code | Description |<br>|----------------------------|--------------------------------------------------------------------------------------|<br>| MISSING_REQUIRED_FIELD | A required field is missing in the request. |<br>| INVALID_IDENTITY_TYPE | The identity type provided is invalid. |<br>| INVALID_EMAIL_FORMAT | The email address format is invalid. |<br>| INVALID_PHONE_FORMAT | The phone number format is invalid. |<br>| INVALID_IDENTITY_PROVIDER | The identity provider is invalid. |<br>| EMPTY_IDENTITY_VALUE | The identity value is empty. |<br>| MISSING_CONDITIONAL_FIELD | A field required under certain conditions is missing in the request. |<br>| CONSUMER_IDENTITY_NOT_FOUND | The specified consumer identity was not found. |<br>| SESSION_ID_NOT_FOUND | The specified session ID was not found. |<br>| INVALID_VALIDATION_DATA | The validation data provided is invalid. |<br>| EMPTY_VALIDATION_DATA | The validation data provided is empty. |<br>| INCORRECT_OTP | The one-time password (OTP) provided is incorrect. |<br>| EXPIRED_OTP | The one-time password (OTP) provided has expired. |<br>| VALIDATION_SESSION_NOT_FOUND | The specified validation session ID was not found. |<br>| MAX_ATTEMPTS_EXCEEDED | The maximum number of validation attempts has been exceeded. |<br>| VALIDATION_ALREADY_COMPLETED | The identity validation has already been completed for the specified session ID. |<br>| VALIDATION_NOT_INITIATED | The identity validation has not been initiated for the specified session ID. |<br>| INVALID_JWT_FORMAT | The format of the provided JWT is invalid. |<br>| EMPTY_ARRAY | The provided array is empty. |<br>| INVALID_TRANSACTION_AMOUNT | The transaction amount provided is invalid. |<br>| INVALID_CURRENCY_CODE | The currency code provided is invalid. |<br>| SRC_PROFILE_NOT_FOUND | The specified SRC profile was not found. |<br>| INVALID_PAYLOAD_TYPE | The payload type provided is invalid. |<br>| INVALID_COUNTRY_CODE | The country code provided is invalid. |<br>| INVALID_BILLING_ADDRESS | The billing address provided is invalid. |<br>| DIGITAL_CARD_NOT_FOUND | The specified digital card was not found. |<br>| DPA_NOT_FOUND | The specified DPA was not found. |<br>| CORRELATION_ID_NOT_FOUND | The specified correlation ID was not found. |<br>|--------------------------------------------------------------------------------------------------------------------| |
| source | string [ 0 .. 255 ] characters <br>Name of the source that generated this error. |
| sourceType | string [ 0 .. 255 ] characters <br>Type of the source that generated this error. |

#### 403
Forbidden. See error object for details, such as an incorrect SRC DPA ID being used.

##### Response Schema: application/json

#### 404
Checkout transaction not found.

##### Response Schema: application/json

#### 500
An internal server error occurred, such as a null pointer exception.

##### Response Schema: application/json

post/src/v1/identities/lookup

### Sandbox server  
https://sandbox.api.visa.com/src/v1/identities/lookup

**Request samples**

- **Payload**

```json
{"srcClientId": "string",

"consumerIdentity": {"identityType": "EMAIL_ADDRESS",

"identityValue": "string",

"identityProvider": "SRC"

}
}
```

**Response samples**

- **200**
- **400**
- **401**
- **403**
- **404**
- **500**

### 500

```json
{"consumerStatus": "ACTIVE",

"consumerPresent1": true,

"idLookupSessionId": "string",

"lastUsedCardTimestamp": "string"
}
```
