Visa Click to Pay

Merchants and Payment Service Providers

First Steps

Before You Start

Let’s quickly learn how to make a call to a Visa Click to Pay API but before making your first API call, ensure you have:

Calling Your First API

We will first connect to the Identity Lookup endpoint so that you can check if a Click to Pay profile exists. This endpoint determines whether consumerIdentity (email or mobile number) is associated with a Visa Click to Pay profile in the SRC system.

You can try calling this API using your API Client (e.g. Postman) or implement it directly in your code.

1. Set up your request's authentication header

Include the required X-Pay Token:

x-pay-token: [YOUR_XPAYTOKEN]

2. Set the header's Content Type

Add Content Type as a JSON object:

Content-Type: application/json

3. Configure the request URL

Use the sandbox Identity Lookup endpoint with your API key:

POST https://sandbox.api.visa.com/src/v1/identities/lookup?apikey=<YOUR_API_KEY>

4. Prepare the request body

Create a JSON request body with the required fields. Use your API key as the srcClientId value, and the email provided in our test data (available in the Asset section in your VDC Project) to get a valid response.

{
  "srcClientId": "[YOUR_API_KEY]",
  "consumerIdentity": {
    "identityType": "EMAIL_ADDRESS",
    "identityValue": "[email protected]"
  }
}
		

5. Send the request

Make the POST request to the API endpoint with all headers and body configured.

6. Verify response

Check for a successful response with status code 200. The response body should contain:

{
  "consumerPresent1": true/false,
  "consumerStatus": "ACTIVE|SUSPENDED|LOCKED",
  "lastUsedCardTimestamp": "[timestamp]"
}
		

A successful response indicates:

  • Your authentication is working correctly
  • Your API integration is properly configured
  • You are ready to proceed with more complex API operations

The consumerPresent1 field indicates whether the provided email address or mobile phone number is present in the SRC profile.

After your first successful API call:

  • Test error scenarios with invalid data
  • Explore other API endpoints
  • Implement proper error handling in your application
  • Review the API response structure for integration planning

Next Steps

See Introduction to the Visa Click to Pay API to view the other endpoints in the Visa Click to Pay API.