NAV Navbar
csharp Json

Payments

Introduction

Welcome to the ConnexPay API. You can use our API to access all the functionality of our platform.

All endpoints for the API are available on our sandbox. You can also view code samples in the right section of the screen.

We have code samples on different programming languages and we can also assist you with JSON samples, should you need further help don’t hesitate to contact your relationship manager.

Accounts

Token

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Account
    {
        public static void Token()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/token");

                var postData = "grant_type=password";
                postData += "&username=sysadmin";
                postData += "&password=123456";
                var data = Encoding.ASCII.GetBytes(postData);

                request.Method = "POST";
                request.ContentType = "application/x-www-form-urlencoded";
                request.ContentLength = data.Length;

                using (var stream = request.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Response:

{
  "access_token": "eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6EBqB7RFjVMuhmuPNWcYM7ozyMb3uaDe0gyDL_nMPESbuM5I4skBOYcUM4A06NO88CVV3yBYee7mWB1qT-YFu5A3KZJSfRIbTX9GZdrZpi-JuWsx-7GE9GIYrNJ29BpaQscTwxYDr67WiFlCCrsCqWnCPJUjCFRIrTDltz8vM15mlgjiO0y04ZACGOWNNErIVegX062oydV7SqumGJEbS9Av4gdy",
  "token_type": "bearer",
  "expires_in": 863999
}

This endpoint creates a sysadmin token.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/token

Headers

Key Value
Content-Type application/x-www-form-urlencoded

Body

Parameter Type M/C/O Value
grant_type string Mandatory password.
username string Mandatory Username of the sysadmin.
password string Mandatory Password of the sysadmin.

Response

Register user

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Account
    {
        public static void RegisterUser()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/accounts/register");
                request.ContentType = "text/json";
                request.Method = "POST";

                var user = new
                {
                    Username = "JohnDoe",
                    Password = "123456",
                    ConfirmPassword = "123456",
                    IsoNumber = "1000",
                    FirstName = "John",
                    LastName = "Doe",
                    Email = "johndoe@gmail.com",
                    Phone = "9177563046",
                    Address1 = "151 E 33rd ST",
                    Address2 = "Second Floor",
                    City = "Dallas",
                    State = "TX",
                    Zipcode = "76092"
                };

                string json = JsonConvert.SerializeObject(user);

                request.Headers.Add("Authorization", "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6EBqB7RFjVMuhmuPNWcYM7ozyMb3uaDe0gyDL_nMPESbuM5I4skBOYcUM4A06NO88CVV3yBYee7mWB1qT-YFu5A3KZJSfRIbTX9GZdrZpi-JuWsx-7GE9GIYrNJ29BpaQscTwxYDr67WiFlCCrsCqWnCPJUjCFRIrTDltz8vM15mlgjiO0y04ZACGOWNNErIVegX062oydV7SqumGJEbS9Av4gdy");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }  
    }
}

Json Example Request:

{
 "Username": "JohnDoe",
 "Password": "123456",
 "ConfirmPassword": "123456",
 "IsoNumber": "5000",
 "FirstName": "John",
 "LastName": "Doe",
 "Email": "johndoe@gmail.com",
 "Phone": "9177563046",
 "Address1": "151 E 33rd ST",
 "Address2": "Second Floor",
 "City": "Dallas",
 "State": "TX",
 "Zipcode": "76092"
}

Json Example Response:

{
  "id": "QyDhkzJXRRW8ydteUtCgGA",
  "userName": "JohnDoe",
  "isoNumber": 1000,
  "firstName": "John",
  "lastName": "Doe",
  "email": "johndoe@gmail.com",
  "phone": "9177563046",
  "status": "User - Active",
  "address1": "151 E 33rd ST",
  "address2": "Second Floor",
  "city": "Dallas",
  "state": "TX",
  "zipcode": "76092",
  "accountNumber": "18746957"
}

This endpoint registers a user.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/accounts/register

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
Username string Mandatory Selected username.
Password string Mandatory Selected password.
ConfirmPassword string Mandatory Selected password.
IsoNumber integer Mandatory Iso number.
FirstName string Mandatory User’s first name.
LastName string Mandatory User’s last name.
Email string Mandatory User’s valid email address.
Phone integer Mandatory User’s phone number. The phone number must be syntactically correct. For example, 4152345678.
Address1 string Mandatory User’s address line 1.
Address2 string Optional User’s address line 2.
City string Mandatory User’s city.
State string Mandatory User’s short name state. The ISO 3166-2 CA and US state or province code of a user. Length = 2.
Zipcode integer Mandatory User’s zipcode. Length = 5.

Response

Change user password

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Account
    {
        public static void ChangeUserPassword()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/accounts/ChangePassword");
                request.ContentType = "text/json";
                request.Method = "POST";

                var user = new
                {
                    Username = "JohnDoe",
                    OldPassword = "123456",
                    NewPassword = "qwerty",
                    ConfirmPassword = "qwerty"
                };

                string json = JsonConvert.SerializeObject(user);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }   
    }
}

Json Example Request:

{
  "Username": "JohnDoe",
  "OldPassword": "123456",
  "NewPassword": "qwerty",
  "ConfirmPassword": "qwerty"
}

Json Example Response:

{
  "message": "Success"
}

This endpoint changes user's password.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/accounts/ChangePassword

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
Username string Mandatory User’s username.
OldPassword string Mandatory User’s old password.
NewPassword string Mandatory User’s new password.
ConfirmPassword string Mandatory User’s new password.

Response

Reset user password request

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Account
    {
        public static void ResetUserPasswordRequest()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/accounts/ResetPasswordRequest");
                request.ContentType = "text/json";
                request.Method = "POST";

                var user = new
                {
                    UserName = "JohnDoe"
                };

                string json = JsonConvert.SerializeObject(user);

                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
  "UserName": "JohnDoe"
}

Json Example Response:

{
  "message": "Success. Email sent."
}

This endpoint generates user's password change request.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/accounts/ResetPasswordRequest

Headers

Key Value
Content-Type "application/json"

Query Parameters

Parameter Type M/C/O Value
Username string Mandatory User’s username.

Response

Reset user password

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Account
    {
        public static void ResetUserPassword()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/accounts/ResetPassword");
                request.ContentType = "text/json";
                request.Method = "POST";

                var user = new
                {
                    Key = "3a89ad7b706f418291423159b9ab95d0ecd384bcfe814acca35dc759aa22ea0f",
                    NewPassword = "abcdef",
                    ConfirmPassword = "abcdef"
                };

                string json = JsonConvert.SerializeObject(user);

                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
  "Key": "db92b207a57a48989924788199fbc104e3034780e4904df49d857320bce0e7de",
  "NewPassword": "123457",
  "ConfirmPassword": "123457"
}

Json Example Response:

{
  "message": "Success. Password changed."
}

This endpoint resets user's password.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/accounts/ResetPassword

Headers

Key Value
Content-Type "application/json"

Query Parameters

Parameter Type M/C/O Value
Key string Mandatory Key sent to user email.
NewPassword string Mandatory User’s new password.
ConfirmPassword string Mandatory User’s new password.

Response

Device

Get all devices

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Device
    {
        public static void GetAllDevices()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/devices");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "guid": "80fa8f43-701e-441a-959b-1b597b22a0d5",
            "name": "Terminal 2",
            "merchantProcessorAccountGuid": "4aa19b68-910e-4e27-b62d-260235935fcd",
            "status": "Device - Active",
            "statementDescription": "LaPana CBA",
            "processorId": "88800000284901",
            "processorOperatingUserId": "TA5232401",
            "processorStatusCode": "A0000",
            "transactionType": "Card",
            "wasProcessed": true
        }
    ]
}

This endpoint gets all devices.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/devices

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Sale

Create sale

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Sale
    {
        public static void CreateSale()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales");
                request.ContentType = "text/json";
                request.Method = "POST";

                var sale = new
                {
                    DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
                    Amount = "1500",
                    SequenceNumber = "849741",
                    RiskProcessingOnly = false,
                    StatementDescription = "Agent Booking 123",
                    ConnexPayTransaction = new
                    {
                        ExpectedPayments = "9"
                    },
                    RiskData = new
                    {
                        Name = "John Doe",
                        Gender = "M",
                        DateOfBirth = "1993-03-18",
                        BillingAddress1 = "151 E 33rd St",
                        BillingAddress2 = "Second Floor",
                        BillingCity = "New York",
                        BillingState = "NY",
                        BillingPostalCode = "10016",
                        BillingCountryCode = "US",
                        Email = "johnd@gmail.com",
                        ProductType = "Flight",
                        ProductDesc = "Flight from London to New York",
                        ProductItem = "784GTWJFK856",
                        ProductQuantity = "4",
                        ProductPrice = "42400",
                        CardHolderPhoneNumber = "9177563046",
                        OrderNumber = "857B2",
                        SellerId = "AG75597",
                        FlightData = new
                        {
                            Airline = "American Airlines",
                            DepartureAirport = "Gatwick",
                            DepartureDate = "2020-06-30",
                            DestinationAirport = "JFK",
                            HoursToDeparture = "5",
                            JourneyType = "Day",
                            Route = "Direct",
                            RouteByCountry = "UK, USA"
                        },
                        FlightPassengers = new FlightPassenger[]
                        {
                            new FlightPassenger{
                                Country = "USA",
                                DateOfBirth = "1990-12-07",
                                Id = "89456489",
                                Name = "Adam Smith"
                            },
                            new FlightPassenger{
                                Country = "ARG",
                                DateOfBirth = "1995-05-05",
                                Id = "74566",
                                Name = "John Lock"
                            }
                        },
                        CustomParameters = new CustomParameter[]
                        {
                            new CustomParameter{
                                Name = "ClientSpecific1",
                                Value = "Traveling"
                            },
                            new CustomParameter{
                                Name = "ClientSpecific2",
                                Value = "wounderful"
                            }
                        }
                    },
                    Card = new
                    {
                        CardNumber = "4716317307520473",
                        ExpirationDate = "1912",
                        Customer = new
                        {
                            FirstName = "John",
                            LastName = "Doe",
                            Phone = "9177563007",
                            City = "New York",
                            State = "NY",
                            Country = "US",
                            Email = "johnd@gmail.com",
                            Address1 = "107 7th Av.",
                            Address2 = "",
                            Zip = "10007",
                            DateOfBirth = "1990-12-07",
                            DriverLicenseNumber = "12345678",
                            DriverLicenseState = "TX",
                            SSN4 = "1210"
                        }
                    }
                };

                string json = JsonConvert.SerializeObject(sale);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
  "DeviceGuid" : "fde63679-0c47-4a9c-9b47-82cdf1929851",
  "Amount" : 1500,
  "SequenceNumber" : "849741",
  "RiskProcessingOnly" : false,
  "StatementDescription" : "Agent Booking 123",
  "ConnexPayTransaction" : {
    "ExpectedPayments" : 9
  },
  "RiskData" : {
    "Name" : "John Doe",
    "Gender" : "M",
    "DateOfBirth" : "1993-03-18",
    "BillingAddress1" : "151 E 33rd St",
    "BillingAddress2" : "Second Floor",
    "BillingCity" : "New York",
    "BillingState" : "NY",
    "BillingPostalCode" : "10016",
    "BillingCountryCode" : "US",
    "Email" : "johnd@gmail.com",
    "ProductType" : "Flight",
    "ProductDesc" : "Flight from London to New York",
    "ProductItem" : "784GTWJFK856",
    "ProductQuantity" : 4,
    "ProductPrice" : "42400",
    "CardHolderPhoneNumber" : "9177563046",
    "OrderNumber" : "857B2",
    "SellerId" : "AG75597",
    "FlightData" : {
        "Airline" : "American Airlines",
        "DepartureAirport" : "Gatwick",
        "DepartureDate" : "2020-06-30",
        "DestinationAirport" : "JFK",
        "HoursToDeparture" : 5,
        "JourneyType" : "Day",
        "Route" : "Direct",
        "RouteByCountry" : "UK, USA"
    },
    "FlightPassengers" : [
        {
            "Country" : "USA",
            "DateOfBirth" : "1990-12-07",
            "Id" : "89456489",
            "Name" : "Adam Smith"
        },
        {
            "Country" : "ARG",
            "DateOfBirth" : "1995-05-05",
            "Id" : "74566",
            "Name" : "John Lock"
        }
    ],
    "CustomParameters" : [
        {
            "Name" : "ClientSpecific1",
            "Value" : "Traveling"
        },
        {
            "Name" : "ClientSpecific2",
            "Value" : "wounderful"
        }
    ]
  },
  "Card": {
    "CardNumber" : "4716317307520473",
    "ExpirationDate" : "1912",
    "Customer": {
      "FirstName" : "John",
      "LastName" : "Doe",
      "Phone" : "9177563007",
      "City" : "New York",
      "State" : "NY",
      "Country" : "US",
      "Email" : "johnd@gmail.com",
      "Address1" : "107 7th Av.",
      "Address2" : "",
      "Zip" : "10007",
      "DateOfBirth" : "1990-12-07",
      "DriverLicenseNumber" : "12345678",
      "DriverLicenseState" : "TX",
      "SSN4" : "1210"
    }
  }
}

Json Example Response:

{
    "guid": "59344814-87c2-4a62-9859-9b0f5ecadf1e",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2018-09-10T10:36:13.77-03:00",
    "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
    "amount": 1500,
    "effectiveAmount": 1500,
    "riskResponse": {
        "transactionId": "79S001R5ND45",
        "response": "Approved",
        "reason": "",
        "score": "34"
    },
    "cardDataSource": "INTERNET",
    "batchGuid": "efb9bfdf-56b9-46de-8b93-28c549e8be92",
    "connexPayTransaction": {
        "guid": "87e94cdf-6f5c-41c7-8c7e-0815b56796f9",
        "expectedPayments": 9,
        "filler": "ZZZ",
        "incomingTransCode": "09ZZZTAS35609101800150000"
    },
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "authCode": "TAS356",
    "refNumber": "16286858",
    "invoiceNumber": "16286858",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n09/10/2018 09:36:16\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0473\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 16286858\\nInvoice number : 16286858\\nAUTH CODE : TAS356\\nSubtotal:                    $1,500.00\\n--------------------------------------\\nTotal:                       $1,500.00\\n--------------------------------------\\n\\n\\n\\n\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "statementDescription": "Agent Booking 123",
    "generatedBy": "maxtomassi",
    "card": {
        "first4": "4716",
        "last4": "0473",
        "cardNumber": "nr959X7eCIXI0473",
        "cardType": "Visa",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "829e2d67-6831-4aa0-85b3-58a46101651b",
            "firstName": "John",
            "lastName": "Doe",
            "dateOfBirth": "1990-12-07T00:00:00",
            "address1": "107 7th Av.",
            "address2": "",
            "zip": "10007",
            "city": "New York",
            "state": "NY",
            "country": "US",
            "phone": "9177563007",
            "email": "johnd@gmail.com",
            "ssN4": "1210",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX"
        }
    },
    "sequenceNumber": "849741",
    "riskProcessingOnly": false
}

The Sale transaction is used to charge a credit card. When running a sale you’re authorizing an amount on a credit card that will make the settlement of that amount at the end of the day. The sale is just like running an AuthOnly and a Capture all together.

This endpoint creates a sale.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/sales

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device's Guid.
Amount decimal Mandatory Amount of the transaction. Min. amt.: $0.50
SequenceNumber string Optional Your transaction sequence number.
RiskProcessingOnly boolean Optional Allowed values:

1. Set to true will only run risk validations.
2. Set to false will run risk validations and an authorization on the card. For this option a Processing Merchant account is required, contact ConnexPay support if any questions.
3. Set to NULL and your Merchant Level settings would apply. Please contact ConnexPay support for further information.
StatementDescription string Optional Merchant's name on customer receipt after settlement for this specific sale. Max length = 25.
ConnexPayTransaction
ExpectedPayments integer Mandatory Expected Payments.
RiskData
Name string Optional Customer's name.
Gender string Mandatory Customer's gender. "M" or "F".
DateOfBirth string Optional Customer's date of birth.
BillingAddress1 string Optional Customer's billing address1.
BillingAddress2 string Optional Customer's billing address2.
BillingCity string Optional Customer's billing city.
BillingState string Optional Customer's billing state.
BillingPostalCode string Optional Customer's billing postal code.
BillingCountryCode string Optional Customer's billing country code.
Email string Optional Customer's valid email address.
ProductType string Mandatory Generalized description of the item added passed as plain text.
ProductDesc string Optional Attribute for a specific description of the item being purchased i.e. airline ticket.
ProductItem string Mandatory Typically the SKU for an item passed as plain text; this value should be free from any markup or Unicode values.
ProductQuantity integer Optional Quantity of the item being purchased.
ProductPrice decimal Optional Total price. Must be a natural number including 0.
CardHolderPhoneNumber integer Optional CardHolder Phone Number.
OrderNumber string Optional Order Number.
SellerId string Optional SellerId.
FlightData object Optional Flight Data.
FlightPassengers object[] Optional Flight Passengers. Array.
CustomParameters object[] Optional Custom Parameters. Array.
FlightData
Airline string Optional Name of Airline.
DepartureAirport string Optional Departure Airport Code.
DepartureDate date Optional Departure date of flight. Formatted as YYYY-MM-DD or YYYY-MM-DD HH:MI:SS.
DestinationAirport string Optional Destination Airport Code.
HoursToDeparture string Optional Time in hours to flight departure.
JourneyType string Optional Round Trip / One Way.
Route string Optional Complete flight route.
RouteByCountry string Optional Complete flight route by country.
FlightPassengers
Country string Optional Country of origin of passenger.
DateOfBirth date Optional DOB of first passenger.
Id string Optional Passport of first passenger.
Name string Optional Name of first passenger.
CustomParameters
Name string Optional Custom Parameter's Name.
Value string Optional Custom Parameter's Value.
Card
CardNumber string Mandatory Card number. Must be 16 characters. (example: 4532538795426624) or token (example: FfL7exC7Xe2y6624).
CardHolderName string Optional Cardholder's name.
Cvv2 integer Optional This is the three or four digit CVV code at the back side of the credit and debit card.
ExpirationDate date Optional with Token Card's expiry date in the YYMM format.
Customer object Optional Customer.
Customer
FirstName string Optional Customer's first name.
LastName string Optional Customer's last name.
Phone integer Optional Customer's phone number. The phone number must be syntactically correct. For example, 4152345678.
City string Optional Customer's city.
State string Optional Customer's short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
Country string Optional Customer's country. The ISO country code of a customer’s country. Length = 2 or 3.
Email string Optional Customer's valid email address.
Address1 string Optional Customer's address.
Address2 string Optional Customer's address line 2.
Zip integer Optional Customer's zipcode. Length = 5.
DateOfBirth date Optional Customer's date of birth.

Allowed format:

YYYY-MM-DD.
For example: 2002-05-30
DriverLicenseNumber integer Optional Customer's driver license number.
DriverLicenseState string Mandatory when DriverLicenseNumber is provided Customer's driver license short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
SSN4 integer Mandatory when DOB is not submitted Customer's social security number.

Response

Get sale

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Sale
    {
        public static void GetSale()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales/59344814-87c2-4a62-9859-9b0f5ecadf1e");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "guid": "8dd924c8-6a62-461b-be81-67be8eb3fb83",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2018-10-17T09:04:42.4-03:00",
    "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
    "amount": 1500,
    "effectiveAmount": 1500,
    "cardDataSource": "INTERNET",
    "batchGuid": "bb066d2a-f8b9-4eab-8630-49cae3c8599a",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "authCode": "TAS556",
    "refNumber": "16662674",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n10/17/2018 08:04:46\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0473\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 16662674\\nInvoice number : 16662674\\nAUTH CODE : TAS556\\nSubtotal:                    $1,500.00\\n--------------------------------------\\nTotal:                       $1,500.00\\n--------------------------------------\\n\\n\\n\\n\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "statementDescription": "Agent Booking 123",
    "generatedBy": "maxtomassi",
    "card": {
        "first4": "4716",
        "last4": "0473",
        "cardNumber": "nr959X7eCIXI0473",
        "cardType": "Visa",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "4f17d05c-0b23-4777-b93e-8a9ad88e14ed",
            "firstName": "John",
            "lastName": "Doe",
            "dateOfBirth": "1990-12-07T00:00:00",
            "address1": "107 7th Av.",
            "address2": "",
            "zip": "10007",
            "city": "New York",
            "state": "NY",
            "country": "US",
            "phone": "9177563007",
            "email": "johnd@gmail.com",
            "ssN4": "1210",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX"
        }
    },
    "sequenceNumber": "849741"
}

This endpoint gets a sale.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/sales/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Sale’s guid to get

Response

Get all sales

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Sale
    {
        public static void GetAllSales()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }  
    }
}

Json Example Response:

[
    {
        "guid": "8dd924c8-6a62-461b-be81-67be8eb3fb83",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2018-10-17T09:04:42.4-03:00",
        "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
        "amount": 1500,
        "effectiveAmount": 1500,
        "cardDataSource": "INTERNET",
        "batchGuid": "bb066d2a-f8b9-4eab-8630-49cae3c8599a",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "TAS556",
        "refNumber": "16662674",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n10/17/2018 08:04:46\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0473\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 16662674\\nInvoice number : 16662674\\nAUTH CODE : TAS556\\nSubtotal:                    $1,500.00\\n--------------------------------------\\nTotal:                       $1,500.00\\n--------------------------------------\\n\\n\\n\\n\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "statementDescription": "Agent Booking 123",
        "generatedBy": "maxtomassi",
        "card": {
            "first4": "4716",
            "last4": "0473",
            "cardNumber": "nr959X7eCIXI0473",
            "cardType": "Visa",
            "expirationDate": "2019-12",
            "customer": {
                "guid": "4f17d05c-0b23-4777-b93e-8a9ad88e14ed",
                "firstName": "John",
                "lastName": "Doe",
                "dateOfBirth": "1990-12-07T00:00:00",
                "address1": "107 7th Av.",
                "address2": "",
                "zip": "10007",
                "city": "New York",
                "state": "NY",
                "country": "US",
                "phone": "9177563007",
                "email": "johnd@gmail.com",
                "ssN4": "1210",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX"
            }
        },
        "sequenceNumber": "849741"
    }
]

This endpoint gets all sales.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/sales

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Sales by batch

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Sale
    {
        public static void GetSaleByBatch()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales/Batch/a72cf7fa-9169-421c-a7b8-9ebc6cd3e1ef");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
    {
        "guid": "3655dd43-4718-48c7-a09a-001435b3193d",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2018-09-10T09:25:06.72-03:00",
        "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
        "amount": 1500,
        "effectiveAmount": 1500,
        "cardDataSource": "INTERNET",
        "batchGuid": "efb9bfdf-56b9-46de-8b93-28c549e8be92",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "TAS135",
        "refNumber": "16286250",
        "invoiceNumber": "16286250",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n09/10/2018 08:25:09\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0473\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 16286250\\nInvoice number : 16286250\\nAUTH CODE : TAS135\\nSubtotal:                    $1,500.00\\n--------------------------------------\\nTotal:                       $1,500.00\\n--------------------------------------\\n\\n\\n\\n\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "generatedBy": "maxtomassi",
        "card": {
            "first4": "4716",
            "last4": "0473",
            "cardNumber": "nr959X7eCIXI0473",
            "cardType": "Visa",
            "expirationDate": "2019-12"
        }
    },
    {
        "guid": "8dd924c8-6a62-461b-be81-67be8eb3fb83",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2018-10-17T09:04:42.4-03:00",
        "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
        "amount": 1500,
        "effectiveAmount": 1500,
        "cardDataSource": "INTERNET",
        "batchGuid": "bb066d2a-f8b9-4eab-8630-49cae3c8599a",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "TAS556",
        "refNumber": "16662674",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n10/17/2018 08:04:46\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0473\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 16662674\\nInvoice number : 16662674\\nAUTH CODE : TAS556\\nSubtotal:                    $1,500.00\\n--------------------------------------\\nTotal:                       $1,500.00\\n--------------------------------------\\n\\n\\n\\n\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "statementDescription": "Agent Booking 123",
        "generatedBy": "maxtomassi",
        "card": {
            "first4": "4716",
            "last4": "0473",
            "cardNumber": "nr959X7eCIXI0473",
            "cardType": "Visa",
            "expirationDate": "2019-12",
            "customer": {
                "guid": "4f17d05c-0b23-4777-b93e-8a9ad88e14ed",
                "firstName": "John",
                "lastName": "Doe",
                "dateOfBirth": "1990-12-07T00:00:00",
                "address1": "107 7th Av.",
                "address2": "",
                "zip": "10007",
                "city": "New York",
                "state": "NY",
                "country": "US",
                "phone": "9177563007",
                "email": "johnd@gmail.com",
                "ssN4": "1210",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX"
            }
        },
        "sequenceNumber": "849741"
    }
]

This endpoint searches all sales by batch.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/sales/Batch/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Batch’s guid to get

Response

Timeout Reversal

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class TimeoutReversal
    {
        public static void TimeoutReversal()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/timeoutreversal");
                request.ContentType = "text/json";
                request.Method = "POST";

                var timeoutReversal = new
                {
                    DeviceGuid = "4b5013f7-b275-4929-8e83-0167c6edf639",
                    SequenceNumber = "849741"
                };

                string json = JsonConvert.SerializeObject(timeoutReversal);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
  "DeviceGuid" : "4b5013f7-b275-4929-8e83-0167c6edf639",
  "SequenceNumber": "849741"
}

Json Example Response:

"Device Guid and Sequence Number combination found and voided."

You might run a Timeout Reversal when you did not get a response and you want to cancel the sale in case it was approved and you were not notified.

This endpoint creates a timeout reversal.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/timeoutreversal

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.
SequenceNumber string Optional Your transaction sequence number.

Response

AuthOnly

Create AuthOnly

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class AuthOnly
    {
        public static void CreateAuthOnly()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys");
                request.ContentType = "text/json";
                request.Method = "POST";

                var authOnly = new
                {
                    DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
                    Amount = "15.50",
                    Card = new
                    {
                        CardNumber = "4485754899788507",
                        CardHolderName = "John Doe",
                        Cvv2 = "999",
                        ExpirationDate = "1912",
                        Customer = new
                        {
                            FirstName = "John",
                            LastName = "Doe",
                            Phone = "9177563007",
                            City = "New York",
                            State = "NY",
                            Country = "US",
                            Email = "johnd@gmail.com",
                            Address1 = "107 7th Av.",
                            Address2 = "",
                            Zip = "10006",
                            DateOfBirth = "1990-12-07",
                            DriverLicenseNumber = "12345678",
                            DriverLicenseState = "TX",
                            SSN4 = "1210"
                        }
                    }
                };

                string json = JsonConvert.SerializeObject(authOnly);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
  "DeviceGuid" : "fde63679-0c47-4a9c-9b47-82cdf1929851",
  "Amount" : 15.50,
  "Card":
  {
    "CardNumber" : "4485754899788507",
    "CardHolderName" : "John Doe",
    "Cvv2" : "999",
    "ExpirationDate" : "1912",
    "Customer":
    {
      "FirstName" : "John",
      "LastName" : "Doe",
      "Phone" : "9177563007",
      "City" : "New York",
      "State" : "NY",
      "Country" : "US",
      "Email" : "johnd@gmail.com",
      "Address1" : "107 7th Av.",
      "Address2" : "",
      "Zip" : "10007",
      "DateOfBirth" : "1990-12-07",
      "DriverLicenseNumber" : "12345678",
      "DriverLicenseState" : "TX",
      "SSN4" : "1210"
    }
  }
}

Json Example Response:

{
    "guid": "9d973cf7-4e18-4b5d-879f-04940ce237a5",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2018-07-02T13:37:39.9-03:00",
    "amount": 15.5,
    "effectiveAmount": 15.5,
    "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
    "cardDataSource": "INTERNET",
    "batchGuid": "d5610f19-8cf4-42fb-ae72-b0442f3b3fd6",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "authCode": "TAS957",
    "refNumber": "15872604",
    "invoiceNumber": "15872604",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/02/2018 12:37:42\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 8507\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 15872604\\nInvoice number : 15872604\\nAUTH CODE : TAS957\\nSubtotal:                       $15.50\\n--------------------------------------\\nTotal:                          $15.50\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "card": {
        "first4": "4485",
        "last4": "8507",
        "cardNumber": "S2guBjeE8Eix8507",
        "cardHolderName": "John Doe",
        "cardType": "Visa",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "3d38d57e-f82f-4068-9d8f-5dd94c5bc0f5",
            "firstName": "John",
            "lastName": "Doe",
            "dateOfBirth": "1990-12-07T00:00:00",
            "address1": "107 7th Av.",
            "address2": "",
            "zip": "10007",
            "city": "New York",
            "state": "NY",
            "country": "US",
            "phone": "9177563007",
            "email": "johnd@gmail.com",
            "ssN4": "1210",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX"
        }
    }
}

You could use the AuthOnly transaction to authorize an amount on a credit card without making the actual settlement of that amount. In this case, you actually reserve an amount for a certain period against the credit limit of the card holder. The sale will be completed only if you run a successful capture later.

This endpoint creates an AuthOnly.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device's Guid.
Amount decimal Mandatory Amount of the transaction. Min. amt.: $0.50
Card
CardNumber string Mandatory Card number. Must be 16 characters. (example: 4532538795426624) or token (example: FfL7exC7Xe2y6624).
CardHolderName string Optional Cardholder's name.
Cvv2 integer Optional This is the three or four digit CVV code at the back side of the credit and debit card.
ExpirationDate date Optional with Token Card's expiry date in the YYMM format.
Customer
FirstName string Optional Customer's first name.
LastName string Optional Customer's last name.
Phone integer Optional Customer's phone number. The phone number must be syntactically correct. For example, 4152345678.
City string Optional Customer's city.
State string Optional Customer's short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
Country string Optional Customer's country. The ISO country code of a customer’s country. Length = 2 or 3.
Email string Optional Customer's valid email address.
Address1 string Optional Customer's address.
Address2 string Optional Customer's address line 2.
Zip integer Optional Customer's zipcode. Length = 5.
DateOfBirth date Optional Customer's date of birth.

Allowed format:

YYYY-MM-DD.
For example: 2002-05-30
DriverLicenseNumber integer Optional Customer's driver license number.
DriverLicenseState string Mandatory when DriverLicenseNumber is provided Customer's driver license short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
SSN4 integer Mandatory when DOB is not submitted Customer's social security number.

Response

Get AuthOnly

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class AuthOnly
    {
        public static void GetAuthOnly()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys/9d973cf7-4e18-4b5d-879f-04940ce237a5");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "guid": "9d973cf7-4e18-4b5d-879f-04940ce237a5",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2018-07-02T13:37:39.9-03:00",
    "amount": 15.5,
    "effectiveAmount": 15.5,
    "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
    "cardDataSource": "INTERNET",
    "batchGuid": "d5610f19-8cf4-42fb-ae72-b0442f3b3fd6",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "authCode": "TAS957",
    "refNumber": "15872604",
    "invoiceNumber": "15872604",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/02/2018 12:37:42\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 8507\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 15872604\\nInvoice number : 15872604\\nAUTH CODE : TAS957\\nSubtotal:                       $15.50\\n--------------------------------------\\nTotal:                          $15.50\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "card": {
        "first4": "4485",
        "last4": "8507",
        "cardNumber": "S2guBjeE8Eix8507",
        "cardHolderName": "John Doe",
        "cardType": "Visa",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "3d38d57e-f82f-4068-9d8f-5dd94c5bc0f5",
            "firstName": "John",
            "lastName": "Doe",
            "dateOfBirth": "1990-12-07T00:00:00",
            "address1": "107 7th Av.",
            "address2": "",
            "zip": "10007",
            "city": "New York",
            "state": "NY",
            "country": "US",
            "phone": "9177563007",
            "email": "johnd@gmail.com",
            "ssN4": "1210",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX"
        }
    }
}

This endpoint gets an AuthOnly.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid AuthOnly’s guid to get

Response

Get all AuthOnlys

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class AuthOnly
    {
        public static void GetAllAuthOnlys()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
{
    "guid": "9d973cf7-4e18-4b5d-879f-04940ce237a5",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2018-07-02T13:37:39.9-03:00",
    "amount": 15.5,
    "effectiveAmount": 15.5,
    "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
    "cardDataSource": "INTERNET",
    "batchGuid": "d5610f19-8cf4-42fb-ae72-b0442f3b3fd6",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "authCode": "TAS957",
    "refNumber": "15872604",
    "invoiceNumber": "15872604",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/02/2018 12:37:42\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 8507\\nCARD TYPE : VISA\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 15872604\\nInvoice number : 15872604\\nAUTH CODE : TAS957\\nSubtotal:                       $15.50\\n--------------------------------------\\nTotal:                          $15.50\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "card": {
        "first4": "4485",
        "last4": "8507",
        "cardNumber": "S2guBjeE8Eix8507",
        "cardHolderName": "John Doe",
        "cardType": "Visa",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "3d38d57e-f82f-4068-9d8f-5dd94c5bc0f5",
            "firstName": "John",
            "lastName": "Doe",
            "dateOfBirth": "1990-12-07T00:00:00",
            "address1": "107 7th Av.",
            "address2": "",
            "zip": "10007",
            "city": "New York",
            "state": "NY",
            "country": "US",
            "phone": "9177563007",
            "email": "johnd@gmail.com",
            "ssN4": "1210",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX"
        }
    }
}
]

This endpoint gets all AuthOnlys.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/AuthOnlys

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Capture

Create capture

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Capture
    {
        public static void CreateCapture()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Captures");
                request.ContentType = "text/json";
                request.Method = "POST";

                var capture = new
                {
                    DeviceGuid = "4b5013f7-b275-4929-8e83-0167c6edf639",
                    AuthOnlyGuid = "c8741761-10fe-4530-be84-b1289dcdb9a7",
                    NewAmount = "90.00"
                };

                string json = JsonConvert.SerializeObject(capture);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
  "DeviceGuid" : "4b5013f7-b275-4929-8e83-0167c6edf639",
  "AuthOnlyGuid" : "c8741761-10fe-4530-be84-b1289dcdb9a7",
  "NewAmount" : 90.00
}

Json Example Response:

{
    "guid": "cf05ed0a-f9df-4e62-b613-61323a37c14e",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T10:58:25.95",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "authOnlyGuid": "539e87eb-54a2-44da-8980-62667d81d95c",
    "newAmount": 90,
    "effectiveAmount": 90,
    "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "refNumber": "13283616",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:58:29\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "authOnly": {
        "guid": "539e87eb-54a2-44da-8980-62667d81d95c",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T10:51:39.73",
        "amount": 90,
        "effectiveAmount": 90,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "customData": "order details",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0002",
        "processorResponseMessage": "Partially Approved",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283616",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:51:43\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nPartially Approved\\n\\n\\n\\n\\nCustomer Copy\\n",
        "card": {
            "first4": "5175",
            "last4": "4418",
            "cardNumber": "dfTsPKwGQIUf4418",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-12",
            "customer": {
                "guid": "53d38181-c766-48bd-acb7-37c12b6ddbeb",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563006",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10006",
                "address1": "106 6th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1986-06-06T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    },
    "relatedSale": {
        "guid": "34f87b4e-3345-4c01-96de-c4257c38e822",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T10:58:27.37",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 90,
        "effectiveAmount": 90,
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "wasProcessed": true
    }
}

The Capture transaction is used to collect the money that you had asked during the AuthOnly transaction. You need to provide the AuthOnlyGuid that you received when you ran the AuthOnly.

This endpoint creates a capture.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Captures

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.
AuthOnlyGuid string Mandatory AuthOnly’s Guid.
NewAmount decimal Optional Transaction's new amount. Min. amt.: $0.50

Response

Get capture

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Capture
    {
        public static void GetCapture()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Captures/cf05ed0a-f9df-4e62-b613-61323a37c14e");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "guid": "cf05ed0a-f9df-4e62-b613-61323a37c14e",
    "status": "Transaction - Approved",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T10:58:25.95",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "authOnlyGuid": "539e87eb-54a2-44da-8980-62667d81d95c",
    "newAmount": 90,
    "effectiveAmount": 90,
    "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
    "processorStatusCode": "A0000",
    "processorResponseMessage": "Success",
    "wasProcessed": true,
    "refNumber": "13283616",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:58:29\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "authOnly": {
        "guid": "539e87eb-54a2-44da-8980-62667d81d95c",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T10:51:39.73",
        "amount": 90,
        "effectiveAmount": 90,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "customData": "order details",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0002",
        "processorResponseMessage": "Partially Approved",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283616",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:51:43\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nPartially Approved\\n\\n\\n\\n\\nCustomer Copy\\n",
        "card": {
            "first4": "5175",
            "last4": "4418",
            "cardNumber": "dfTsPKwGQIUf4418",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-12",
            "customer": {
                "guid": "53d38181-c766-48bd-acb7-37c12b6ddbeb",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563006",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10006",
                "address1": "106 6th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1986-06-06T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    },
    "relatedSale": {
        "guid": "34f87b4e-3345-4c01-96de-c4257c38e822",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T10:58:27.37",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 90,
        "effectiveAmount": 90,
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "wasProcessed": true
    }
}

This endpoint gets a capture.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/Captures/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Capture’s guid to get

Response

Get all captures

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Capture
    {
        public static void GetAllCaptures()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Captures");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
    {
        "guid": "cf05ed0a-f9df-4e62-b613-61323a37c14e",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T10:58:25.95",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "authOnlyGuid": "539e87eb-54a2-44da-8980-62667d81d95c",
        "newAmount": 90,
        "effectiveAmount": 90,
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "refNumber": "13283616",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:58:29\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "authOnly": {
            "guid": "539e87eb-54a2-44da-8980-62667d81d95c",
            "status": "Transaction - Approved",
            "batchStatus": "Batch - Open",
            "timeStamp": "2017-07-11T10:51:39.73",
            "amount": 90,
            "effectiveAmount": 90,
            "orderNumber": "11518",
            "orderDate": "2017-02-03T00:00:00",
            "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
            "customData": "order details",
            "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
            "processorStatusCode": "A0002",
            "processorResponseMessage": "Partially Approved",
            "wasProcessed": true,
            "authCode": "VTLMC1",
            "refNumber": "13283616",
            "invoiceNumber": "11518",
            "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 06:51:43\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 4418\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283616\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $90.00\\n--------------------------------------\\nTotal:                          $90.00\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nPartially Approved\\n\\n\\n\\n\\nCustomer Copy\\n",
            "card": {
                "first4": "5175",
                "last4": "4418",
                "cardNumber": "dfTsPKwGQIUf4418",
                "cardHolderName": "John Doe",
                "expirationDate": "2019-12",
                "customer": {
                    "guid": "53d38181-c766-48bd-acb7-37c12b6ddbeb",
                    "firstName": "John",
                    "lastName": "Doe",
                    "phone": "9177563006",
                    "city": "New York",
                    "country": "US",
                    "email": "johnd@gmail.com",
                    "zip": "10006",
                    "address1": "106 6th Av.",
                    "address2": "",
                    "state": "NY",
                    "dateOfBirth": "1986-06-06T00:00:00",
                    "driverLicenseNumber": "12345678",
                    "driverLicenseState": "TX",
                    "ssN4": "1210"
                }
            }
        },
        "relatedSale": {
            "guid": "34f87b4e-3345-4c01-96de-c4257c38e822",
            "status": "Transaction - Approved",
            "batchStatus": "Batch - Open",
            "timeStamp": "2017-07-11T10:58:27.37",
            "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
            "amount": 90,
            "effectiveAmount": 90,
            "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
            "wasProcessed": true
        }
    }
]

This endpoint gets all captures.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/Captures

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Void

Create void

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Void
    {
        public static void CreateVoid()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/void");
                request.ContentType = "text/json";
                request.Method = "POST";

                var void1 = new
                {
                    DeviceGuid = "4b5013f7-b275-4929-8e83-0167c6edf639",
                    SaleGuid = "c5ac2017-99cb-4b1f-a90e-142cc82b21e5",
                    VoidReason = "DEVICE_TIMEOUT"
                };

                string json = JsonConvert.SerializeObject(void1);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
  "DeviceGuid" : "4b5013f7-b275-4929-8e83-0167c6edf639",
  "SaleGuid": "c5ac2017-99cb-4b1f-a90e-142cc82b21e5",
  "VoidReason": "DEVICE_TIMEOUT"
}

Json Example Response:

{
    "guid": "7a4ef786-8288-404d-9340-e837d06784af",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T11:05:46.31",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "saleGuid": "bfff1a26-4207-4871-9597-48282e3fcfea",
    "status": "Transaction - Approved",
    "voidReason": "DEVICE_TIMEOUT",
    "processorStatusCode": "A0000",
    "wasProcessed": true,
    "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
    "authCode": "VTLMC1",
    "refNumber": "13283644",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:50\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "sale": {
        "guid": "bfff1a26-4207-4871-9597-48282e3fcfea",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T11:05:24.65",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 19.74,
        "effectiveAmount": 0,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283644",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:27\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "customData": "order details",
        "card": {
            "first4": "5306",
            "last4": "0213",
            "cardNumber": "1zcGT7J4pkGh0213",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-07",
            "customer": {
                "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563007",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10007",
                "address1": "107 7th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1987-07-07T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    }
}

You can run a Void when you need to cancel a sale that has not been settled yet or an authOnly. To void a sale you need to provide the SaleGuid or SaleReferenceNumber that you received when you ran the Sale. To void an authOnly you need to provide the AuthOnlyGuid or AuthOnlyReferenceNumber that you received when you ran the authOnly.

This endpoint creates a void.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/void

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.
SaleGuid string Mandatory when SaleReferenceNumber, AuthOnlyGuid and AuthOnlyReferenceNumber field are not sent Sale’s Guid.
SaleReferenceNumber integer Mandatory when SaleGuid, AuthOnlyGuid and AuthOnlyReferenceNumber field are not sent SaleReferenceNumber.
AuthOnlyGuid string Mandatory when SaleGuid, SaleReferenceNumber and AuthOnlyReferenceNumber field are not sent AuthOnlyGuid’s Guid.
AuthOnlyReferenceNumber integer Mandatory when SaleGuid, SaleReferenceNumber and AuthOnlyGuid field are not sent AuthOnlyReferenceNumber.
VoidReason string Optional Indicates the reason the transaction was voided.

Allowed values:

1. POST_AUTH_USER_DECLINE
2. DEVICE_TIMEOUT
3. DEVICE_UNAVAILABLE
4. PARTIAL_REVERSAL
5. TORN_TRANSACTIONS
6. POST_AUTH_CHIP_DECLINE

Note: Send either SaleGuid, SaleReferenceNumber, AuthOnlyGuid or AuthOnlyReferenceNumber field in a request.

Response

Get void

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Void
    {
        public static void GetVoid()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/void/7a4ef786-8288-404d-9340-e837d06784af");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "guid": "7a4ef786-8288-404d-9340-e837d06784af",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T11:05:46.31",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "saleGuid": "bfff1a26-4207-4871-9597-48282e3fcfea",
    "status": "Transaction - Approved",
    "voidReason": "DEVICE_TIMEOUT",
    "processorStatusCode": "A0000",
    "wasProcessed": true,
    "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
    "authCode": "VTLMC1",
    "refNumber": "13283644",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:50\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "sale": {
        "guid": "bfff1a26-4207-4871-9597-48282e3fcfea",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T11:05:24.65",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 19.74,
        "effectiveAmount": 0,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283644",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:27\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "customData": "order details",
        "card": {
            "first4": "5306",
            "last4": "0213",
            "cardNumber": "1zcGT7J4pkGh0213",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-07",
            "customer": {
                "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563007",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10007",
                "address1": "107 7th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1987-07-07T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    }
}

This endpoint gets a void.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/void/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Void’s guid to get

Response

Get all voids

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Void
    {
        public static void GetAllVoids()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/void");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
    {
        "guid": "7a4ef786-8288-404d-9340-e837d06784af",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T11:05:46.31",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "saleGuid": "bfff1a26-4207-4871-9597-48282e3fcfea",
        "status": "Transaction - Approved",
        "voidReason": "DEVICE_TIMEOUT",
        "processorStatusCode": "A0000",
        "wasProcessed": true,
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "authCode": "VTLMC1",
        "refNumber": "13283644",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:50\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "sale": {
            "guid": "bfff1a26-4207-4871-9597-48282e3fcfea",
            "status": "Transaction - Approved",
            "batchStatus": "Batch - Open",
            "timeStamp": "2017-07-11T11:05:24.65",
            "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
            "amount": 19.74,
            "effectiveAmount": 0,
            "orderNumber": "11518",
            "orderDate": "2017-02-03T00:00:00",
            "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
            "processorStatusCode": "A0000",
            "processorResponseMessage": "Success",
            "wasProcessed": true,
            "authCode": "VTLMC1",
            "refNumber": "13283644",
            "invoiceNumber": "11518",
            "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:05:27\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283644\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
            "customData": "order details",
            "card": {
                "first4": "5306",
                "last4": "0213",
                "cardNumber": "1zcGT7J4pkGh0213",
                "cardHolderName": "John Doe",
                "expirationDate": "2019-07",
                "customer": {
                    "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                    "firstName": "John",
                    "lastName": "Doe",
                    "phone": "9177563007",
                    "city": "New York",
                    "country": "US",
                    "email": "johnd@gmail.com",
                    "zip": "10007",
                    "address1": "107 7th Av.",
                    "address2": "",
                    "state": "NY",
                    "dateOfBirth": "1987-07-07T00:00:00",
                    "driverLicenseNumber": "12345678",
                    "driverLicenseState": "TX",
                    "ssN4": "1210"
                }
            }
        }
    }
]

This endpoint gets all voids.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/void

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Return

Create return

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Return
    {
        public static void CreateReturn()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/returns");
                request.ContentType = "text/json";
                request.Method = "POST";

                var returns = new
                {
                    DeviceGuid = "4b5013f7-b275-4929-8e83-0167c6edf639",
                    SaleGuid = "41881e9c-f238-4ff7-8cba-3684bbb8bada",
                    Amount = "19.74"
                };

                string json = JsonConvert.SerializeObject(returns);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
  "DeviceGuid" : "4b5013f7-b275-4929-8e83-0167c6edf639",
  "SaleGuid": "41881e9c-f238-4ff7-8cba-3684bbb8bada",
  "Amount": 19.74
}

Json Example Response:

{
    "guid": "4f31b350-edd1-49fd-a1ad-4b065f78d7b9",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T11:10:38.11",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "saleGuid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
    "status": "Transaction - Approved",
    "amount": 19.74,
    "batchGuid": "450463e0-5050-4c33-8c2f-4e39a2dd8614",
    "processorStatusCode": "A0014",
    "wasProcessed": true,
    "authCode": "VTLMC1",
    "refNumber": "13283670",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:10:42\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "sale": {
        "guid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Closed",
        "timeStamp": "2017-07-11T11:09:53.5",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 19.74,
        "effectiveAmount": 0,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283670",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:09:56\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "customData": "order details",
        "card": {
            "first4": "5306",
            "last4": "0213",
            "cardNumber": "1zcGT7J4pkGh0213",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-07",
            "customer": {
                "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563007",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10007",
                "address1": "107 7th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1987-07-07T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    }
}

You can run a Return transaction when you need to refund either a partial or the full amount of a sale that has been settled. The Return amount doesn’t need to be the same as the total amount originally charged in the sale. To refund a sale you need to provide the SaleGuid or SaleReferenceNumber that you received when you ran the Sale.

This endpoint creates a return.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/returns

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.
SaleGuid string Mandatory when SaleReferenceNumber field is not sent Sale’s Guid.
SaleReferenceNumber integer Mandatory when SaleGuid field is not sent SaleReferenceNumber.
Amount decimal Mandatory Transaction's amount. Min. amt.: $0.50

Note: Send either SaleGuid or SaleReferenceNumber field in a request.

Response

Get return

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Return
    {
        public static void GetReturn()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/returns/4f31b350-edd1-49fd-a1ad-4b065f78d7b9");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

{
    "guid": "4f31b350-edd1-49fd-a1ad-4b065f78d7b9",
    "batchStatus": "Batch - Open",
    "timeStamp": "2017-07-11T11:10:38.11",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "saleGuid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
    "status": "Transaction - Approved",
    "amount": 19.74,
    "batchGuid": "450463e0-5050-4c33-8c2f-4e39a2dd8614",
    "processorStatusCode": "A0014",
    "wasProcessed": true,
    "authCode": "VTLMC1",
    "refNumber": "13283670",
    "invoiceNumber": "11518",
    "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:10:42\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
    "sale": {
        "guid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
        "status": "Transaction - Approved",
        "batchStatus": "Batch - Closed",
        "timeStamp": "2017-07-11T11:09:53.5",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "amount": 19.74,
        "effectiveAmount": 0,
        "orderNumber": "11518",
        "orderDate": "2017-02-03T00:00:00",
        "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
        "processorStatusCode": "A0000",
        "processorResponseMessage": "Success",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283670",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:09:56\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "customData": "order details",
        "card": {
            "first4": "5306",
            "last4": "0213",
            "cardNumber": "1zcGT7J4pkGh0213",
            "cardHolderName": "John Doe",
            "expirationDate": "2019-07",
            "customer": {
                "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                "firstName": "John",
                "lastName": "Doe",
                "phone": "9177563007",
                "city": "New York",
                "country": "US",
                "email": "johnd@gmail.com",
                "zip": "10007",
                "address1": "107 7th Av.",
                "address2": "",
                "state": "NY",
                "dateOfBirth": "1987-07-07T00:00:00",
                "driverLicenseNumber": "12345678",
                "driverLicenseState": "TX",
                "ssN4": "1210"
            }
        }
    }
}

This endpoint gets a return.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/returns/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Return’s guid to get

Response

Get all returns

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Return
    {
        public static void GetAllReturns()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("http://example/api/v1/returns");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
    {
        "guid": "4f31b350-edd1-49fd-a1ad-4b065f78d7b9",
        "batchStatus": "Batch - Open",
        "timeStamp": "2017-07-11T11:10:38.11",
        "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
        "saleGuid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
        "status": "Transaction - Approved",
        "amount": 19.74,
        "batchGuid": "450463e0-5050-4c33-8c2f-4e39a2dd8614",
        "processorStatusCode": "A0014",
        "wasProcessed": true,
        "authCode": "VTLMC1",
        "refNumber": "13283670",
        "invoiceNumber": "11518",
        "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:10:42\\n\\nCREDIT - VOID\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\n\\nVoid Amount:                    $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
        "sale": {
            "guid": "ded98ad3-0553-4607-b84c-1bbd85f474d5",
            "status": "Transaction - Approved",
            "batchStatus": "Batch - Closed",
            "timeStamp": "2017-07-11T11:09:53.5",
            "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
            "amount": 19.74,
            "effectiveAmount": 0,
            "orderNumber": "11518",
            "orderDate": "2017-02-03T00:00:00",
            "batchGuid": "1564cb1b-eddb-4747-9565-61a7d7d225f9",
            "processorStatusCode": "A0000",
            "processorResponseMessage": "Success",
            "wasProcessed": true,
            "authCode": "VTLMC1",
            "refNumber": "13283670",
            "invoiceNumber": "11518",
            "customerReceipt": "SUR TECHNOLOGY HOLDINGS\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/11/2017 07:09:56\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 0213\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nREF # : 13283670\\nInvoice number : 11518\\nAUTH CODE : VTLMC1\\nSubtotal:                       $19.74\\n--------------------------------------\\nTotal:                          $19.74\\n--------------------------------------\\n\\n\\n\\nJohn Doe\\n\\nCUSTOMER ACKNOWLEDGES RECEIPT OF\\nGOODS AND/OR SERVICES IN THE AMOUNT\\nOF THE TOTAL SHOWN HEREON AND AGREES\\nTO PERFORM THE OBLIGATIONS SET FORTH\\nBY THE CUSTOMER`S AGREEMENT WITH THE\\nISSUER\\nAPPROVED\\n\\n\\n\\n\\nCustomer Copy\\n",
            "customData": "order details",
            "card": {
                "first4": "5306",
                "last4": "0213",
                "cardNumber": "1zcGT7J4pkGh0213",
                "cardHolderName": "John Doe",
                "expirationDate": "2019-07",
                "customer": {
                    "guid": "d1cf828d-3050-4e4c-b7cf-f4038d114d39",
                    "firstName": "John",
                    "lastName": "Doe",
                    "phone": "9177563007",
                    "city": "New York",
                    "country": "US",
                    "email": "johnd@gmail.com",
                    "zip": "10007",
                    "address1": "107 7th Av.",
                    "address2": "",
                    "state": "NY",
                    "dateOfBirth": "1987-07-07T00:00:00",
                    "driverLicenseNumber": "12345678",
                    "driverLicenseState": "TX",
                    "ssN4": "1210"
                }
            }
        }
    }
]

This endpoint gets all returns.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/returns

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Verify

Create verify

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Verify
    {
        public static void CreateVerify()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Verify");
                request.ContentType = "text/json";
                request.Method = "POST";

                var verify = new
                {
                    DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
                    Card = new
                    {
                        CardNumber = "4532922657097402",
                        CardHolderName = "Justin Troudeau",
                        Cvv2 = "999",
                        ExpirationDate = "1912",
                        Customer = new
                        {
                            FirstName = "Justin",
                            LastName = "Troudeau",
                            Phone = "9177563051",
                            City = "New York",
                            State = "NY",
                            Country = "US",
                            Email = "justint@gmail.com",
                            Address1 = "111 11th Av.",
                            Address2 = "",
                            Zip = "10011",
                            DateOfBirth = "1991-11-11",
                            DriverLicenseNumber = "12345678",
                            DriverLicenseState = "TX",
                            SSN4 = "1210"
                        }
                    }
                };

                string json = JsonConvert.SerializeObject(verify);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
  "DeviceGuid" : "8257dde1-ded6-4c38-ab71-4338c4aa87ac",
  "Card":
  {
    "CardNumber" : "4532922657097402",
    "CardHolderName" : "Justin Troudeau",
    "Cvv2" : "999",
    "ExpirationDate" : "1912",
    "Customer":
    {
      "FirstName" : "Justin",
      "LastName" : "Troudeau",
      "Phone" : "9177563051",
      "City" : "New York",
      "State" : "NY",
      "Country" : "US",
      "Email" : "justint@gmail.com",
      "Address1" : "111 11th Av.",
      "Address2" : "",
      "Zip" : "10011",
      "DateOfBirth" : "1991-11-11",
      "DriverLicenseNumber" : "12345678",
      "DriverLicenseState" : "TX",
      "SSN4" : "1210"
    }
  }
}

Json Example Response:

{
    "guid": "6b71517b-5972-47f3-aa3d-dcf3eef4bd70",
    "status": "Transaction - Approved",
    "timeStamp": "2017-07-11T11:14:51.18",
    "deviceGuid": "8f65764d-72c1-4dee-ac9f-4cd4c98e8c35",
    "card": {
        "first4": "4532",
        "last4": "7402",
        "cardNumber": "hNDbeGr7VBgY7402",
        "cardHolderName": "Justin Troudeau",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "e9132f23-b898-4779-a8fa-adc06d3559c3",
            "firstName": "Justin",
            "lastName": "Troudeau",
            "phone": "9177563051",
            "city": "New York",
            "country": "US",
            "email": "justint@gmail.com",
            "zip": "10011",
            "address1": "111 11th Av.",
            "address2": "",
            "state": "NY",
            "dateOfBirth": "1991-11-11T00:00:00",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX",
            "ssN4": "1210"
        }
    },
    "processorStatusCode": "A0000",
    "wasProcessed": true
}

The Verify transaction is used when you want to know if the card data you have is valid and it’s ready to run other transactions like Auth Only or Sale. Therefore we are talking about a $0.00 amount transaction, no money is moved.

This endpoint creates a verify.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Verify

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.
Card
CardNumber string Mandatory Card number. Must be 16 characters. (example: 4532538795426624) or token (example: FfL7exC7Xe2y6624).
CardHolderName string Optional Cardholder's name.
Cvv2 integer Optional This is the three or four digit CVV code at the back side of the credit and debit card.
ExpirationDate date Optional with Token Card's expiry date in the YYMM format.
Customer
FirstName string Optional Customer's first name.
LastName string Optional Customer's last name.
Phone integer Optional Customer's phone number. The phone number must be syntactically correct. For example, 4152345678.
City string Optional Customer's city.
State string Optional Customer's short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
Country string Optional Customer's country. The ISO country code of a customer’s country. Length = 2 or 3.
Email string Optional Customer's valid email address.
Address1 string Optional Customer's address.
Address2 string Optional Customer's address line 2.
Zip integer Optional Customer's zipcode. Length = 5.
DateOfBirth date Optional Customer's date of birth.

Allowed format:

YYYY-MM-DD.
For example: 2002-05-30
DriverLicenseNumber integer Optional Customer's driver license number.
DriverLicenseState string Mandatory when DriverLicenseNumber is provided Customer's driver license short name state. The ISO 3166-2 CA and US state or province code of a customer. Length = 2.
SSN4 integer Mandatory when DOB is not submitted Customer's social security number.

Response

Get verify

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Verify
    {
        public static void GetVerify()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Verify/f1565d71-54c2-410e-a672-29aa28316b7d");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }

    }
}

Json Example Response:

{
    "guid": "f1565d71-54c2-410e-a672-29aa28316b7d",
    "status": "Transaction - Approved",
    "timeStamp": "2017-07-03T14:08:15.53",
    "deviceGuid": "4b5013f7-b275-4929-8e83-0167c6edf639",
    "card": {
        "first4": "4532",
        "last4": "7402",
        "cardNumber": "hNDbeGr7VBgY7402",
        "cardHolderName": "Justin Troudeau",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "97c01573-3736-4755-bbcf-de9da8e9391d",
            "firstName": "Justin",
            "lastName": "Troudeau",
            "phone": "9177563051",
            "city": "New York",
            "country": "US",
            "email": "justint@gmail.com",
            "zip": "10011",
            "address1": "111 11th Av.",
            "address2": "",
            "state": "NY",
            "dateOfBirth": "1991-11-11T00:00:00",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX",
            "ssN4": "1210"
        }
    },
    "processorStatusCode": "A0000",
    "wasProcessed": true
}

This endpoint gets a verify.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/Verify/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Verify’s guid to get

Response

Get all Verify

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Verify
    {
        public static void GetAllVerify()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Verify");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
  {
    "guid": "f1565d71-54c2-410e-a672-29aa28316b7d",
    "status": "Transaction - Approved",
    "timeStamp": "2017-07-03T14:08:15.53",
    "deviceGuid": "4b5013f7-b275-4929-8e83-0167c6edf639",
    "card": {
        "first4": "4532",
        "last4": "7402",
        "cardNumber": "hNDbeGr7VBgY7402",
        "cardHolderName": "Justin Troudeau",
        "expirationDate": "2019-12",
        "customer": {
            "guid": "97c01573-3736-4755-bbcf-de9da8e9391d",
            "firstName": "Justin",
            "lastName": "Troudeau",
            "phone": "9177563051",
            "city": "New York",
            "country": "US",
            "email": "justint@gmail.com",
            "zip": "10011",
            "address1": "111 11th Av.",
            "address2": "",
            "state": "NY",
            "dateOfBirth": "1991-11-11T00:00:00",
            "driverLicenseNumber": "12345678",
            "driverLicenseState": "TX",
            "ssN4": "1210"
        }
    },
    "processorStatusCode": "A0000",
    "wasProcessed": true
}
]

This endpoint gets all Verify.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/Verify

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Batch

Close batch

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Batch
    {
        public static void CloseBatch()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Batches/close");
                request.ContentType = "text/json";
                request.Method = "POST";

                var batch = new
                {
                    DeviceGuid = "8257dde1-ded6-4c38-ab71-4338c4aa87ac"
                };

                string json = JsonConvert.SerializeObject(batch);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
  "DeviceGuid" : "8257dde1-ded6-4c38-ab71-4338c4aa87ac"
}

Json Example Response:

{
  "deviceGuid": "8257dde1-ded6-4c38-ab71-4338c4aa87ac",
  "guid": "8193db64-dc35-4cf8-b4a9-7e1d66aa119f",
  "status": "PASS",
  "responseCode": "A0000",
  "responseMessage": "Success",
  "closureDate": "2017-03-15T15:27:31.8987491-03:00",
  "batchInfo": {
    "siccode": "5999",
    "saleCount": 8,
    "saleAmount": 137.65,
    "returnCount": 0,
    "returnAmount": 0
  }
}

Batch is processing all the authorized transactions of the day at the end of the day. However, you can close a batch manually before. You can also get your transactions searched by batch.

This endpoint closes a batch.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Batches/close

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
DeviceGuid string Mandatory Device’s Guid.

Response

Search batches

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Batch
    {
        public static void SearchBatch()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Batches/search");
                request.ContentType = "text/json";
                request.Method = "POST";

                var batch = new
                {
                    deviceGuid = "58ccf5a4-1d5d-4546-8202-da5c7ad10711",
                    startDate = "1/1/1900",
                    endDate = "12/31/2017"
                };

                string json = JsonConvert.SerializeObject(batch);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }  
    }
}

Json Example Request:

{
  "deviceGuid" : "58ccf5a4-1d5d-4546-8202-da5c7ad10711",
  "startDate" : "1/1/1900",
  "endDate" : "12/31/2017"
}

Json Example Response:

{
    "count": 2,
    "ret": [
        {
            "batchNumber": "201782801",
            "closureDate": "2017-08-29T20:25:56.79",
            "batchTotalAmount": 0,
            "transactions": [
                {
                    "transactionType": "Void",
                    "transactionDatetime": "2017-08-28T11:50:34.64",
                    "lastFour": "5075",
                    "cardType": "Visa",
                    "amount": 14.88
                }
            ]
        },
        {
            "batchNumber": "201781801",
            "closureDate": "2017-08-22T13:07:51.49",
            "batchTotalAmount": 52.00,
            "transactions": [
                {
                    "transactionType": "Sale",
                    "transactionDatetime": "2017-08-18T11:53:15.58",
                    "lastFour": "5075",
                    "cardType": "Visa",
                    "amount": 14.00
                },
                {
                    "transactionType": "Sale",
                    "transactionDatetime": "2017-08-18T12:36:03.68",
                    "lastFour": "5865",
                    "cardType": "Visa",
                    "amount": 16.00
                },
                {
                    "transactionType": "Sale",
                    "transactionDatetime": "2017-08-18T12:06:33.02",
                    "lastFour": "2911",
                    "cardType": "Visa",
                    "amount": 2.00
                },
                {
                    "transactionType": "Sale",
                    "transactionDatetime": "2017-08-18T12:17:54.06",
                    "lastFour": "5075",
                    "cardType": "Visa",
                    "amount": 20.00
                }
            ]
        }
    ]
}

This endpoint searches batches in a date range.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Batches/search

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
deviceGuid string Mandatory Device's guid.
startDate date Mandatory Search's start date.

Allowed Recurring Billing format:

YYYY-MM-DD
For example: 2002-05-30
endDate date Mandatory Search's end date.

Allowed Recurring Billing format:

YYYY-MM-DD
For example: 2002-05-30

Response

Get batches with transactions

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Batch
    {
        public static void GetBatchsWithTransactions()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Batches/10b88d43-9f5b-4d9a-a1b3-0827e22f53e0/Transactions");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Response:

[
  {
    "transactionType": "Auth Only",
    "transactionGuid": "44b06564-3e6d-4077-a466-e367a1a3f68b",
    "transactionDatetime": "2017-03-14T16:25:29.11",
    "lastFour": "4418",
    "cardType": "Mastercard",
    "amount": 90
  },
  {
    "transactionType": "Sale",
    "transactionGuid": "f425e061-e80e-4a21-844f-0e9846e91795",
    "transactionDatetime": "2017-03-14T16:47:30.91",
    "lastFour": "0213",
    "cardType": "Mastercard",
    "amount": 23.14
  },
  {
    "transactionType": "Sale",
    "transactionGuid": "3a75bb5f-35e3-4ab6-90de-30d7f111adf5",
    "transactionDatetime": "2017-03-14T17:07:35.76",
    "lastFour": "7140",
    "cardType": "Visa",
    "amount": 33.5
  }
]

This endpoint gets a batch with its transactions.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/Batches/<guid>/Transactions/

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid Batch’s guid to get

Response

User roles

Get roles for a user

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class UserRole
    {
        public static void GetUserRolesByUsers()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/UserRoles/Users/cRZZO6a2ZICRN9xDwWsxOw");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }

    }
}

Json Example Response:

{
  "userName": "JohnDoe",
  "userGuid": "2182dba6-73d0-41ed-9025-1db46534b0ff",
  "roles": [
    {
      "name": "Iso Admin"
    },
    {
      "name": "Iso Employee"
    },
    {
      "name": "Merchant Admin"
    },
    {
      "name": "Super User"
    }
  ]
}

This endpoint gets user's roles.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/UserRoles/Users/<guid>

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters

Parameter Description
guid User’s guid to get

Response

Get myself roles

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class UserRole
    {
        public static void GetMySelfRoles()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/UserRoles/Users/myself");
                request.Method = "GET";

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }

    }
}

Json Example Response:

{
    "userName": "maxwinston",
    "userGuid": "961612a5-427b-4bbc-8a11-bfc1b9149243",
    "roles": [
        {
            "name": "Iso Admin"
        },
        {
            "name": "Iso Employee"
        },
        {
            "name": "Merchant Admin"
        }
    ]
}

This endpoint gets myself roles.

HTTP Request

GET https://sandboxsalesapi.connexpay.com/api/v1/UserRoles/Users/myself

Headers

Key Value
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Response

Search users

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchUsers()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Users");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    status = "User - Active",
                    city = "New York"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "status": "User - Active",
    "city": "New York"
}

Json Example Response:

{
    "count": 2,
    "ret": [
        {
            "guid": "961612a5-427b-4bbc-8a11-bfc1b9149243",
            "userName": "maxwinston",
            "isoNumber": "1000",
            "firstName": "Max",
            "lastName": "Winston",
            "email": "maxwinston@gmail.com",
            "phone": "9177563046",
            "status": "User - Active",
            "address1": "151 E 33rd ST",
            "address2": "Second Floor",
            "city": "New York",
            "state": "NY",
            "zipcode": "10016",
            "accountNumber": "17091897",
            "roles": [
                {
                    "name": "Iso Admin"
                },
                {
                    "name": "Iso Employee"
                },
                {
                    "name": "Merchant Admin"
                }
            ]
        },
        {
            "guid": "b584e559-1898-4314-94dc-e276b5563377",
            "userName": "adamsmith",
            "isoNumber": "1000",
            "firstName": "Adam",
            "lastName": "Smith",
            "email": "adamsmith@gmail.com",
            "phone": "9873216540",
            "status": "User - Active",
            "address1": "3025 S. Parker Rd.",
            "address2": "Suite 610",
            "city": "New York",
            "state": "NY",
            "zipcode": "10016",
            "accountNumber": "12354021",
            "roles": []
        }
    ]
}

This endpoint search a users.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Users

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
AccountNumber integer Optional Account's number.
Username string Optional Selected username.
IsoNumber integer Optional Iso number.
FirstName string Optional User’s first name.
LastName string Optional User’s last name.
Email string Optional User’s valid email address.
Phone integer Optional User’s phone number. The phone number must be syntactically correct. For example, 4152345678.
Address1 string Optional User’s address line 1.
Address2 string Optional User’s address line 2.
City string Optional User’s city.
State string Optional User’s short name state. The ISO 3166-2 CA and US state or province code of a user. Length = 2.
Zipcode integer Optional User’s zipcode. Length = 5.
Status string Optional User’s status.

Allowed values:

1. User - Active
2. User - Deactivated
3. User - Paused

Response

Search sales

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchSales()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Sales/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "26613acb-7b7f-4b42-ae3d-1f8eb113729d"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "26613acb-7b7f-4b42-ae3d-1f8eb113729d"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Approved",
            "amount": 25,
            "card": {
                "cardType": "Visa",
                "last4": "4456"
            },
            "timeStamp": "2017-12-06T08:32:44.81-03:00",
            "processorResponseMessage": "Success",
            "effectiveAmount": 25,
            "batchStatus": "Batch - Open",
            "guid": "26613acb-7b7f-4b42-ae3d-1f8eb113729d",
            "deviceGuid": "47476e55-44bd-41b0-9396-b2ff862f5e6"
        }
    ]
}

This endpoint search a sales.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Sales/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Sales/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Sales/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
AmountFrom integer Optional Amount of the transaction. Min. amt.: $0.50
AmountTo integer Optional Amount of the transaction. Min. amt.: $0.50
CardHolderName string Optional Cardholder's name.
CardLastFour string Optional Card last four number.
CardType string Optional Card type.
InvoiceNumber integer Optional Sale's InvoiceNumber.
OrderNumber string Optional Sale's order number. Length = 17.
OrderDateFrom date Optional Sale's order Date.
OrderDateTo date Optional Sale's order Date.
TimeStampFrom date Optional Sale's TimeStamp.
TimeStampTo date Optional Sale's TimeStamp.
Status string Optional Sale’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning
MerchantCustomerId string Optional Merchan tCustomer Id.

Response

Search voids

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchVoids()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Voids/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    SaleGuid = "26613acb-7b7f-4b42-ae3d-1f8eb113729d"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "SaleGuid" : "26613acb-7b7f-4b42-ae3d-1f8eb113729d"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Approved",
            "sale": {
                "amount": 7.5,
                "card": {
                    "cardHolderName": "John Doe",
                    "cardType": "Other",
                    "last4": "4418"
                }
            },
            "voidReason": "DEVICE_TIMEOUT",
            "timeStamp": "2017-09-15T15:16:13.94",
            "processorStatusCode": "A0000",
            "batchStatus": "Batch - Closed",
            "guid": "26613acb-7b7f-4b42-ae3d-1f8eb113729d"
        }
    ]
}

This endpoint search a voids.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Voids/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Voids/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Voids/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
VoidReason string Optional Indicates the reason the transaction was voided.

Allowed values:

1. POST_AUTH_USER_DECLINE
2. DEVICE_TIMEOUT
3. DEVICE_UNAVAILABLE
4. PARTIAL_REVERSAL
5. TORN_TRANSACTIONS
6. POST_AUTH_CHIP_DECLINE
Status string Optional Void’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning
TimeStampFrom date Optional Void's TimeStamp.
TimeStampTo date Optional Void's TimeStamp.

Response

Search returns

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchReturns()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Returns/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "83d99c39-abec-4be5-8d4b-6e8bbc38f948"                 
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "83d99c39-abec-4be5-8d4b-6e8bbc38f948"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Approved",
            "amount": 15.15,
            "card": {
                "cardHolderName": "John Doe",
                "cardType": "Visa",
                "last4": "1253"
            },
            "timeStamp": "2017-11-08T11:34:55.43",
            "processorStatusCode": "A0014",
            "batchStatus": "Batch - Closed",
            "guid": "421d7976-46f4-43bf-a6a6-1e08b0e40f90",
            "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308"
        }
    ]
}

This endpoint search a returns.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Returns/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Returns/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Returns/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
AmountFrom integer Optional Amount of the transaction. Min. amt.: $0.50
AmountTo integer Optional Amount of the transaction. Min. amt.: $0.50
Status string Optional Return’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning
TimeStampFrom date Optional Return's TimeStamp.
TimeStampTo date Optional Return's TimeStamp.

Response

Search authOnlys

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchAuthOnlys()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/AuthOnlys/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "a8e44a60-5d82-4a57-91a8-994e1ec7fcad"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "a8e44a60-5d82-4a57-91a8-994e1ec7fcad"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Declined",
            "amount": 13.13,
            "card": {
                "cardType": "Discover",
                "last4": "6666"
            },
            "orderNumber": null,
            "orderDate": null,
            "timeStamp": "2017-12-05T14:34:12.28",
            "customerId": null,
            "processorResponseMessage": "Invalid Card",
            "batchStatus": "Batch - Closed",
            "relatedCapture": null,
            "relatedVoid": null,
            "guid": "a8e44a60-5d82-4a57-91a8-994e1ec7fcad",
            "deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c30"
        }
    ]
}

This endpoint search an authOnlys.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/AuthOnlys/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/AuthOnlys/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/AuthOnlys/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
AmountFrom integer Optional Amount of the transaction. Min. amt.: $0.50
AmountTo integer Optional Amount of the transaction. Min. amt.: $0.50
CardLastFour string Optional Card last four number.
CardHolderName string Optional Cardholder's name.
CardType string Optional Card Type.
InvoiceNumber integer Optional AuthOnly's InvoiceNumber.
OrderNumber string Optional AuthOnly's order number. Length = 17.
OrderDateFrom date Optional AuthOnly's order Date.
OrderDateTo date Optional AuthOnly's order Date.
TimeStampFrom date Optional AuthOnly's TimeStamp.
TimeStampTo date Optional AuthOnly's TimeStamp.
Status string Optional AuthOnly’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning
MerchantCustomerId string Optional Merchant Customer Id.

Response

Search captures

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchCaptures()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Captures/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "b0a55643-37e9-4ce2-ab70-4294fbcb9fd8"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "b0a55643-37e9-4ce2-ab70-4294fbcb9fd8"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Approved",
            "authOnly": {
                "status": null,
                "amount": 11.11,
                "card": {
                    "cardHolderName": "John Doe",
                    "last4": "9271"
                },
                "orderNumber": "11700",
                "orderDate": "2017-02-03T00:00:00",
                "timeStamp": "0001-01-01T00:00:00",
                "customerId": null,
                "processorResponseMessage": null,
                "batchStatus": null,
                "relatedCapture": null,
                "relatedVoid": null,
                "guid": "00000000-0000-0000-0000-000000000000",
                "deviceGuid": "00000000-0000-0000-0000-000000000000"
            },
            "newAmount": 0,
            "timeStamp": "2017-10-13T16:50:33.32",
            "processorResponseMessage": "Success",
            "batchStatus": "Batch - Closed",
            "guid": "2e4a4519-0add-49f5-a713-945c6e029066"
        }
    ]
}

This endpoint search a captures.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Captures/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Captures/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Captures/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
NewAmountFrom integer Optional NewAmount From of the transaction. Min. amt.: $0.50
NewAmountTo integer Optional NewAmount To of the transaction. Min. amt.: $0.50
TimeStampFrom date Optional Capture's TimeStamp From.
TimeStampTo date Optional Capture's TimeStamp To.
Status string Optional Capture’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning

Response

Search verify

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchVerify()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/Verify/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "9b3213d5-1a95-4d7f-a1c4-c88cf022d88c"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "9b3213d5-1a95-4d7f-a1c4-c88cf022d88c"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "Transaction - Approved",
            "card": {
                "cardType": "Visa",
                "last4": "5696"
            },
            "timeStamp": "2017-12-05T14:36:53.62",
            "processorStatusCode": "A0000"
        }
    ]
}

This endpoint search a verify.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Verify/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Verify/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/Verify/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
CardLastFour string Optional Card last four number.
CardHolderName string Optional Cardholder's name.
CardType string Optional Card Type.
TimeStampFrom date Optional Verify's TimeStamp From.
TimeStampTo date Optional Verify's TimeStamp To.
Status string Optional Verify’s status.

Allowed values:

1. Transaction - Approved
2. Transaction - Declined
3. Transaction - Created - Local
4. Transaction - Created - Error: Processor not reached
5. Transaction - Processor Error
6. Transaction - Approved - Warning

Response

Search Recurring Billings

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class Search
    {
        public static void SearchRecurringBillings()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/Search/RecurringBillings/false");
                request.ContentType = "text/json";
                request.Method = "POST";

                var search = new
                {
                    merchantGuid = "19344275-985e-4dff-81ee-cb84b8ad356c",
                    guid = "962e9aa9-6106-4596-9603-e88228b290bc"
                };

                string json = JsonConvert.SerializeObject(search);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        } 
    }
}

Json Example Request:

{
    "merchantGuid": "19344275-985e-4dff-81ee-cb84b8ad356c",
    "guid": "962e9aa9-6106-4596-9603-e88228b290bc"
}

Json Example Response:

{
    "count": 1,
    "ret": [
        {
            "status": "RecurringBilling - Active",
            "interval": "A list of dates (yyyy-MM-dd) separated by commas",
            "intervalValue": "2018-01-01",
            "amount": 12.12,
            "recurringBillingNumber": "41478751",
            "startDate": "2018-01-01T00:00:00",
            "endDate": "2018-02-04T00:00:00",
            "card": {
                "last4": "5601"
            },
            "guid": "161089ca-5893-4504-bd2c-093beebeb9bb"
        }
    ]
}

This endpoint search a recurring billings.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/RecurringBillings/{exportable}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/RecurringBillings/{exportable}/{pageNumber}

POST https://sandboxsalesapi.connexpay.com/api/v1/Search/RecurringBillings/{exportable}/{pageNumber}/{pageSize}

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

URL Parameters:

Parameter Type M/C/O Value
Exportable string Mandatory True or False. It means if you want results exportable to CSV.
PageNumber integer Optional Int. Number of page of the results. Default is 1 (Page size default is 500).
PageSize integer Optional Int. Size of each page of the results. Default is 500.

Json Body:

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant's Guid.
CardOnly string Optional Card Only.
BankAccountOnly string Optional Bank Account Only.
ActiveOnly string Optional Active Only.
PausedOnly string Optional Paused Only.
CompletedOnly string Optional Completed Only.
AmountFrom integer Optional amount from of the transaction. Min. amt.: $0.50
AmountTo integer Optional amount to of the transaction. Min. amt.: $0.50
CreatedDateFrom date Optional Created Date From RecurringBillings.
CreatedDateTo date Optional Created Date To RecurringBillings.

Response

Declined Response Codes

Codes

Code Response Message Description
D0001 Duplicate Request (Approved previously) The transaction was already performed and approved. Verify if the request was submitted twice for the same transaction ID or external reference number.
D0003 Duplicate Request (Declined previously) The transaction was already performed and declined. Verify if the request was submitted twice for the same transaction ID or external reference number.
D0004 Reversal Not Allowed The transaction is not authorized for reversal. This error may occur because the transaction was not settled, was declined, or already reversed.
D0005 Return Not Allowed The transaction is not authorized for return. This error may occur because the transaction was not settled, was declined, or already reversed.
D0006 Supervisor Override Required
D0007 Modify Transaction Not Allowed The transaction is not authorized for modification. This error may occur because the transaction was already settled, or was declined.
D0008 Possible Duplicate Request This is a duplicate request. The credentials for this transaction (i.e. amount, card number or same service) are the same as another transaction submitted less than one minute apart.
D0009 Duplicate Request (Reversed previously) The request with the same credentials (amount, card number, or same service) hit the server twice within a minute.
E0010 Inactive Device (Terminal) The device is not registered, or is inactive in the system.
E0011 Device (Terminal) Configuration missing The configuration parameter is missing.
E0012 Insufficient privileges
E0013 Incremental Auth Not Allowed
E0015 Unable to process your request. Settlement InProgress. The transaction settlement is in progress.
E0016 Functionality currently not available. The functionality is not supported.
E0020 Inactive Merchant (Account) The merchant is not registered, or is inactive in the system.
E0021 Merchant (Account) configuration missing The configuration parameter is missing.
E0022 Processor configuration missing The processor parameter is missing.
D0023 Merchant already active
E0030 Unique ID Error The terminal unique ID is invalid, or is not registered in the system.
D0050 Inactive terminal (Backend) The device is inactive, or is not registered at the host.
D0060 Inactive account (Backend) The account is inactive, or is not registered at the host.
D0070 Unique ID Error (Backend) The terminal unique ID is invalid, or is not registered at the host.
D0080 Duplicate Request (Backend) This is a duplicate transaction. This transaction was already approved and processed.
D0090 Reversal Not Allowed (Backend) The transaction is not authorized for reversal. This error may occur because the transaction was settled, declined, or already reversed.
D0091 Return Not Allowed (Backend) The transaction is not authorized for return. This error may occur because the transaction was settled, declined, or already reversed.
D0092 Request Format Error (Backend)
D0093 Encryption failure from host
D0094 Return not allowed, Card number requested does not match with original transaction card number
D0095 Invalid taskID
D0096 Currency code mismatch with original transaction
D0097 Multiple amount format in single request not supported
D0098 Multiple tax with same tax type is not allowed. A request includes multiple tax with same tax type.
E0110 System Error (BillParam)
E0111 System Error (UBillACC)
E0200 System Error (Tran)
E0201 System Error (BillpayTran)
E0202 System Error (CardTran)
E0203 System Error (CheckTran)
E0204 System Error (MTTran)
E0205 System Error (MOTran)
E0206 System Error (AccTran)
E0207 System Error (Shipping_Info Tran)
E0208 System Error (Products Tran)
E0209 System Error (Override Tran)
E0210 System Error (PayMode Tran)
E0300 System Error (UTran)
E0301 System Error (BillpayUTran)
E0302 System Error (CardUTran)
E0303 System Error (CheckUTran)
E0304 System Error (MTUTran)
E0305 System Error (MoUTran)
E0306 System Error (ACCUTran)
E0310 System Error (BillPay WAY UTran)
E0311 System Error (BillPay WAY Seq)
E0350 System Error (UTranStatus)
E0360 System Error (PERIUTran)
E0370 System Error (SearchTran)
E0380 System Error (chkc history)
E0400 System Error (Login)
E0450 System Error (NoFee)
E0451 System Error (GetFEE)
E0460 System Error (EXRate)
E0470 System Error (PhCountry)
E0480 System Error (PrePay Number)
E0481 System Error (PrePay update)
E0482 System Error (PrePay List)
E0490 System Error (Bin Lookup)
E0491 System Error (Merchant Bin Lookup)
E0500 System Error (BrdCorp)
E0501 System Error (BrdMer)
E0502 System Error (Upate DeviceProc)
E0503 System Error (Upate MerchProductProc)
E0504 System Error (Upate LogoProc)
E0510 System Error (Upate MerchantProc)
E0511 System Error (Upate OperatorProc)
E0550 System Error (Search Corporation)
E0551 System Error (Search Merchant)
E0560 System Error (Modify Schedule)
E0561 System Error (Modify Payment)
E0600 System Error (CCust)
E0601 System Error (CCustID)
E0610 System Error (UCust)
E0611 System Error (UCustID)
E0620 System Error (SCust)
E0621 System Error (CustDt)
E0630 System Error (ECustACC)
E0631 System Error (ECust)
E0632 System Error (Deactivate Cust Account)
E0650 System Error (CRec)
E0651 System Error (CRecID)
E0660 System Error (URec)
E0661 System Error (URecID)
E0670 System Error (SRec)
E0671 System Error (RecDt)
E0672 System Error (CAdminTran)
E0673 System Error (BoardFee)
E0713 Transaction Key Expired Transaction Key provided in request is expired. Register new key with our system.
E0720 System Error(Async Insert)
E0721 System Error (Async Update)
E0722 System Error (Async Call Fail)
E0723 System Error (Async Select Fail)
E0724 System Error (Key Gen Fail) System Error. Please contact help desk.
E0800 System Error (KeyNox Error)
E0910 Time out
E0911 System Error
E0912 Error on Host
D1001 Account Number Invalid Account number provided in request is not a valid account number.
D1002 Valid Account, Cash payments only.
D1003 Amount invalid.
D1004 Biller ID Invalid. Biller ID provided in request is not valid.
D1005 Cash only biller.
D1006 Bill Pay Processor Code is missing or is incorrect. Processing host is not configured please contact help desk.
D1007 One or more Fields missing or incorrect.
D1020 Pre Pay Number not available.
D1201 Unable to determine merchant ID. Merchant is not register with Mobilozophy.
D1202 Unable to process your request.
D1203 Invalid redemption code. Redemption code provided in request is invalid.
D1204 Unable to determine coupon ID. Unable to determine coupon ID.
D1205 Coupon not valid at this location. Coupon not valid at this location.
D1206 Minimum Purchase Amount criteria not met. Minimum Purchase Amount criteria not met.
D1207 Either end user ID or registration ID is required. Either end user ID or registration ID is required.
D1208 Unable to modify coupon. Modification of coupon data is not allowed.
D1209 Unable to modify coupon. Modification of coupon data is not allowed.
D1210 Unable to modify coupon. Modification of coupon data is not allowed.
D1211 Unable to modify coupon. Modification of coupon data is not allowed.
D1212 This code has already been redeemed. This code has already been redeemed.
D1213 This code has been deleted. This code has been deleted.
D1214 Invalid store ID. Invalid store ID.
D1215 Invalid amount. Amount provided in request is invalid.
D1217 Coupon service is temporarily unavailable. Coupon service is temporarily unavailable.
D1999 General Bill Pay Decline. General declined please contact help desk.
D2001 Refer to Issuer. The merchant must call the issuer to obtain verbal authorization.
D2002 Suspected Card (pick-up, hot-card) This credit card has been flagged for fraud. the merchant should call the number on the back of the card to obtain further instructions. Suspected card error occurs in the following scenarios: 1-The card is restricted by the issuer 2-Loss of card is reported 3-Theft of card is reported
D2003 Honor with identification? The card is not identified.
D2004 Invalid Amount The amount exceeds the limits established by the issuer for this type of transaction.
D2005 Invalid Card The issuer indicates that this card is invalid.
D2006 No such issuer The card issuer number is invalid.
D2007 Invalid fee The transaction fee is unacceptable.
D2008 Incorrect Pin The PIN entered by the cardholder is incorrect.
D2009 Pin attempts exceeded The number of attempts to enter the PIN has exceeded.
D2010 Key synchronization failed from the host The failure of a key synchronization from the host.
D2011 Expired Card The card has expired.
D2012 Insufficient Funds The credit limit for this account has exceeded, or the amount is not enough to perform the transaction.
D2013 Invalid From Account The transaction account is invalid.
D2014 Invalid To Account The transaction account is invalid.
D2015 Withdrawal Limit exceeded The withdrawal limit on an account is exceeded.
D2016 Withdrawal frequency exceeded The withdrawal frequency on an account is exceeded.
D2017 Time limit for Pre-Auth reached The time for Pre-Auth has reached its limit.
D2018 AVS FAILED The address verification has failed and the merchant is configured for auto decline on AVS failure.
D2019 Billing ZIP Mismatch The zip provided does not match the billing address on file and merchant is configured for auto decline on ZIP code mismatch.
D2020 CVV2 verification failed The V code provided is invalid or does not match what is on file and merchant set up for auto decline on CVV2 failure.
D2021 Issuer or Switch inoperative The bank is unavailable to authorize this transaction.
D2022 Duplicate transaction ( Same amount / Account) The transaction with same amount and account is performed twice.
D2023 Balance unavailable for inquiry The balance cannot be validated.
D2024 Check Digit Err The credit card number entered did not pass validation. Correct and re-enter the credit card number.
D2025 Excluded Bin ID for Merchant Card is not allowed to do transaction at this merchant.
D2026 Do not honor The transaction was declined by the issuer.
D2027 AVS and CVV2 failed The address verification and V code verification failed and merchant set up for auto decline on AVS anc CVV2 failure.
D2028 Invalid Date The credit card expiration date is invalid. Verify and re-enter the expiration date.
D2029 Invalid Service The service provided by the card is invalid.
D2030 Host Validation Error The host is an invalid host.
D2031 Activity Limit exceeded The daily card activity limit has been exceeded.
D2032 Cannot complete because of Violation The transaction cannot be completed because the credit card account has been flagged with a violation.
D2033 Debit Pin Required
D2034 Debit Pin Required The BIN is blocked by the issuer.
D2035 Check Service authentication failure
D2039 Could Not Retrieve a Valid Card Number for Token
E2042 No Card found for the BIN No Card found for the BIN
D2200 UNKNOWN_ERROR
D2201 CONTENT_TYPE_NOT_SET
D2202 UNKNOWN_CONTENT_TYPE
D2203 CONTENT_LENGTH_NOT_SET
D2204 INCOMING_REQUEST_READ_ERROR
D2205 OUTGOING_RESPONSE_SEND_ERROR
D2206 INPUT_VALIDATION_ERROR
D2208 OCT_FAILED
D2209 AFT_FAILED
D2210 AFTR_FAILED
D2211 REMOTE_VPP_ERROR
D2212 INVALID_ISSUER_COUNTRY_CODE
D2213 FAST_FUNDS_NOT_ENABLED
D2214 INTERNAL_ERROR
D2215 ACNL_FAILED
D2216 ReceiverLimitExceeded
D2800 Invalid FCS ID
D2801 Invalid Voucher Serial Number
D2802 Invalid Voucher Approval Code
D2803 Electronics Benefit Transactions cannot contain Fee or Tax
D2998 PreFraudScout Decline Transaction is declined in Pre Fraud rules.
D2999 General Card Auth Decline This is a general decline error.
D3001 Invalid Bank Routing Number Invalid routing number in the request message.
D3002 Invalid Bank Account Number The bank account number in the request message is invalid.
D3003 Invalid MICR Data The MICR data in the request message is invalid.
D3004 Invalid Account Type The account type in the request message is invalid.
D3005 Invalid Check Type The check type in the request message is invalid.
D3006 Invalid Amount The amount for a transaction is invalid.
D3007 Missing Signature
D3008 Missing Endorsement
D3009 Invalid Check Date The date format in the request message is invalid.
D3010 Car Lar Mismatch Mismatch between the check amount written in numbers (courtesy amount) and letters (legal amount) provided on check image.
D3011 CallNox Timeout
D3012 Duplicate Check
D3013 Blocked Account The account provided in transaction is blocked.
D3014 Blocked Check The check provided in transaction is blocked.
D3015 Cannot Process Image
D3016 Invalid Check Number The check number in the request message is invalid.
D3017 Bank Account Closed The bank account does not exist.
D3018 Decline NSF
D3019 Check Image Decline
D3020 Invalid SEC
D3101 Maker Check Return Stop Pay Limit Exceeded
D3102 Maker Check Return No Auth Limit Exceeded
D3103 Maker Check Return No Settlement Limit Exceeded
D3104 Maker Check Return NSF/Other Limit Exceeded
D3105 Maker Check Return Limit Exceeded
D3106 Customer Check Return Stop Pay Limit Exceeded
D3107 Customer Check Return No Auth Limit Exceeded
D3108 Customer Check Return No Settlement Limit Exceede
D3109 Customer Check Return NSF/Other Limit Exceeded
D3110 Customer Check Return Limit Exceeded
D3111 Check Image Processing Error
D3112 Customer Check Cashing Limit Exceeded
D3200 Record(s) Processed Successfully
D3201 Duplicate Custom Fields Not Allowed. Duplicate Custom Field Not Allowed.
D3202 Item code already exists. Item code already exists.
D3203 Custom Field Type cannot be modified during update. Custom Field Type cannot be modified during update.
D3204 Could not find Product for Update. Product is not registered in the system.
D3205 Could not find Product for Removal. Product is not registered in the system.
D3206 Unidentified Tax Category Tax Category is not set in our system.
D3207 Some Record(s) Processed Successfully
D3208 No Records Processed No records are processed further.
D3211 Parsing Failed Issue with request parameter.
D3212 Product Enroll Fail at Merchant Level Merchant level data is not added or updated in the system.
D3213 Item code not provided The item code in the request message is invalid.
D3214 Product Enroll Fail at Merchant Custom Level Merchant level custom data is not added and updated in the system.
D3215 Product Enroll Fail at Global Level The UPC level data is not added and updated in our system.
D3216 Product Removal Failed Product Removal Failed.
D3217 No Tax Category Found No Tax Category Found.
D3218 Category already exists
D3219 Invalid Category Code
D3220 Modifier already exists
D3221 Invalid Modifier Code
D3222 Variation already exists
D3223 Invalid Variation
D3224 Invalid Product Code
D3225 Duplicate Variation Option Fields Not Allowed
D3226 Discount already exists
D3227 Start Date should be current date or future date
D3228 End Date should be current date or future date
D3229 Invalid Discount Code
D3230 No Product found for given search criteria. No product is found for given search criteria.
D3231 End Date should be greater than Start Date
D3232 Discount amount should be less than Max Discount amount
D3233 Discount percentage should be less than 100
D3234 Max Discount amount should be less than Discount Qualifying amount
D3235 Discount Code already removed
D3236 Already Associated
D3237 Invalid role
D3238 Invalid Operation
D3239 Role Already Exist
D3240 Operation Type Already Exist
D3241 Role does not Exist
D3242 Role can not be Deleted
D3243 Default Role can not be Modified
D3250 Invalid modifierOptionDetails Invalid modifierOptionDetails
D3253 Order service date can not be a previous date
E3254 Order creation failed
E3255 OrderID not found
E3256 Order updation failed
E3257 Order can not be modified
D3259 Invalid modifier categoryCode Invalid modifier categoryCode
D3260 Invalid product categoryCode Invalid product categoryCode
D3264 currentPaymentSequenceNumber should be less than and equal totalPaymentCount The currentPaymentSequenceNumber value entered does not meet the required criteria.
D3999 Check Auth Decline
D4000 Invalid content, one of {encodedCardData, keyedCardData, returnTransactionData} group is required
E4001 Invalid Source Country Code
E4002 Invalid Source Currency Code
E4003 Invalid Destination Location
E4004 Invalid Destination Currency Code
E4005 Invalid Source Agent
E4006 Invalid Destination Agent
E4007 Invalid Conversion Rate
E4008 Invalid Fee
E4009 Missing/Invalid Amount
E4010 Missing/Invalid Payout Amount
E4011 Invalid MTCN
E4012 Duplicate transaction ( Same amount/ Account ).
E4050 Missing /Invalid Sender Name
E4051 Invalid Sender ID Type
E4052 Invalid Sender ID
E4053 Invalid Sender Address
E4054 Invalid Sender phone number
E4055 Missing /Invalid Receiver Name
E4056 Invalid Receiver ID Type
E4057 Invalid Receiver ID
E4058 Invalid Receiver Address
E4059 Invalid Receiver phone number
E4060 Missing / Invalid Input
E4999 General Money Transfer Decline
E5000 Invalid Money order Number.
E5001 Invalid Amount.
E5002 Missing Payee Name.
D5201 Invalid Page size in the request
D5202 Invalid Report column name for requested report
D5203 Invalid date range, redefine your search
D5204 Invalid search column for requested report
D5205 Invalid optional column for requested report
D5206 Invalid Report column name for requested report
D5207 Invalid/Expired Report data identifier
D5208 Invalid search column value for requested report
D5209 No data found, please redefine your search
D5210 One or more duplicate columns used for search, sort or for optional columns
D5211 Invalid search condition, transactionID is required
D5212 Invalid search condition, productCode is required
D5213 Service is temporarily unavailable.Please try later
E5213 Service is temporarily unavailable.Please try later
D5214 Invalid search condition, dateRange is required
E5500 Invalid Payroll Info
E5599 General Payroll Decline.
E5999 General Money order Decline
E6000 Missing /Invalid Name
E6001 Invalid ID Type
E6002 Invalid ID Number
E6004 Invalid Address The address provided in the transaction is invalid.
E6005 Invalid phone number The phone number provided in the transaction is Invalid.
E6006 Invalid SSN The SSN provided in the transaction is Invalid.
E6007 Invalid DOB The DOB provided in the transaction is Invalid.
E6008 Missing/Invalid Gender
E6009 Missing/Invalid customer Image
E6010 Missing/Invalid ID Image
E6011 Missing/Invalid Finger Print Image
E6012 Biometric Auth failure
E6013 BFD failed
E6014 OTP failed
E6050 Duplicate Enrollment The Customer is enrolled. Verify if the request is send twice for the same customer.
E6051 OFAC Match
E6052 Blocked Customer
E6053 Blocked Biometrics
E6054 Declined Score below threshold.
E6055 Customer Not Enrolled. The customer code provided in request is not registered.
E6056 Financial Account Not Enrolled.
E6057 Customer requested stop of specific recurring payment Customers request to stop recurring payments.
E6058 Customer requested stop of all recurring payments from specific merchant Customers request to stop recurring payments from specific merchant.
E6059 Missing Customer ID/External Customer Number Customer ID or external customer number is not provided in request.
E6060 Inactive Customer Inactive Customer
E6061 Invalid UID UID number provided in request is invalid.
E6062 Incorrect or No Card Indicator Value
E6063 Customer Group Name already exists
E6064 Invalid Customer Group code
E6065 Customer Code already associated
E6066 Invalid Customer Code
E6067 Search criteria not found. The search request does not include any search criteria fields.The search criteria includes the firstName, lastName, paymentInstrumentID, or customerID fields.
E6068 External Customer number is already available.
E6069 Invalid Search Criteria
E6071 Customer modification not allowed, payment is in process. The application is unable to delete a customer record while a recurring transaction for the customer is processing.
E6072 Transaction is in process. Please try again after some time. Simultaneous actions cannot be performed on the same customer record. The application is unable to perform edits on a customer record while the record is in use.
E6100 Inactive Customer Inactive Customer.
E6901 Duplicate Schedule Billing Reference Number Duplicate schedule billing reference number.
E6902 Payment Count Cannot be Greater than Processed Count Payment count cannot be greater than processed count.
E6903 Next start date cannot be earlier than Current Date Next start date cannot be earlier than current date.
E6904 Schedule cannot be added without a Payment Methods (i.e. Card, Account...)
E6905 Schedule not found
E6906 Invalid Schedule string
E6999 General Customer Auth Decline General declined.
D7000 Record not found The transaction requested is not available.
E7001 Invalid User ID The user Id provided in request message is invalid.
E7002 Record Not Found. The Transaction is not present in the system.
E7003 User Locked. Call CSR
E7004 Invalid Security Question/Answer Invalid security question and answer.
E7005 User Already Logged in User Already Logged in try after some time.
E7006 Your Password has Expired, Please change the password. Change your password.
E7007 User Inactive. Call CSR
E7008 Operator Not Found The user ID is not registered in the system.
E7009 Expired Client Password The client password is expired.
E7010 Invalid Host ID The Host Id provided in the request message is invalid.
E7011 Client Authentication Failed This message may occur for more than one reason. 1. The manifest included in the request is not configured properly. 2. The Domain Key included in the request manifest is expired. 3. The Host Password included in the request is expired.
E7012 Invalid user or password The User id and password is invalid.
D7013 Multiple users with same email. Enter Login ID
E7013 Multiple users with same email. Enter Login ID There are multiple users with the same email ID. Enter your login ID.
E7014 Invalid Manifest Manifest provided in the request message is invalid.
E7015 Invalid Transaction Key The transaction key provided in the request message is invalid.
E7016 Invalid UserID or EmailID
D7017 User Modification Request Failed
E7018 The provided authentication credentials are not correct
E7019 Duplicate Questions/answers not allowed
E7020 The question cannot be same as any of the answers
E7021 Unable to process, retry with terminalNumber
E7022 Unable to process, retry with profileName or profileID
E7023 Unable to find profile
E7024 Security question expired, please fetch a new question
E7027 Unable to process, retry with userID Multiple entries found for the merchantID and emailID search criteria used.
E7100 General Login Decline General Login Decline.
E7101 User_ID already exists User_ID already exists.
E7102 Operation not allowed Operation not allowed.
E7103 Operator not Register/Present Operator is not Register or Present in the system.
E7104 Last active admin operator in the system The last Active Admin operator in the system. At least one Admin operator should be active for a merchant.
E7105 Admin operator cannot change his own status or type The Admin operator cannot change his own profile details.
E7106 Not allowed to add Administrator The operator is not allowed to add Admin operator.
E7107 Input Password does not adhere to complexity norms The Input Password does not adhere to complexity norms.
E7108 New password must not match previous password. Please enter a unique new password The new password must not match previous password. Please enter a unique new password.
E7109 Suspended/Inactive User The User Id provided in request is Suspended or Inactive. Please reactivate to perform transaction.
E7110 Invalid password length The password length must be between 8 and 20 characters.
E7111 Parameter validation Error
E7112 User already exists
E7113 User Credential not active
E7114 Security question not set for user
E7200 General User Admin Decline General User Admin Decline.
E7201 Client not registered to our system. The client domain name or unique ID is not registered.
E7202 Invalid Client Key The client key is invalid. Re-enter the correct key and resubmit the transaction.
E7203 Client Validity Expired, Please re-register The client validity is expired. Re-register the domain or the unique ID.
E7204 Invalid merchant details
E7251 Invalid one time password The one time password is invalid. Re-enter the correct password and resubmit the transaction.
E7252 Duplicate one time password The one time password is a duplicate. Re-enter the correct password and resubmit the transaction.
E7253 One time password validity expired The one time password has expired. Generate a new password and resubmit the transaction.
E7254 Host Operator not allowed The host operator is not allowed.
E7255 Operator is not Host The operator ID for this transaction is invalid.
E7256 Token services cannot be enabled until the merchant account is set up with a token zone Tokenization service is not enabled for the merchant.
E7257 Tokenization service not enabled Tokenization service not enabled for the merchant.
E7259 De-tokenization service not enabled De-tokenization service is not enabled for the merchant.
E7260 De-tokenization UnSuccessful The token is invalid. Resubmit with a valid token number.
E7261 Tokenization UnSuccessful Service is not available. Resubmit the transaction.
D7500 record not found (backend) The record was not found.
D7501 Chargeback Protection is not allowed The transaction is not eligible for Chargeback Protection.
E8000 Customer not found Customer is not register in our system.
E8001 Customer not enrolled Customer is not register in our system.
E8002 Customer Declined Customer enrollment declined.
E8003 Customer Locked Customer is locked in system.
E8004 Invalid user or password Invalid user or password.
E8005 Credit Limit Reached Max Credit Limit Reached.
E8006 Local Opt Out Local Opt Out.
E8007 Invalid Message Invalid Message
E8008 Globally Opted Out phone number Globally Opted Out phone number
F8009 Invalid Email Invalid Email
E8900 System Error System Error.
E8999 General Notify Decline. General Notify Decline.
D9000 Amount Limit Exceeded Amount Limit Exceeded for transaction.
D9001 Transaction count Limit Exceeded Transaction count Limit Exceeded.
D9002 Device activity Limit Exceeded Device activity Limit Exceeded.
D9003 Amount per days Limit Exceeded Amount per days Limit Exceeded.
D9004 Excluded Customer Customer is excluded to perform transaction at this merchant.
E9005 Invalid Cashback amount Cash back amount provided in request is invalid. Cash back should always be less then transaction amount.
E9006 Cashback Amount is not allowed for this type of transaction Cashback Amount is not allowed for this type of transaction.
D9007 Maximum Line Items Exceeded Maximum Line Items Limit Exceeded
D9008 BC limit not set for merchant. BC limit not set for merchant.
D9009 BC buffer percent was not set for merchant. BC buffer percent was not set for merchant
D9010 Invalid Transaction_Info/Service_Code. The error occurs in the scenarios as follows: 1-Service code is missing in the request. 2-Service code is invalid. 3-Service code is inadequate for this type of transaction.
D9011 Net Balance is less than zero
D9012 Invalid Merchant_Info/Agent_Chain_Number must be 6 bytes
D9013 Invalid Transaction type Invalid Transaction type
D9014 Merchant Per Transaction Deposit Limit Exceeded Transaction Deposit Limit Exceeded
D9015 Head Quarter merchant not found. Head Quarter merchant not found.
D9018 No Valid Data Found,Please Generate Token First.
D9019 Invalid Token
D9020 Invalid Transaction_Info/SubServiceCode The error occurs in the scenarios as follows: 1- Sub service code is missing in request. 2- Sub service code is invalid. 3- Sub service code is inadequate for this type of transaction.
D9021 Invalid Transaction_Info/Type. The error occurs in the scenarios as follows: 1-Type is missing in request. 2-Type is invalid. 3-Type is inadequate for this type of transaction.
D9022 Invalid Transaction_Info/Transaction_ID Transaction ID is expected in request for this transaction. Re-enter the Transaction ID, and resend the transaction.
D9030 Invalid Device_Info/Device_Type Device is inadequate to do this type of transaction.
D9040 Invalid Processor_Info/Acquirer_Institute must be 6 bytes Acquirer_Institute must be 6 bytes.
D9050 Invalid Processor_Info/Proc_Merchant_Id must be 12 bytes Proc_Merchant_Id must be 12 bytes.
D9070 Invalid Processor_Info/Processor_Term must be 4 bytes Processor_Term must be 4 bytes.
D9080 Invalid Processor_Info/Store_Number must be 4 bytes Store_Number must be 4 bytes.
D9090 Invalid Merchant_Info/MerchantType The merchant name is invalid or is not present.
D9091 Invalid Merchant_Info/Name
D9092 Invalid Merchant_Info/City
D9093 Invalid Merchant_Info/State
D9094 Invalid Merchant_Info/TimeZone must be 3 bytes
D9096 Invalid Transaction_Info/Time_Stamp must be [MMDDYY HHMMSS]
D9100 Fee Configuration Level must be mentioned
D9101 Fee not configured
D9110 Invalid Merchant_Info/SICCODE must be 4 bytes.
D9111 Invalid Processor_Info/Sequence_Number must be 4 bytes
D9120 Invalid Card_Info/PIN
D9130 Invalid Transaction_Info/Country_Code must be at least 2 bytes.
D9140 Invalid Card_Info/Type
D9210 Invalid Card_Info/PIN
D9211 Invalid Card_Info/Token
D9212 Invalid Card_Info/KSN must be at least 16 chars
D9240 Invalid Merchant_Info/Agent_Bank_Number must be 6 bytes.
D9250 Invalid Merchant_Info/Agent_Chain_Number must be 6 bytes
D9260 Invalid Processor_Info/Batch_Number must be 3 bytes
D9270 Invalid Merchant_Info/Reimburse_Attr must be 1 byte
D9280 Invalid Merchant_Info/ABA_Number must be 9 bytes
D9282 Invalid Merchant_Info/Settle_Agent_Number must be 4 bytes
D9283 Check Out date can not be less than or equal to Check In date
D9284 Transaction amount should not be greater than authorized amount
D9286 Invalid CheckoutID The checkOutID provided is incorrect. Provide the correct checkOutID.
D9287 Duplicate card sequence number
E9288 Invalid Wallet Identifier Format
E9289 Encoded Data is not allowed with checkoutID
D9290 Invalid Transaction_Info/Orig_Purchase_Date must be MMDDHHMM
E9291 Keyed Card Data is not allowed with checkoutID
E9292 Mandatory Tags are missing
E9293 Card Type not supported for requeted service
E9294 terminalData {terminalCapability, terminalOperatingEnvironment, cardholderAuthenticationMethod, terminalAuthenticationCapability, terminalOutputCapability,maxPinLength} group is required
E9295 cardholderAuthenticationMethod must be PIN
D9500 Encryption services not enabled for the device Encryption services are not enabled for the device.
D9501 Encryption service requested not enabled for the device The device has encryption service but the encryption service requested is not enabled.
D9502 Encryption method could not be determined The device is configured with more than one encryption service. The request does not indicate which service to use.
D9503 Decryption unsuccessful The decryption failed.
D9504 Invalid Format Id
D9505 Product Details is required to perform this action
D9510 Invalid Encryption Type An invalid encryption type was included in the request.
D9511 A unique KSN not generated or not sent in request The application was unable to generate or submit the key serial number.
D9610 Data Parsing fail Data parsing failed.
D9611 Encrypted Data not generated or not sent in request Encrypted data was not received from the host or the application was unable to include this data in the response.
F9900 XSD Format Error XSD Format Error
F9901 Format Error field details Format Error field details
F9902 Group encodedCardData is not allowed with cardDataSource value MANUAL
F9903 Group encodedCardData is not allowed with cardDataSource value PHONE
F9904 Group encodedCardData is not allowed with cardDataSource value EMAIL
F9905 Group encodedCardData is not allowed with cardDataSource value INTERNET
F9906 Group keyedCardData is not allowed with cardDataSource value SWIPE
F9907 Invalid cardDataSource for requested service.
F9908 Sum of elements of group additionalCharges should not be greater than transactionAmount.
F9909 cashTendered must not be less than transactionAmount
F9910 lastChipRead is Mandatory with Fallback Swipe (Icc Terminal Error) transaction
F9911 lastchipRead is not Allowed with Fallback Swipe (Empty Candidate List) transaction
F9912 Invalid content, one of {track1Data, track2Data, track3Data} is required
F9913 Invalid content, {encodedCardData, keyedCardData or swipedCardData} is not Allowed with Chip Card
F9914 emvFallbackCondition is Mandatory with Fallback Swipe transaction
F9915 voidReason is Mandatory for Chip Card transaction
F9916 Fallback Swipe allowed with track2Data only
F9917 Invalid emvTags, {9F1F or 9F20 or 57 or 5A} Tags 9F1F, 9F20, 57 and 5A are not allowed if encryptionType is VOLTAGE
F9918 Invalid content, {track1Data, track3Data, emulatedTrackData} is not Allowed with Chip Card and encryptionType track1Data, track3Data, and emulatedTrackData are not allowed if encryptionType is VOLTAGE

Other Errors

Error Description Reason Location
"Unable to decode the Model" The Json you sent doesn’t match a valid input Any endpoint.
“The (entity) could not be saved because of an unmanaged exception” An unknown reason didn’t allow the system to save the entity. Please contact support. Any endpoint
“Update (entity) did not finish correctly because of an unmanaged exception” An unknown reason didn’t allow the system to update the entity. Please contact support. Any endpoint
“The (entity) could not be retrieved because of an unmanaged exception” An unknown reason didn’t allow the system to retrieve the entity. Please contact support. Any endpoint
“No Devices were found for the given User/Merchant relationship” You sent a device GUID that does not belong to a merchant administrated by the logged user. Please try with a different GUID. Any transaction endpoint
“No Merchant was found for the current User” You sent a device GUID that does not belong to a merchant administrated by the logged user. Please try with a different GUID. Any transaction endpoint
“Invalid Routing Number: invalid digit” You sent and invalid Routing Number. Please try with a different one. Create Bank Clearing
“Invalid Routing Number: digit check failed” You sent and invalid Routing Number. Please try with a different one. Create Bank Clearing
“An error occurred while executing Transaction General Check” There is some inconsistence between your devices, Merchant Processor accounts and Merchants. Please contact support. Any transaction endpoint.
“Invalid Device GUID” You sent a device GUID that does not exist at all. Please try with a different GUID. Any transaction endpoint.
“BankAccount reference not found.” You sent an invalid BankAccount GUID. Please try with a different GUID. Create Bank Clearing.
“At least one of SSN4 or DateOfBirth are required.” You attempted to create a bank clearing without providing SSN4 or Date of Birth of the bank account owner. Please provide any of those two. Create Bank Clearing.
The DriverLicenseState and DriverLicenseNumber fields are required. You didn’t provide Driver License State nor Driver License Number. Create Bank Clearing.
“The transaction was not originated in any device of the current user.” You are trying to void or refund a sale or bank clearing that was run on a device that is not administrated by the logged user. Void Bank Clearing, Refund Bank Clearing, Void Sale, Refund Sale
“There was a database error” There was some inconsistence on the database, please contact support. Any endpoint.
“The related clearing is not settled. It can be voided only” You attempted to refund a not settled bank clearing. Refund Bank Clearing.
“The related clearing is already voided” You attempted to void or refund an already voided Bank Clearing. Void Bank Clearing, Refund Bank Clearing.
“The related clearing is already returned” You attempted to void or refund an already refunded Bank Clearing. Void Bank Clearing, Refund Bank Clearing.
“The related clearing was not processed, therefore it cannot be voided” You attempted to void or refund a Bank Clearing that didn’t run successfully. Void Bank Clearing, Refund Bank Clearing.
“Invalid (entity) GUID” You attempted to void or refund a Bank Clearing or a Sale or to capture an Auth Only using an invalid Guid. Capture Auth Only, Void Sale, Refund Sale, Void Bank Clearing, Refund Bank Clearing.
“No (entity) could be found for the given Id” You attempted to updated or retrieve an entity using an invalid Guid. Any endpoint.
“Credit Cards not allowed for this processor” You attempted to run a Sale or Auth Only on a Merchant Processor Account that is Debit Only. Create Auth Only, Create Sale.
“Debit Cards not allowed for this processor” You attempted to run a Sale or Auth Only on a Merchant Processor Account that is Credit Only. Create Auth Only, Create Sale.
“The (transaction) could not be processed correctly. Error code (error code). Error message: (error message)” The transaction didn’t run for reason provided by the processor. If you have any question regarding this error, please contact support. Any transaction endpoint.
“No open batch” For some reason, there was no open batch when you attempted to run a sale or auth only. Please contact support. Create Auth Only, Create Sale.
“Invalid CardDataSource” You provided an invalid card data source. Create Auth Only, Create Sale.
“The (transaction) amount must be greater than zero” You provided a negative or zero amount for the transaction. Any transaction endpoint.
“The (transaction) could not be fetched because of an unmanaged exception” Something when wrong when trying to retrieve the entity. Please contact support. Any endpoint.
“There is an approved Capture for this AuthOnly already” You attempted to capture an already captured Auth Only. Create Capture.
“The referenced AuthOnly and this Capture devices are not from the same MerchantAccount” You attempted to capture an AuthOnly using a device guid belonging to a different merchant processor account. Create Capture.
“The Capture AuthOnlyGuid value does not have matching results.” You attempted to capture an AuthOnly using an invalid Auth Only Guid. Create Capture.
“There is no Batch for the given guid.” For some reason, there was no open batch when you attempted to run the transaction. Please contact support. Any transaction endpoint.
“Only one of Bank Account or Card can be used.” You sent both, a Credit Card and a Bank Account, when trying to create a Recurring Billing Create Recurring Billing.
“The device hierarchy and settings could not be loaded” Something is wrong with the merchant processor account of the device you provided. Please contact support. Create Recurring Billing.
“The current Merchant Processor Account does not allow Tokenization. Tokenization is required to create Recurring Billings.” You provided a device guid belonging to a merchant processor account that does not have Tokenization activated. Create Recurring Billing.
“The setup of this device does not allow this operation. Processor Transaction Type is not Card nor ACH” You provided a Credit Card for an ACH Merchant Processor Account or a Bank Account for a Credit Card Merchant Processor Account. Create Recurring Billing.
“Required data for a Recurring Billing with Card are: FirstName, LastName, Email and Phone” You’re missing at least one of First Name, Last Name, Email or Phone when trying to create a Recurring Billing using a credit card. Create Recurring Billing.
“An Email is required for a Recurring Billing with ACH” You’re missing e-mail address when trying to create a Recurring Billing using a Bank Account Create Recurring Billing.
“There are no payments to be generated for the given parameters (StartDate, EndDate, PaymentCount, Interval, IntervalValue)” You sent a combination of parameters that didn’t result in any possible payment. Create Recurring Billing.
“Invalid Card or Bank Account” You provided an invalid credit card or an invalid bank account when trying to create a recurring billing. Create Recurring Billing.
“Customer data not present” You provided a Credit Card or Bank Account without the customer’s information. Create Recurring Billing.
“Invalid Interval. The 'every' value must be the only value.” You sent both, an “every” interval and a list of custom dates Create Recurring Billing.
“Invalid Interval/IntervalValue” You provided an invalid combination of the interval and its values. Create Recurring Billing.
“An error occurred while parsing the CustomDates” At least one of the custom dates you provided is not properly formatted Create Recurring Billing.
“There is a date in the CustomDates smaller than the StartDate” At least one of the custom dates you provided is previous to the StartDate you provided. Create Recurring Billing.
“The EndDate must be greater than the greatest CustomDate” At least one of the custom dates you provided is posterior to the EndDate you provided. Create Recurring Billing.
“EndDate must be submitted for CustomDates” You provided a list of CustomDates but not an EndDate Create Recurring Billing.
“Invalid InertervalValue: this interval does not allow values” You selected an interval that does not require interval values. Create Recurring Billing.
“Invalid Interval, you must explicit an IntervalValue” You selected an interval that requires IntervalValue and you did not send it. Create Recurring Billing.
“Invalid Interval” You sent a wrong Interval name. Create Recurring Billing.
“End Date must be after start date” You sent an End Date that is posterior to the Start Date you sent Create Recurring Billing.
“The Start Date cannot be earlier than today” You sent a Start Date previous to the current date. Create Recurring Billing.
“Just one of End Date or Payment Count values are required, not both” You sent both “EndDate” and “PaymentCount”. Please send one or the other one, but not the both together. Create Recurring Billing.
“Either one of End Date or Payment Count values are needed” You didn’t send “EndDate” neither “PaymentCount”. Please send at least one of them. Create Recurring Billing.
“The Payment Count value must be greater than 0” You sent PaymentCount with a value equal or less than 0 Create Recurring Billing.
“The current status of the Recurring Billing is final and does not allow any updates.” The Recurring Billing finished on scheduled, was deactivated or wasn’t created correctly so its status cannot be change. Update Recurring Billing.
“Invalid Status” You sent a wrong status name. Any Update endpoint.
“Invalid Amount, it cannot be 0. If you wish to cancel the Recurring Billing, set the status to Deactivated” You sent Amount with a 0 value. Update Recurring Billing.
“A database related error occurred B.RBB.04” Something went wrong when trying to retrieve the scheduled payments. Please contact support. Get Recurring Billing.
“Either the SaleGuid or SaleReferenceNumber are required” You didn’t send SaleGuid neither SaleReferenceNumber. Please send one of them. Create Return.
“You can't return a sale run more than 180 days ago” You attempted to return a sale that was run 180 days ago. Create Return.
“The Return Amount must be greater than zero” You sent Amount with a value equal or less than 0 Create Return.
“Original Amount exceeded” You attempted to return an amount greater than the original sale amount Create Return.
“Sale has been voided” You attempted to return a voided sale. Create Return.
“Sale has not been settled” You attempted to return a sale of which batch has not been closed. Create Return.
“The referenced Sale and this Return devices are not from the same MerchantAccount” You sent a device guid belonging to a merchant processor account different from the one where the sale was run. Create Return.
“The current invoice status does not allow a payment” Invoice was already paid, cancelled or has not been sent yet so it cannot be paid. Create Sale.
“The sale amount does not match the invoice amount” You sent and Invoice Guid, but the sale amount does not match the amount of that invoice. Create Sale.
“The calculated amount after Discount and/or ServiceFee and GrossAmount does not match the Amount value” You sent GrossAmount and Discount and/or ServiceFee, but the amount you sent does not match the result of Amount=GrossAmount-Discount+ServiceFee Create Sale.
“If Discount and/or ServiceFee are submitted, the GrossAmount value is required” You sent Discount and or ServiceFee but you didn’t send GrossAmount. Create Sale.
“Unable to find the device where the original sale was run.” You’re trying to charge a fee (or to reattempt a sale) over sale we cannot find the device where it ran. Please contact support. Charge Fee, Reattempt sale.
“There are no active Fee Charger devices for your Merchant Processor Account” You’re trying to charge a fee but you haven’t setup a Fee Charger device yet. Charge Fee.
“Unable to charge fee for sale” System was not able to charge the fee for the selected sale for some unknown reason. Please contact support. Charge Fee.
“Unable to run sale again” System was not able to run the selected sale again for some unknown reason. Please contact support. Reattempt sale.
“Original Sale not found” You sent an invalid Sale Guid Reattempt sale.
“Card for original Sale not found” We were not able to find the card used on the original sale. Please contact support. Reattempt sale.
“Tax Rate submitted without declaring Tax Type” You sent TaxRate but not TaxType. Create Sale, Create AuthOnly, Create Capture.
“Tax Rate submitted without declaring Tax Amount” You sent TaxRate but not TaxAmount. Create Sale, Create AuthOnly, Create Capture.
“An error occurred while saving the EnhancedData” Something went wrong when trying to save tax information. Please contact support. Create Sale, Create AuthOnly, Create Capture.
“An error occurred while retrieving the EnhancedData” Something went wrong when trying to get tax information. Please contact support. Get Sale, Get AuthOnly, Get Capture.
“The underlying Sale was not processed correctly. A Tip Adjustment cannot be made” You attempted to add a tip to a sale that didn’t run successfully. Create Tip Adjustment.
“The TipAdjustment could not be processed correctly B.TA.C01” Something went wrong when trying to add the tip to the sale. Please contact Support. Create Tip Adjustment.
“The Sale belongs to a closed batch. Tip Adjustments can only be made on open batches B.TA.C02” You attempted to create a tip for a sale that is already settled. Create Tip Adjustment.
“Sale not found B.TA.C03” You sent an invalid Sale Guid Create Tip Adjustment.
“Invalid Device GUID B.TA.C04” You sent an invalid Device Guid. Create Tip Adjustment.
“Card Verification does not allow Swiped requests. B.VB.C06” You sent track1 and/or track2. Please send a keyed card. Create Verify.
“Card Verification does not allow EMV requests. B.VB.C07” You sent EMV data. Please send a keyed card. Create Verify.
“There is no card match for the given Token. B.VB.C01” You sent a tokenized card but we were not able to find the original card number. Create Verify.
“The Verify could not be processed correctly. B.VB.C05” The Verify didn’t run successfully for an unknown reason. Please contact support. Create Verify.
“One of SaleGuid, AuthOnlyGuid, ReturnGuid, SaleReferenceNumber, AuthOnlyReferenceNumber or ReturnReferenceNumber fields is required” You didn’t say any Guid or Reference Number of the transaction you want to void. Create Void.
“Only one of SaleGuid, AuthOnlyGuid, ReturnGuid, SaleReferenceNumber, AuthOnlyReferenceNumber or ReturnReferenceNumber fields can be accepted” You sent more than one Guid belonging to different kind of transactions. Create Void.
“The AuthOnly cannot be voided because it has been captured already” You attempted to void an AuthOnly that has been already captured. Please try voiding the Sale generated instead. Create Void.
“No device found for the underlying transaction” No active device was found for the transaction you’re trying to void. Create Void.
“Sale cannot be voided because it was not processed” You attempted to void a sale that didn’t run successfully. Create Void.
“AuthOnly cannot be voided because it was not processed” You attempted to void an auth only that didn’t run successfully. Create Void.
“Return cannot be voided because it was not processed” You attempted to void a return that didn’t run successfully. Create Void.
“Transaction already settled” You attempted to void a transaction of which batch has already been closed Create Void.
“No open batch available” For some reason, there is no open batch to process your transaction. Please contact support. Any Create Transaction endpoint.
“Expiration date is required if the Card number is being sent. B.CB.GS01” You sent a Card Number but no expiration date. Create Sale, Create AuthOnly, Create Recurring Billing, Create Verify.
“Expiration date is required if the Card is being swiped. B.CB.GS02” You sent track1 and/or track2 but no expiration date. Create Sale, Create AuthOnly.
“The current Merchant Processor Account does not allow Swiped transactions. B.CB.GS03” You provided a Device Guid that belongs to a Merchant Processor Account that does not allow swiped transactions. Please try with a different device Guid. Create Sale, Create Auth Only.
“The current Merchant Processor Account does not allow EMV transactions. B.CB.GS04” You provided a Device Guid that belongs to a Merchant Processor Account that does not allow EMV transactions. Please try with a different device Guid. Create Sale, Create Auth Only.
“For EMV, required fields are EMVTags and ExpirationDate B.CB.GS05” You’re missing either EmvTags or ExpirationDate fields (or both) when trying to run an EMV transaction. Create Sale, Create Auth Only.
“Tags missing B.CB.GS06” You’re missing at least one required tag for an EMV transaction. Create Sale, Create Auth Only.
“Unexpected error: Card without token.” We were not able to tokenize the card. Please contact support. Create Sale, Create AuthOnly, Create Recurring Billing, Create Verify.
“The Card tokenization could not be processed.” Processor were not able to tokenize the card. Please contact support. Create Sale, Create AuthOnly, Create Recurring Billing, Create Verify.
“Card number, track1data or track2data missing” You didn’t say any of cardNumber, track1data or track2data. Please provide at least one of them. Create Sale, Create AuthOnly, Create Recurring Billing, Create Verify.
“Invalid DriverLicenseState name” You provided a wrong short name for Driver License State Create Bank Clearing, Create Bank Account.
“As a Credit Card device, the ProcessorId, ProcessorOperatingUserId and ProcessorPassword data are required.” You’re missing at least one of ProcessorId, ProcessorOperating UserId or ProcessorPassword Create Device.
“As an ACH device, the ProcessorLocationId data is required.” You’re missing ProcessorLocationId Create Device.
“As an ACH device, the TerminalNumber data is required.” You’re missing TerminalNumber. Create Device.
“Only one Fee Charger active device is allowed per Merchant Processor Account” You’re trying to create a device with FeeCharger=true for a Merchant Processor Account that already has an active Fee Charger Device Create Device.
“Only one Mobile active device is allowed per Merchant Processor Account” You’re trying to create a device with IsMobile=true for a Merchant Processor Account that already has an active Mobile Device. Create Device.
“In order to create a Virtual Terminal, the Merchant Processor Account where you're attempting to create this device must have setup an Auto Close Batch time.” You’re trying to create a device with IsVirtualTerminal=true for a Merchant Processor Account that hasn’t set an Auto Close Batch time yet. Create Device.
“The processor failed to return the Device Parameters. B.DB.04” Processor was not able to return the device data. Please contact support. Create Device.
“An error occurred while requesting the processor parameters for this device. B.DB.02” System was not able retrieve device data from the processor. Please contact support. Create Device.
“An error occurred while requesting the processor parameters for this device. B.DB.03” Something went wrong when system sent device parameters to processor. Please contact support. Create Device.
“Device updated. Device status changed to Paused because of an error.” Device was updated, but something went wrong so it was paused. Please contact support. Create Device.
“There are no active Fee Charger devices for your Merchant Processor Account” No active device with FeeCharger=true was found. Charge Fee.
“checkIpIsAllowed failed to check if endpoint is allowed to be run from IP” You tried to run an endpoint that is not allowed to be run from your IP address. Protected endpoints.
“The user does not have permission to do this” You attempted to run an endpoint that is not allowed for your user profile. Any endpoint.
“A server error has occurred. The operation could not be finished.” A general error occurred. Please contact support. Any endpoint.
“Hosted Payment Page Request expired” You attempted to see the preview or to confirm the transaction of a Hosted Payment Page request of which token has already expired. HostedPaymentPageRequests – Get Preview, HostedPaymentPageRequests – Confirm Transaction
“Hosted Payment Page Request TempToken already used” You attempted to see the preview or to confirm the transaction of a Hosted Payment Page request of which token has already been used. HostedPaymentPageRequests – Get Preview, HostedPaymentPageRequests – Confirm Transaction
“SendDate cannot be earlier than today” You sent a SendDate previous to current date. Create Invoice.
“PaymentDate cannot be earlier than today” You sent a PaymentDate previous to CurrentDate Create Invoice.
“Send Status not allowed” You sent a SendSatus different from “Draft” or “Scheduled To be Sent” Create Invoice.
“Invalid SendStatus” You sent a wrong SendStatus Create Invoice.
“Invalid PaymentTerm” You sent a wrong PaymentTerm Create Invoice.
“Forbidden SendStatus” You’re trying to update the SendStatus of an invoice that has been already sent and cannot be updated. Update Invoice.
“Invalid PaymentStatus” You sent a wrong PaymentStatus Update Invoice.
“A database related error occurred B.Iv.01” We were not able to retrieve the invoice because of a database error. Plase contact support. Get Invoice
“The current invoice status does not allow modifications” Invoice has been already sent and cannot be updated. Update Invoice, Update Invoice Detail
“The current detail is deleted, no changes are allowed” Invoice Detail has been deleted and cannot be updated. Update Invoice Detail.
“A database related error occurred B.IvD.01” Invoice Detail or Invoice Reminder could not be retrieved because of a database error. Please contact support. Get Invoice Detail, Get Invoice Reminder.
“For a custom reminder, date is required” You sent a customized reminder but you didn’t include the reminder’s date. Create Invoice Reminder.
“The current invoice payment status does not allow a new reminder” Invoice is already paid and a new reminder cannot be created. Create Invoice Reminder.
“Reminder date cannot be earlier than send date” You attempted to generate a reminder of which date is previous to the send date of the invoice. Create Invoice Reminder.
“Reminder date cannot be earlier than today” You attempted to generate a reminder of which date is previous to current date. Create Invoice Reminder.
“For this invoice there is an active reminder for this date already” You attempted to generate a reminder of which date is the same one another active reminder for the same invoice has. Create Invoice Reminder.
“The reminder is completed, it cannot be updated” You’re trying to update a reminder that has already been executed. Update Invoice Reminder.
“Days not specified” Something went wrong when trying to calculate the date of the reminder. Please try with a different value. Create Invoice Reminder, Update Invoice Reminder.
“Invalid Parent Iso Number” You provided a wrong Iso Number for ParentIso Create Iso
“Iso Fees and Discount rate can be null or zero, but cannot be negative” You sent a negative amount for at least one of the fees. Create Iso
“User does not have the Merchant Admin role assigned.” You assigned as merchant’s admin a user that does not have the Merchant Admin Role Create Merchant
“Merchant Processor Account Fees and Discount rate can be null or zero, but cannot be negative” You sent a negative amount for at least one of the fees. Create Merchant Processor Account
“AutoClose is available for Credit Card only” You attempted to set “AutoClose=true” for an ACH Merchant Processor Account. Create Merchant Processor Account, Update Merchant Processor Account
“Subisos cannot setup fees lower than those established by its Parent Iso” You attempted to create or update a merchant processor account and setup fees lower than the ones your parent iso charges. Create Merchant Processor Account, Update Merchant Processor Account
“Invalid context. Allowed values are: Invoice, i, RecurringBilling, rb” You sent an invalid context Get Merchant Product, Get Merchant Product List
“A database related error occurred B.MPB.01” Something went wrong at the database level when trying to retrieve something related with merchant product. Get Merchant Product, Get Merchant Product List, Get Merchant Product List Detail.
“The authenticated user does not have permission to perform this operation.” Your user role does not have permission to run the endpoint you’re pointing to. Please try with a different endpoint or contact support to get a new role. Any endpoint.
“Invalid State name” You sent a wrong US State short name. Any endpoint.
“Invalid Invoice Customer” You sent a wrong InvoiceCustomer Guid Create Invoice, Update Invoice.
“Iso number not found” You sent a wrong Iso Number Register Account
“Unable to remove Merchant Admin Profile. User is still admin of the following merchants:” You’re trying to remove the Merchant Admin profile to a user who is still admin of some merchants. Remove the user from the admin list on each of the merchants listed Update User Role
“Unable to decode the Model” You sent a wrong Json for the endpoint you pointed to Any endpoint.
“Invalid ModelState” You sent a wrong Json for the endpoint you pointed to Any endpoint.
“NoResultFound204” You sent a search or called a Get All endpoint that generated no results Any get all endpoint, Any search endpoint.
“Unable to reach entity” You sent an invalid Guid Any get endpoint.
“Wrong emailType” You sent an invalid e-mail address Resend Email.
“Invalid TempToken” You sent a wrong temporal token HostedPaymentPageRequests – Confirm Transaction
“Operation is only available for Sandbox url” You attempted to create a user using an endpoint only available for Sandbox Create User
“Iso is not active.” You sent an Iso Number belonging to an inactive iso Register Account.
“Username does not exist” You sent a username that does not exist at all Reset Password Request.
“Key expired” You attempted to reset a password using a key that is expired. Reset Password.
“Key does not exist” You attempted to reseat a password using a key that does not exist at all. Reset Password.
“Invalid State” You sent a wrong US State short name. Any endpoint.
“Invalid Status” You sent a wrong status name. Any endpoint.

Purchases

Introduction

Welcome to the ConnexPay Purchases API. You can use our API to access all the functionality of our Purchases platform.

All endpoints for the API are available on our sandbox. You can also view code samples in the right section of the screen.

We have code samples on different programming languages and we can also assist you with JSON samples, should you need further help don’t hesitate to contact your relationship manager.

Request Card

IssueCard

using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;

namespace ConnexPaySample
{
    public class RequestCard
    {
        public static void CreateIssueCard()
        {
            try
            {
                var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/IssueCard");
                request.ContentType = "text/json";
                request.Method = "POST";

                var issueCard = new
                {
                    MerchantGuid = "41b4b6e1-03bc-45cf-9568-3da832930fb3", 
                    FirstName = "Adam",
                    LastName = "Smith",
                    Phone = "7411237489",
                    Address1 = "345 Main Road",
                    Address2 = "",
                    City = "Miami Beach",
                    State = "MI",
                    Zipcode = "33109",
                    UsageLimit = 10,
                    AmountLimit = 20,
                    ValidFor = "WEEK",
                    Mcc = "",
                    PurchaseType = "01",
                    IncomingTransactionCode = "09ZZZTAS28908231800002000"
                };

                string json = JsonConvert.SerializeObject(issueCard);

                request.Headers.Add("Authorization", "Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
                request.ContentType = "application/json";
                request.Accept = "application/json";

                using (var streamWriter = new StreamWriter(request.GetRequestStream()))
                {
                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                try
                {
                    var response = (HttpWebResponse)request.GetResponse();
                    using (var reader = new StreamReader(response.GetResponseStream()))
                    {
                        string result = reader.ReadToEnd();
                        Console.Write((int)response.StatusCode);
                        Console.WriteLine();
                        Console.WriteLine(response.StatusDescription);
                        Console.WriteLine(result);
                    }
                }
                catch (WebException wex)
                {
                    if (wex.Response != null)
                    {
                        using (var errorResponse = (HttpWebResponse)wex.Response)
                        {
                            using (var reader = new StreamReader(errorResponse.GetResponseStream()))
                            {
                                string result = reader.ReadToEnd();
                                Console.Write((int)errorResponse.StatusCode);
                                Console.WriteLine();
                                Console.WriteLine(errorResponse.StatusDescription);
                                Console.WriteLine(result);
                            }
                        }
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Json Example Request:

{
   "MerchantGuid" : "41b4b6e1-03bc-45cf-9568-3da832930fb3", 
   "FirstName":"Adam",
   "LastName":"Smith",
   "Phone":"7411237489",
   "Address1":"345 Main Road",
   "Address2":"",
   "City":"Miami Beach",
   "State":"MI",
   "Zipcode":"33109",
   "UsageLimit": 10,
   "AmountLimit": 20,
   "ValidFor" : "WEEK",
   "Mcc" : "",
   "PurchaseType" : "01",
   "IncomingTransactionCode" : "09ZZZTAS28908231800002000"
}

Json Example Response:

{
    "merchantGuid": "41b4b6e1-03bc-45cf-9568-3da832930fb3",
    "cardHolder": {
        "guid": "2a26c110-7fa5-495d-b7c2-bcc3d97f84eb",
        "merchantGuid": "41b4b6e1-03bc-45cf-9568-3da832930fb3",
        "firstName": "Adam",
        "lastName": "Smith",
        "phone": "7411237489",
        "address1": "345 Main Road",
        "address2": "",
        "city": "Miami Beach",
        "state": "MI",
        "zipcode": "33109",
        "status": "CardHolder - Active"
    },
    "card": {
        "guid": "8a7069a8-db0e-40f4-abf4-09c35ee1ad29",
        "cardHolderGuid": "2a26c110-7fa5-495d-b7c2-bcc3d97f84eb",
        "nameLine1": "Adam",
        "nameLine2": "Smith",
        "status": "Card - Active"
    },
    "velocity": {
        "guid": "536313f0-5c50-4f0b-9a8c-1efb9611a34a",
        "cardGuid": "8a7069a8-db0e-40f4-abf4-09c35ee1ad29",
        "usageLimit": 10,
        "amountLimit": 20,
        "validFor": "WEEK",
        "mcc": "",
        "name": "Restrictions for 8a7069a8-db0e-40f4-abf4-09c35ee1a",
        "status": "Velocity - Active"
    },
    "balanceControl": {
        "guid": "ac60c7be-10ad-4094-9403-48b65e0f77e3",
        "incomingTransactionCode": "09ZZZTAS28908231800002000",
        "expectedOutcomingPayments": 9,
        "thisPaymentNumber": 1,
        "availablePayments": 8,
        "authorizedAmount": 20,
        "thisTransactionAmount": 20,
        "balance": 0,
        "currencyCode": "USD",
        "filler": "ZZZ",
        "outgoingTransactionCode": "09ZZZTAS28908231800002000USD01ZZZ00000000"
    }
}

This endpoint creates a issuecard.

HTTP Request

POST https://sandboxsalesapi.connexpay.com/api/v1/IssueCard

Headers

Key Value
Content-Type "application/json"
Authorization Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."

Query Parameters

Parameter Type M/C/O Value
MerchantGuid string Mandatory Merchant’s guid.
FirstName string Mandatory Cardholder’s first name.
LastName string Mandatory Cardholder’s last name.
Phone integer Optional Cardholder’s phone number. The phone number must be syntactically correct. For example, 4152345678.
Address1 string Optional Cardholder’s address line 1.
Address2 string Optional Cardholder’s address line 2.
City string Optional Cardholder’s city.
State string Optional Cardholder’s short name state. The ISO 3166-2 CA and US state or province code of a user. Length = 2.
Zipcode integer Optional Cardholder’s zipcode. Length = 5.
UsageLimit decimal Mandatory Number of times the card can be used. If ValidFor is set to TRANSACTION, do not include a UsageLimit. Length = 0-100.
AmountLimit decimal Mandatory Max amount the card can spend.
ValidFor string Mandatory Period the AmountLimit and UsageLimit fields apply.

Allowed values:

1. DAY
2. WEEK
3. MONTH
4. LIFETIME
5. TRANSACTION
Mcc string Optional SIC codes. For example, "5172". Length = 4.
PurchaseType string Mandatory Purchase Type.
IncomingTransactionCode string Mandatory Incoming Transaction Code.

Response