Card Validation API Overview

An overview of the Card Validation API

With the Card Validation API, you can validate an AIR Card® before initiating a Sale transaction. This is similar to a preauthorization.

After providing your credentials, you can access the Card Validation API through the following endpoint:

OperationEndpoint PathMethod
Card Validationapi/v1/authTransactions/cardValidationPOST

Here is a simple example of how to use the API:

// Import libraries
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;

// Initiate HTTP client
HttpClient client = new HttpClient();

// Set API endpoint
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "https://cert-proc.precisionpay.com/api/v1/authTransactions/cardValidation");

// Set headers
request.Headers.Add("accept", "*/*");
// Set merchant number
request.Headers.Add("MerchantNbr", "ENTER YOUR MERCHANT NUMBER");
// Set Username
request.Headers.Add("Username", "ENTER YOUR USERNAME");
// Set password
request.Headers.Add("Password", "ENTER YOUR PASSWORD");

// Create Card Validation JSON request
var cardValidation = new CardValidation
{
    cardNbr = "70830804685231",
};

// Store JSON object as a string in the request
request.Content = new StringContent(JsonSerializer.Serialize(cardValidation), Encoding.UTF8, "application/json");
// Set content type of the request
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

// Call endpoint
HttpResponseMessage response = await client.SendAsync(request);
// Store response
string responseBody = await response.Content.ReadAsStringAsync();

// Print response
Console.WriteLine(responseBody);

// Class definitions
public class CardValidation
{
    public string? cardNbr { get; set; }
}
# Import libraries
import requests, json

# Set authentication
MERCHANTNBR = 'ENTER YOUR MERCHANT NUMBER'
USERNAME = 'ENTER YOUR USERNAME'
PASSWORD = 'ENTER YOUR PASSWORD'

# Set endpoint
ENDPOINT = 'https://cert-proc.precisionpay.com/api/v1/authTransactions/cardValidation'

# Set headers
HEADERS = {
    'accept': '*/*',
    'MerchantNbr': MERCHANTNBR,
    'Username': USERNAME,
    'Password': PASSWORD,
    'Content-Type': 'application/json',
}

# Create Credit Validation JSON request
json_data = {
    'cardNbr': '70830804685231',
}

# Call endpoint
response = requests.post(ENDPOINT, headers=HEADERS, json=json_data).json()

# Print response
print(json.dumps(response, indent=4))
// Set authentication
const merchantNbr = 'ENTER YOUR MERCHANT NUMBER';
const username = 'ENTER YOUR USERNAME';
const password = 'ENTER YOUR PASSWORD';

// Set endpoint
const endpoint = 'https://cert-proc.precisionpay.com/api/v1/authTransactions/cardValidation';

// Set headers
const header = {
    'accept': '*/*',
    'MerchantNbr': merchantNbr,
    'Username': username,
    'Password': password,
    'Content-Type': 'application/json',
}

// Create Card Validation JSON request
jsonData = {
    'cardNbr': '70830804685231',
}

// Call endpoint
fetch(endpoint, {
    method: 'POST',
    headers: header,
    body: JSON.stringify(jsonData)
})
    // Get response
    .then(response => response.text())
    // Print response
    .then(data => console.log(data));