Sale API Overview

An overview of the Sale API

With the Sale API, your FBO can submit sale transactions to the gateway that have been made with an AIR Card®. You can include any valid PPS product in the transaction details, including fuel and non-fuel products. Your FBO has the responsibility for mapping its internal product codes to the gateway's product codes.

📘

Important Notes

  • Some AIR Cards® only allow for the billing of fuel and not for other types of services.

  • The gateway will mark a transaction as a possible duplicate if you submit a transaction from the same location with the same amount of fuel and the same card and tail number as another within 48 hours (though system overrides may apply).

  • The gateway validates the fuel capacity of an aircraft, and it does not allow the purchase of fuel above what has been established (though system overrides may apply).

  • If you receive an error that can be overridden, you can override it by resending the same exact transaction after approval from PPS.

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

OperationEndpoint PathMethod
Saleapi/v1/authTransactions/salePOST

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

// 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 Sale JSON request
var sale = new Sale
{
    eEntryType = "ManualCardPresent",
    CardType = "Aircard",
    paymentMethodNumber = "7842311829222478",
    cardExpirationDate = "10/2027",
    cvv = null,
    softwareVendor = "GenericPOS",
    invoice = new Invoice
    {
        invoiceNbr = "INV000321",
        originalInvoiceNbr = "",
        currency = "USD",
        invoiceDate = "2024-06-17",
        invoicetotal = 28283.20,
        tailNbr = "N12345",
        notes = null,
        eFlightType = null,
        captainName = null,
        destIcao = "KMIA",
        fromIcao = "SKCL",
        isDomestic = false,
        details = new List<Detail>
        {
            new Detail
            {
                lineId = 1,
                itemCode = "1",
                VendorProductName = "JETA",
                unitOfMeasure = "usg",
                eProcessingType = "retail",
                deliveryTicketNumber = "12345",
                deliveryDate = "2024-06-17 23:55",
                qty = 9744,
                unitPrice = 2.8,
                lineTotal = 27283.20,
                postedPrice = 3.2,
                flightNbr = null,
                description = null,
                taxAndFeesBreakdown = new List<TaxAndFeesBreakdown>
                {
                    new TaxAndFeesBreakdown
                    {
                        itemCode = "169",
                        VendorProductName = "County Sales Tax",
                        lineTotal = 1948.80,
                        qty = 9744,
                        unitPrice = 0.20,
                        description = "",
                        eRateType = "PerUnit",
                        eType = "SalesTax"
                    },
                    new TaxAndFeesBreakdown
                    {
                        itemCode = "182",
                        VendorProductName = "Federal Excise Tax - Jet A",
                        lineTotal = 1802.64,
                        qty = 9744,
                        unitPrice = 0.185,
                        description = "",
                        eRateType = "PerUnit",
                        eType = "CostTax"
                    },
                },
            },
            new Detail
            {
                lineId = 2,
                itemCode = "76",
                VendorProductName = "Ground Power (GPU)",
                unitOfMeasure = "each",
                eProcessingType = "retail",
                deliveryTicketNumber = null,
                deliveryDate = null,
                qty = 1,
                unitPrice = 1000,
                lineTotal = 1000,
                postedPrice = 0,
                flightNbr = null,
            },
        },
    },
};

// Store JSON object as a string in the request
request.Content = new StringContent(JsonSerializer.Serialize(sale), 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 Detail
{
    public int lineId { get; set; }
    public string? itemCode { get; set; }
    public string? VendorProductName { get; set; }
    public string? unitOfMeasure { get; set; }
    public string? eProcessingType { get; set; }
    public string? deliveryTicketNumber { get; set; }
    public string? deliveryDate { get; set; }
    public double qty { get; set; }
    public double unitPrice { get; set; }
    public double lineTotal { get; set; }
    public double postedPrice { get; set; }
    public string? flightNbr { get; set; }
    public string? description { get; set; }
    public List<TaxAndFeesBreakdown>? taxAndFeesBreakdown { get; set; }
}

public class Invoice
{
    public string? invoiceNbr { get; set; }
    public string? originalInvoiceNbr { get; set; }
    public string? currency { get; set; }
    public string? invoiceDate { get; set; }
    public double invoicetotal { get; set; }
    public string? tailNbr { get; set; }
    public List<Detail>? details { get; set; }
    public string? notes { get; set; }
    public string? eFlightType { get; set; }
    public string? captainName { get; set; }
    public string? destIcao { get; set; }
    public string? fromIcao { get; set; }
    public bool isDomestic { get; set; }
}

public class Sale
{
    public string? eEntryType { get; set; }
    public string? CardType { get; set; }
    public string? paymentMethodNumber { get; set; }
    public string? cardExpirationDate { get; set; }
    public string? cvv { get; set; }
    public string? softwareVendor { get; set; }
    public Invoice? invoice { get; set; }
}

public class TaxAndFeesBreakdown
{
    public string? itemCode { get; set; }
    public string? VendorProductName { get; set; }
    public double lineTotal { get; set; }
    public double qty { get; set; }
    public double unitPrice { get; set; }
    public string? description { get; set; }
    public string? eRateType { get; set; }
    public string? eType { get; set; }
}
# Import libraries
import requests, json

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

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

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

# Create Sale JSON request
json_data = {
    'eEntryType': 'ManualCardPresent',
    'CardType': 'Aircard',
    'paymentMethodNumber': '7842311829222478',
    'cardExpirationDate': '10/2027',
    'cvv': None,
    'softwareVendor': 'GenericPOS',
    'invoice': {
        'invoiceNbr': 'INV000321',
        'originalInvoiceNbr': '',
        'currency': 'USD',
        'invoiceDate': '2024-06-17',
        'invoicetotal': 28283.20,
        'tailNbr': 'N12345',
        'details': [
            {
                'lineId': 1,
                'itemCode': '1',
                'VendorProductName': 'JETA',
                'unitOfMeasure': 'usg',
                'eProcessingType': 'retail',
                'deliveryTicketNumber': '12345',
                'deliveryDate': '2024-06-17 23:55',
                'qty': 9744,
                'unitPrice': 2.8,
                'lineTotal': 27283.20,
                'postedPrice': 3.2,
                'flightNbr': None,
                'description': None,
                'taxAndFeesBreakdown': [
                    {
                        'itemCode': '169',
                        'VendorProductName': 'County Sales Tax',
                        'lineTotal': 1948.80,
                        'qty': 9744,
                        'unitPrice': 0.20,
                        'description': '',
                        'eRateType': 'PerUnit',
                        'eType': 'SalesTax',
                    },
                    {
                        'itemCode': '182',
                        'VendorProductName': 'Federal Excise Tax - Jet A',
                        'lineTotal': 1802.64,
                        'qty': 9744,
                        'unitPrice': 0.185,
                        'description': '',
                        'eRateType': 'PerUnit',
                        'eType': 'CostTax',
                    },
                ],
            },
            {
                'lineId': 2,
                'itemCode': '76',
                'VendorProductName': 'Ground Power (GPU)',
                'unitOfMeasure': 'each',
                'eProcessingType': 'retail',
                'deliveryTicketNumber': None,
                'deliveryDate': None,
                'qty': 1,
                'unitPrice': 1000,
                'lineTotal': 1000,
                'postedPrice': None,
            },
        ],
    },
}

# 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/sale';

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

// Create Sale JSON request
jsonData = {
    'eEntryType': 'ManualCardPresent',
    'CardType': 'Aircard',
    'paymentMethodNumber': '7842311829222478',
    'cardExpirationDate': '10/2027',
    'cvv': null,
    'softwareVendor': 'GenericPOS',
    'invoice': {
        'invoiceNbr': 'INV000321',
        'originalInvoiceNbr': '',
        'currency': 'USD',
        'invoiceDate': '2022-11-03',
        'invoicetotal': 28283.20,
        'tailNbr': 'N12345',
        'details': [
            {
                'lineId': 1,
                'itemCode': '1',
                'VendorProductName': 'JETA',
                'unitOfMeasure': 'usg',
                'eProcessingType': 'retail',
                'deliveryTicketNumber': '12345',
                'deliveryDate': '2024-06-17 23:55',
                'qty': 9744,
                'unitPrice': 2.8,
                'lineTotal': 27283.20,
                'postedPrice': 3.2,
                'flightNbr': null,
                'description': null,
                'taxAndFeesBreakdown': [
                    {
                        'itemCode': '169',
                        'VendorProductName': 'County Sales Tax',
                        'lineTotal': 1948.80,
                        'qty': 9744,
                        'unitPrice': 0.20,
                        'description': '',
                        'eRateType': 'PerUnit',
                        'eType': 'SalesTax',
                    },
                    {
                        'itemCode': '182',
                        'VendorProductName': 'Federal Excise Tax - Jet A',
                        'lineTotal': 1802.64,
                        'qty': 9744,
                        'unitPrice': 0.185,
                        'description': '',
                        'eRateType': 'PerUnit',
                        'eType': 'CostTax',
                    },
                ],
            },
            {
                'lineId': 2,
                'itemCode': '76',
                'VendorProductName': 'Ground Power (GPU)',
                'unitOfMeasure': 'each',
                'eProcessingType': 'retail',
                'deliveryTicketNumber': null,
                'deliveryDate': null,
                'qty': 1,
                'unitPrice': 1000,
                'lineTotal': 1000,
                'postedPrice': null,
            },
        ],
    },
}

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