Void API Overview

An overview of the Void API

With the Void API, you can remove a transaction from your FBO's current batch while it is still open.

📘

Important Notes

  • You must include the transaction number that you want to void within the endpoint URL. For example, api/v1/authTransactions/void/T0000003905.

  • Once a batch has been closed, you cannot void a transaction that exists within it.

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

OperationEndpoint PathMethod
Voidapi/v1/authTransactions/void/{txnNbr}PUT

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

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

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

// Set number of the transaction to void
string transactionNumber = "T0000003905";
// Set API endpoint
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Put, "https://cert-proc.precisionpay.com/api/v1/authTransactions/void/" + transactionNumber);

// 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");

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

// Print response
Console.WriteLine(responseBody);
# Import libraries
import requests, json

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

# Set number of the transaction to void
transaction_number = 'T0000003905'
# Set endpoint
endpoint = 'https://cert-proc.precisionpay.com/api/v1/authTransactions/void/' + transaction_number

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

# Call endpoint
response = requests.put(endpoint, headers=HEADERS).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 number of the transaction to void
transactionNumber = 'T0000003905'
// Set endpoint
const endpoint = 'https://cert-proc.precisionpay.com/api/v1/authTransactions/void/' + transactionNumber;

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

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