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
- 200 code (ok).
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
- 200 code (ok).
Sale
Create Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
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",
TenderType = "Cash",
SequenceNumber = "849741",
OrderNumber = "159874",
ActivationDate = "2021-01-01",
SendReceipt = true,
RiskProcessingOnly = false,
StatementDescription = "Agent Booking 123",
CustomerId = "xt147",
ConnexPayTransaction = new
{
ExpectedPayments = "9"
},
RiskData = new
{
Name = "John Doe",
Gender = "M",
DateOfBirth = "1993-03-18",
BillingPhoneNumber = "9177563046",
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",
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",
CardHolderName = "John Doe",
Cvv2 = "999",
ExpirationDate = "1912",
IsRecurring = true,
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":"{{Device}}",
"Amount":280,
"TenderType":"Credit",
"SequenceNumber":"849741",
"OrderNumber":"159874",
"ActivationDate": "2020-01-01",
"SendReceipt":true,
"RiskProcessingOnly":false,
"StatementDescription":"Agent Booking 123",
"CustomerId":"xt147",
"ConnexPayTransaction":{
"ExpectedPayments":9
},
"RiskData":{
"Name":"John Doe",
"Gender":"M",
"DateOfBirth":"1993-03-18",
"BillingPhoneNumber":"9177563046",
"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",
"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",
"CardHolderName":"John Doe",
"Cvv2":"999",
"ExpirationDate":"1912",
"IsRecurring":true,
"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"
}
},
"EnhancedData":{
"SaleTax":"5",
"AdditionalTaxDetailTaxCategory":"tex",
"AdditionalTaxDetailTaxType":"regional",
"AdditionalTaxDetailTaxAmount":"3",
"AdditionalTaxDetailTaxRate":"2.50",
"PurchaseOrder":"PURCHSEORDER1",
"OrderDate":"07/20/2018",
"ShippingCharges":"20",
"DutyCharges":"17.59",
"CustomerVATNumber":"75010101",
"VATInvoice":"231465214",
"SummaryCommodityCode":"Aa94",
"ShipToZip":"50001",
"ShipFromZip":"55100",
"DestinationCountryCode":"ARG",
"SupplierReferenceNumber":"123",
"CustomerRefID":"123",
"ChargeDescriptor":"Sample Charge",
"AdditionalAmount":"2.50",
"AdditionalAmountType":"GIFT_SHOP",
"ProductName":"Product 01",
"ProductCode":"P1",
"Price":"5.00"
}
}
Json Example Response:
{
"guid":"965a67b0-cd0e-4020-973b-5e0d1b4bd6e2",
"status":"Transaction - Approved",
"type":"Default",
"batchStatus":"Batch - Open",
"timeStamp":"2019-11-20T05:37:13.22-05:00",
"deviceGuid":"f758a448-7780-4b50-93a1-28329e37f94f",
"amount":280.0,
"activated": true,
"tenderType":"Credit",
"effectiveAmount":280.0,
"riskResponse":{
"transactionId":"73PK0DN43KSZ",
"response":"Approved",
"reason":"",
"score":"38"
},
"orderNumber":"159874",
"cardDataSource":"INTERNET",
"customerID":"xt147",
"batchGuid":"c71d0ee6-b595-4792-b1ee-1156d28be132",
"connexPayTransaction":{
"guid":"d6c7e3c3-1cdd-47a1-89b9-368059b85c2c",
"expectedPayments":9,
"filler":"ZZZ",
"incomingTransCode":"09ASECYE48S9KHBQL00028000"
},
"riskProcessingOnly":false,
"processorStatusCode":"A0000",
"processorResponseMessage":"Success",
"wasProcessed":true,
"authCode":"TAS698",
"refNumber":"21313220",
"customerReceipt":"CONNEXPAY\\n8320 S HARDY DRIVE...\\n",
"statementDescription":"Agent Booking 123",
"generatedBy":"tcformal1",
"enhancedData":{
"saleTax":5.0,
"purchaseOrder":"PURCHSEORDER1",
"additionalTaxDetailTaxCategory":"tex",
"additionalTaxDetailTaxType":"regional",
"additionalTaxDetailTaxAmount":3.0,
"additionalTaxDetailTaxRate":2.5,
"shippingCharges":20.0,
"dutyCharges":17.59,
"shipToZip":"50001",
"shipFromZip":"55100",
"destinationCountryCode":"ARG",
"customerVATNumber":"75010101",
"summaryCommodityCode":"Aa94",
"vatInvoice":"231465214",
"orderDate":"07/20/2018",
"supplierReferenceNumber":"123",
"customerRefID":"123",
"chargeDescriptor":"Sample Charge",
"productName":"Product 01",
"productCode":"P1",
"price":5.0,
"additionalAmount":2.5,
"additionalAmountType":"GIFT_SHOP"
},
"card":{
"first4":"4716",
"last4":"0473",
"cardNumber":"CARD NOT TOKENIZED",
"cardHolderName":"John Doe",
"cardType":"Visa",
"expirationDate":"2019-12",
"guid":"b9b2fcd3-6b35-40a6-a560-6e434ae01068",
"customer":{
"guid":"3bd93697-005a-4723-a7f8-f892577ee2bf",
"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",
"addressVerificationCode":"N",
"addressVerificationResult":"No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address.",
"cvvVerificationCode":"M",
"cvvVerificationResult":"CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant."
}
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..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device's Guid provided by ConnexPay. |
Amount | decimal | Mandatory | Amount of the transaction that will be processed. Note: this value is submitted multiple times (in different formats) within the integration to support different purposes i.e. risk analysis, merchant processinging, etc. The minimun amount is: $0.50. |
TenderType | string | Optional | Allowed values: 1. Credit (default if TenderType not provided) 2. Cash |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
OrderNumber | string | Optional | This is the most common number you'll see throughout the ConnexPay Portal.
Transaction ID within client environment associated with the order. The value is searchable and reportable in the ConnexPay portal. This value may be sent in multiple instances of the integration for multiple purposes. Customers in the travel space often send the Record Locator/PNR in this field. The maximum length is 50 alpha-numeric characters and allows dashes ( - ). |
SendReceipt | boolean | Optional | Value determines whether or not a customer shall be emailed a receipt from the ConnexPay platform if the email address is provided in the API customer block. The default value is TRUE. Set to FALSE so that an email receipt is not sent to the customer. Set to TRUE or leave empty if you want e-mail to be sent. If TRUE, customer's email must be included in the "Card.Customer.email" parameter. |
RiskProcessingOnly | boolean | Optional | Indicator that determines if client would like to evaluate the transactions as risk only rather than process as merchant of record and create a virtual card. The allowed values: 1. Set to TRUE will only run risk validations. If TenderType is set to Cash, setting TRUE will throw a validation error. 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. |
StatementDescription | string | Optional | The statement description allows a client to customize the Merchant name that appears on the cardholder statement such that the cardholder recognizes the transaction on their statement. ConnexPay recommends sending a recognizable DBA along with the PNR i.e. ABC Travel ABC123. Note: functionality not applicable for American Express OptBlue program. The maximun length is 25 alpha-numeric characters. |
CustomerID | string | Optional | Transaction ID within client environment associated with the customer. This value acts as a secondary identifier in conjunction with OrderNumber. The value is searchable and reportable in the ConnexPay portal. This value may be sent in multiple times within the integration for multiple purposes. The maximum length is 50 characters and is alpha-numeric. |
ActivationDate | string | Optional | Set a future date on which to run this sale, at least one day from creation date and within one year. If this parameter is supplied a record for this sale is created, supplied consumer card information is internally tokenized, but fraud check and authorization do not occur until ConnexPay processes it on the supplied ActivationDate. Alternatively, a client can force activation via the Activate API (see below). If this date is not supplied a sale is authorized immediately. |
GroupId | string | Optional | When needing to issue a Virtual Card that ties to more than one Sale transaction, you can send in a GroupId (with the same GroupId) on the Sales that you need to group together. By including a common GroupId for two or more Sales transaction, a Virtual Card may then be created for the sum of the Sales within that GroupId. A common use case for this is when multiple families are going on a cruise - each family may want to pay separately on their credit card. However, the Travel Agent may want to pay for the cruise with one virtual card. The maximum length is 25 alpha-numeric characters. This is for limited use - please contact your Customer Success Manager if you would like to enable this functionality. |
ConnexPayTransaction | object | Mandatory | ConnexPay Transaction. |
RiskData | object | Mandatory if TenderType is Credit or not set | Risk Data. This will be ignored if TenderType is Cash |
Card | object | Mandatory if TenderType is Credit or not set | Card Data. This will be ignored if TenderType is Cash |
Customer | object | Optional | Customer Data. This will only be used if TenderType is not Credit |
EnhancedData | object | Optional | Enhanced Level 2 and Level 3 card data is a set of additional information for business, commercial, corporate, purchasing, and government cardholders. |
ConnexPayTransaction | |||
ExpectedPayments | integer | Mandatory | This is the number of outbound payments that will be made to suppliers. If paying a single supplier the value is 1, if paying two suppliers the value is 2, etc. This number is critical to the release of Daily Markup/Funding. |
RiskData | |||
Name | string | Optional | This is the name of the individual making the purchase i.e. cardholder who may or may not also be the customer. This value is submitted in multiple integration points for different purposes. This value/object is specific to fraud mitigation. Note: for airline ticket purchases this value may or may not be the same as the passenger. Max Length = 64 |
Gender | string | Optional | Cardholder gender. "M" or "F". |
DateOfBirth | string | Optional | Cardholder date of birth. |
BillingPhoneNumber | string | Optional | Phone number associated with cardholder making purchase. Cardholder billing phone number. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
BillingAddress1 | string | Optional | Cardholder billing address 1. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingAddress2 | string | Optional | Cardholder billing address 2. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingCity | string | Optional | Cardholder billing city. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingState | string | Optional | Cardholder billing state. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingPostalCode | string | Optional | Cardholder billing postal code. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. Max Length = 15 |
BillingCountryCode | string | Optional | Cardholder billing country code. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. Length = 2. |
string | Optional | Cardholder's valid email address. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. | |
ProductType | string | Mandatory | Generalized description of the item added passed as plain text. This could be flight, tour, hotel, etc. (This is part of shopping cart information in Kount Console). Each transaction submitted for risk analysis and decisioning must be submitted with one shopping cart item. |
ProductDesc | string | Optional | Attribute for a specific description of the item being purchased i.e. airline ticket. This information is general shopping cart information that describes the type of item being purchased. ConnexPay suggests clients submitted a high level description such as Flight, Hotel, Car Rental, etc... and leverage custom parameters to submit more detailed information that can be used for rule creation and transaction decisioning. |
ProductItem | string | Mandatory | Typically the SKU for an item passed as plain text. This information is general shopping cart information to provide secondary detail to the ProductDesc above. ConnexPay suggests clients submit a high level description such as One Way, Round Trip, Seven Nights, etc...and several customer parameters to submit more detailed information that can be used for rule creation and transaction decisioning. Field is required by Kount therefore some value must be submitted. Alphanumeric. |
ProductQuantity | integer | Optional | Quantity of the item being purchased in the shopping cart. This is just a general quantity field. |
ProductPrice | integer | Optional | Price per unit item, displayed in lowest currency factor - expressed in cents. Example: 42400 (which is $424.00). |
OrderNumber | string | Optional | Transaction ID within client environment associated with the order.
The value is searchable and reportable in the Kount portal.
This value may be sent in multiple instances of the integration for multiple purposes.
Customers in the travel space often send the Record Locator/PNR in this field.
The maximum length is 32 alpha-numeric characters and allows dashes ( - ). |
SellerId | string | Optional | Transaction ID within client environment associated with the customer. This value acts as a secondary identifier in conjunction with OrderNumber. The value is searchable and reportable in the Kount portal. This value may be sent in multiple times within the integration for multiple purposes. The maximum length is 32 characters. |
FlightData | object | Optional | Flight Data. |
FlightPassengers | object[] | Optional | Flight Passengers. Array. |
CustomParameters | object[] | Optional | Custom Parameters. Array. |
FlightData | |||
Airline | string | Optional | Name of Airline; likely carrier code. |
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, drivers liscense or id# associated with passenger. |
Name | string | Optional | Passenger information. Each passenger should be sent in it's own object. Only two passengers can be submitted. Country - Alpha characters only. DateOfBirth - Passenger Date of Birth. YYYY-MM-DD format Id - ID of passenger. Numeric characters only. Name - Name of passenger. Alpha characters only. |
CustomParameters | |||
Name | string | Optional | Custom Parameter's Name. |
Value | string | Optional | Custom Parameter's Value. |
Card | |||
CardNumber | string | Mandatory if Guid field is not provided | Card number. Must be 16 characters. (example: 4532538795426624) or token (example: FfL7exC7Xe2y6624). |
CardHolderName | string | Optional | Cardholder's name. Providing information in this field allows a user of the ConnexPay portal to search for a transaction using the cardholder name. |
Cvv2 | integer | Optional | The three or four digit CVV code at the back side of the credit and debit card. This value is required for all card-not-present processing environments. |
ExpirationDate | date | Optional with Token | Card's expiry date in the YYMM format. |
Guid | string | Optional | Guid is the unique identifier for a card info generated by Connexpay upon previous Sale creation. Create Sale API will accept either card info or Guid, but not both. |
IsRecurring | boolean | Optional | Flagging a transaction as "IsRecurring": true allows a recurring sale to be submitted without a valid CVV code. |
Customer | object | Optional | Customer. |
Customer | |||
FirstName | string | Optional | First name of the customer if he or she is not the cardholder paying for the transaction. Min Length = 2 Max Length = 30 |
LastName | string | Optional | Last name of the customer if he or she is not the cardholder paying for the transaction. Min Length = 2 Max Length = 30 |
Phone | string | Optional | Customer's phone number. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
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. |
string | Optional | Customer's valid email address which is available in various reports. It is critical that SendReceipt is set to FALSE so that ConnexPay does not send a receipt to the cardholder when the transaction is processed. | |
Address1 | string | Optional | Customer billing address 1. It is strongly recommended to send this value in a card-not-present environment such that enhanced Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. Note: only the street number value portion of address is used for enhanced AVS check. |
Address2 | string | Optional | Customer billing address 2. It is strongly recommended to send this value in a card-not-present environment such that Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. |
Zip | integer | Optional | Customer billing postal code. It is strongly recommended to send this value in a card-not-present environment such that basic Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. Only the a standard U.S. 5 digit zip code is elegible for basic AVS check. Min Length = 2 Max Length = 15 |
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. Only letters, numbers and a hyphen is allowed |
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 | Optional | Last 4 of Customer's Social Security Number. |
EnhancedData | |||
SaleTax | decimal | Optional | Sales Tax amount. |
AdditionalTaxDetailTaxCategory | string | Optional | Tax Category |
AdditionalTaxDetailTaxType | string | Optional | Tax Type |
AdditionalTaxDetailTaxAmount | decimal | Optional | Tax Amount |
AdditionalTaxDetailTaxRate | decimal | Optional | Tax Rate |
PurchaseOrder | string | Optional | Purchase Order |
OrderDate | date | Optional | Order Date |
ShippingCharges | decimal | Optional | Shipping Charges |
DutyCharges | decimal | Optional | Duty Charges |
CustomerVATNumber | integer | Optional | Customer VAT Number |
VATInvoice | integer | Optional | VAT Invoice |
SummaryCommodityCode | string | Optional | Summary Commodity Code |
ShipToZip | integer | Optional | Ship To Zip |
ShipFromZip | integer | Optional | Ship From Zip |
DestinationCountryCode | string | Optional | Destination Country Code |
SupplierReferenceNumber | integer | Optional | Supplier Reference Number |
CustomerRefID | integer | Optional | Customer Ref ID |
ChargeDescriptor | string | Optional | Charge Descriptor |
AdditionalAmount | decimal | Optional | Additional Amount |
AdditionalAmountType | string | Optional | Additional Amount Type |
ProductName | string | Optional | Product Name |
ProductCode | string | Optional | Product Code |
Price | string | Optional | Price |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
Type | string | Transaction Type. Possible values: Default: Risk validations and payment processing were attempted. RiskOnly: Only Risk validations were done. No payment processing was attempted. Passthrough: Submitted payment method was not sent for processing. Customer's card should be used directly with the supplier. |
Update Delayed Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class Sale
{
public static void UpdateDelayedSale()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales/UpdateFutureSale");
request.ContentType = "text/json";
request.Method = "POST";
var updateFutureSale = new
{
DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
SaleGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
ActivationDate = "10/12/2020",
Amount = 15.50,
};
string json = JsonConvert.SerializeObject(updateFutureSale);
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":"{{Device}}",
"SaleGuid":"{{Device}}",
"ActivationDate":"10/12/2020",
"Amount":280,
}
Json Example Response:
{
"guid":"965a67b0-cd0e-4020-973b-5e0d1b4bd6e2",
"status":"Transaction - Approved",
"type":"Default",
"batchStatus":"Batch - Open",
"timeStamp":"2019-11-20T05:37:13.22-05:00",
"deviceGuid":"f758a448-7780-4b50-93a1-28329e37f94f",
"amount":280.0,
"activationDate":"2020-10-12T00:00:00",
"activated":false,
"tenderType":"Credit",
"effectiveAmount":280.0,
"orderNumber":"159874",
"cardDataSource":"INTERNET",
"customerID":"xt147",
"batchGuid":"c71d0ee6-b595-4792-b1ee-1156d28be132",
"riskProcessingOnly":false,
"processorStatusCode":"A0000",
"processorResponseMessage":"Success",
"wasProcessed":true,
"generatedBy":"tcformal1",
"card":{
"first4":"4716",
"last4":"0473",
"cardNumber":"CARD NOT TOKENIZED",
"cardHolderName":"John Doe",
"cardType":"Visa",
"expirationDate":"2019-12",
},
"sequenceNumber":"849741",
"addressVerificationResult":"No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address.",
"cvvVerificationCode":"M",
"cvvVerificationResult":"CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant."
"incomingTransactionCode":"09ASECYE48S9KHBQL00028000"
}
Change the amount that will ultimately settle on a delayed activation sale and/or change the activation date.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/sales/UpdateFutureSale
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device's Guid provided by ConnexPay. |
SaleGuid | string | Mandatory | Sales's Guid that was provided by ConnexPay upon initial creation of the delayed activation sale. |
Amount | decimal | Mandatory | Amount of the transaction that will be processed. Note: this value is submitted multiple times (in different formats) within the integration to support different purposes i.e. risk analysis, merchant processinging, etc. The minimun amount is: $0.50. |
ActivationDate | string | Optional | Set a future date on which to run this sale, at least one day from creation date and within one year. |
Activate Delayed Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class Sale
{
public static void ActivateDelayedSale(Guid saleGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.ActivateDelayedSale("https://sandboxsalesapi.connexpay.com/api/v1/sales/Activate/" + saleGuid);
request.ContentType = "text/json";
request.Method = "PUT";
request.Headers.Add("Authorization",
"Bearer 1A089D6ziUybPZFQ3mpPyjt9OEx9yrCs7eQIC6V3A0lmXR2N6-seGNK16Gsnl3td6Ilfbr2Xf_EyukFXwnVEO3fYL-LuGw-L3c8WuaoxhPE8MMdlMPILJTIOV3lTGGdxbFXdKd9U03bbJ9TDUkqxHqq8_VyyjDrw7fs0YOob7bg0OovXTeWgIvZaIrSR1WFR06rYJ0DfWn-Inuf7re1-4SMOjY1ZoCelVwduWCBJpw1111cNbWtHJfObV8u1CVf0");
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 Response:
{
"guid":"965a67b0-cd0e-4020-973b-5e0d1b4bd6e2",
"status":"Transaction - Approved",
"type":"Default",
"batchStatus":"Batch - Open",
"timeStamp":"2019-11-20T05:37:13.22-05:00",
"deviceGuid":"f758a448-7780-4b50-93a1-28329e37f94f",
"amount":280.0,
"activationDate":"2020-09-02T00:00:00",
"activated":true,
"tenderType":"Credit",
"effectiveAmount":280.0,
"orderNumber":"159874",
"cardDataSource":"INTERNET",
"customerID":"xt147",
"batchGuid":"c71d0ee6-b595-4792-b1ee-1156d28be132",
"riskProcessingOnly":false,
"processorStatusCode":"A0000",
"processorResponseMessage":"Success",
"wasProcessed":true,
"authCode":"TAS698",
"refNumber":"21313220",
"customerReceipt":"CONNEXPAY\\n8320 S HARDY DRIVE...\\n",
"statementDescription":"Agent Booking 123",
"generatedBy":"tcformal1",
"card":{
"first4":"4716",
"last4":"0473",
"cardNumber":"CARD NOT TOKENIZED",
"cardHolderName":"John Doe",
"cardType":"Visa",
"expirationDate":"2019-12",
},
"addressVerificationCode":"0",
"addressVerificationResult":"No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address.",
"cvvVerificationCode":"M",
"cvvVerificationResult":"CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant."
"incomingTransactionCode":"750A64F637344965443717533"
}
Activate a delayed activation sale independent of the activation date for which the sale was created.
A client can "Activate" a delayed activation sale this way at any time before ConnexPay will automatically activate it during the early hours of the supplied future date.
HTTP Request
PUT https://sandboxsalesapi.connexpay.com/api/v1/sales/Activate/{SaleGuid}
Where SaleGuid URL parameter is the sale guid returned upon initial creation of the delayed activation sale.
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body: None
Auth
Create Auth
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class Auth
{
public static void CreateAuth()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/authonlys");
request.ContentType = "text/json";
request.Method = "POST";
var sale = new
{
DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
Amount = "1500",
SequenceNumber = "849741",
OrderNumber = "159874",
SendReceipt = true,
StatementDescription = "Agent Booking 123",
CustomerId = "xt147"
RiskData = new
{
Name = "John Doe",
Gender = "M",
DateOfBirth = "1993-03-18",
BillingPhoneNumber = "9177563046",
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",
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",
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 = "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":"{{Device}}",
"Amount":280,
"SequenceNumber":"849741",
"OrderNumber":"1598742342342432342342432432",
"SendReceipt":true,
"StatementDescription":"Agent Booking 123",
"CustomerID":"xt147",
"RiskData":{
"Name":"John Doe",
"Gender":"M",
"DateOfBirth":"1993-03-18",
"BillingPhoneNumber":"9177563046",
"BillingAddress1":"151 E 33rd St",
"BillingAddress2":"Second Floor",
"BillingCity":"New York",
"BillingState":"NY",
"BillingPostalCode":"10016",
"BillingCountryCode":"US",
"Email":"someone@connexpay.com",
"ProductType":"Flight",
"ProductDesc":"Flight from London to New York",
"ProductItem":"784GTWJFK856",
"ProductQuantity":4,
"ProductPrice":"42400",
"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":"5413330089604111",
"CardHolderName":"John Doe",
"Cvv2":"998",
"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"
}
},
"EnhancedData":{
"SaleTax":"5",
"AdditionalTaxDetailTaxCategory":"tex",
"AdditionalTaxDetailTaxType":"regional",
"AdditionalTaxDetailTaxAmount":"3",
"AdditionalTaxDetailTaxRate":"2.50",
"PurchaseOrder":"PURCHSEORDER1",
"OrderDate":"07/20/2018",
"ShippingCharges":"20",
"DutyCharges":"17.59",
"CustomerVATNumber":"75010101",
"VATInvoice":"231465214",
"SummaryCommodityCode":"Aa94",
"ShipToZip":"50001",
"ShipFromZip":"55100",
"DestinationCountryCode":"ARG",
"SupplierReferenceNumber":"123",
"CustomerRefID":"123",
"ChargeDescriptor":"Sample Charge",
"AdditionalAmount":"2.50",
"AdditionalAmountType":"GIFT_SHOP",
"ProductName":"Product 01",
"ProductCode":"P1",
"Price":"5.00"
}
}
Json Example Response:
{
"guid": "6d75f588-711e-4481-92ed-1d078b507832",
"status": "Transaction - Approved",
"batchStatus": "Batch - Open",
"timeStamp": "2020-07-09T23:45:58.12+06:00",
"amount": 280.00,
"effectiveAmount": 280.00,
"orderNumber": "1598742342342432342342432432",
"deviceGuid": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"cardDataSource": "INTERNET",
"customerID": "xt147",
"batchGuid": "89133895-142f-4c70-98c7-5194d91bb500",
"sendReceipt": true,
"allowCardEmv": false,
"processorStatusCode": "A0000",
"processorResponseMessage": "Success",
"wasProcessed": true,
"authCode": "VTLMC1",
"refNumber": "23159362",
"invoiceNumber": "15987423423424323423424",
"customerReceipt": "Agent Booking 123\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/09/2020 04:46:01\\n\\nCREDIT - AUTH ONLY\\n\\nCARD # : **** **** **** 4111\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 23159362\\nInvoice number : 15987423423424323423424\\nAUTH CODE : VTLMC1\\n--------------------------------------\\nCode Name\\nQty Price\\n--------------------------------------\\nP1 Product 01\\n1 $5.00\\n--------------------------------------\\nSubtotal: $234.41\\n--------------------------------------\\nTaxes\\n--------------------------------------\\n[1] Sales Tax $05.00\\n[2] regional Tax $03.00\\n--------------------------------------\\nTotal Taxes: $08.00\\n--------------------------------------\\nFees\\n--------------------------------------\\nFee: $37.59\\n--------------------------------------\\nTotal Fees: $37.59\\n--------------------------------------\\nTotal: $280.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",
"statementDescription": "Agent Booking 123",
"enhancedData": {
"saleTax": 5.00,
"purchaseOrder": "PURCHSEORDER1",
"additionalTaxDetailTaxCategory": "tex",
"additionalTaxDetailTaxType": "regional",
"additionalTaxDetailTaxAmount": 3.00,
"additionalTaxDetailTaxRate": 2.50,
"shippingCharges": 20.00,
"dutyCharges": 17.59,
"shipToZip": "50001",
"shipFromZip": "55100",
"destinationCountryCode": "ARG",
"customerVATNumber": "75010101",
"summaryCommodityCode": "Aa94",
"vatInvoice": "231465214",
"orderDate": "07/20/2018",
"supplierReferenceNumber": "123",
"customerRefID": "123",
"chargeDescriptor": "Sample Charge",
"productName": "Product 01",
"productCode": "P1",
"price": 5.00,
"additionalAmount": 2.50,
"additionalAmountType": "GIFT_SHOP"
},
"card": {
"first6": "541333",
"first4": "5413",
"last4": "4111",
"cardHolderName": "John Doe",
"cardType": "Mastercard",
"expirationDate": "2019-12",
"customer": {
"guid": "5dd6ed47-3e5b-4123-bc0e-81b32663e8ee",
"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"
},
"guid": "b34bec7f-6ef0-42d8-8811-1bea8d2260fe"
},
"addressVerificationCode": "N",
"addressVerificationResult": "No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address.",
"cvvVerificationCode": "M",
"cvvVerificationResult": "CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant.",
"riskResponse": {
"transactionId": "DGJK0BBRH2NH",
"response": "Approved",
"reason": "",
"score": "34"
},
"type": "Default"
}
Calling this endpoint will authorize the card, however, it will not be settled until the Capture endpoint is called. Authorizations expire after 5 days.
The follwoing endpoint creates an auth.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/authonlys
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device's Guid provided by ConnexPay. |
Amount | decimal | Mandatory | Amount of the transaction that will be processed. Note: this value is submitted multiple times (in different formats) within the integration to support different purposes i.e. risk analysis, merchant processinging, etc. The minimun amount is: $0.50. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
OrderNumber | string | Optional | This is the most common number you'll see throughout the ConnexPay Portal. Transaction ID within client environment associated with the order. The value is searchable and reportable in the ConnexPay portal. This value may be sent in multiple instances of the integration for multiple purposes. Customers in the travel space often send the Record Locator/PNR in this field. The maximum length is 50 alpha-numeric characters. |
SendReceipt | boolean | Optional | Value determines whether or not a customer shall be emailed a receipt from the ConnexPay platform if the email address is provided in the API customer block. The default value is TRUE. Set to FALSE so that an email receipt is not sent to the customer. Set to TRUE or leave empty if you want e-mail to be sent. If TRUE, customer's email must be included in the "Card.Customer.email" parameter. |
StatementDescription | string | Optional | The statement description allows a client to customize the Merchant name that appears on the cardholder statement such that the cardholder recognizes the transaction on their statement. ConnexPay recommends sending a recognizable DBA along with the PNR i.e. ABC Travel ABC123. Note: functionality not applicable for American Express OptBlue program. The maximun length is 25 alpha-numeric characters. |
CustomerID | string | Optional | Transaction ID within client environment associated with the customer. This value acts as a secondary identifier in conjunction with OrderNumber. The value is searchable and reportable in the ConnexPay portal. This value may be sent in multiple times within the integration for multiple purposes. The maximum length is 50 characters and is alpha-numeric. |
RiskData | object | Mandatory if TenderType is Credit or not set | Risk Data. This will be ignored if TenderType is Cash |
Card | object | Mandatory if TenderType is Credit or not set | Card Data. This will be ignored if TenderType is Cash |
Customer | object | Optional | Customer Data. This will only be used if TenderType is not Credit |
EnhancedData | object | Optional | Enhanced Level 2 and Level 3 card data is a set of additional information for business, commercial, corporate, purchasing, and government cardholders. |
RiskData | |||
Name | string | Optional | This is the name of the individual making the purchase i.e. cardholder who may or may not also be the customer. This value is submitted in multiple integration points for different purposes. This value/object is specific to fraud mitigation. Note: for airline ticket purchases this value may or may not be the same as the passenger. |
Gender | string | Optional | Cardholder gender. "M" or "F". |
DateOfBirth | string | Optional | Cardholder date of birth. |
BillingPhoneNumber | string | Optional | Phone number associated with cardholder making purchase. Cardholder billing phone number. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
BillingAddress1 | string | Optional | Cardholder billing address 1. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingAddress2 | string | Optional | Cardholder billing address 2. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingCity | string | Optional | Cardholder billing city. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingState | string | Optional | Cardholder billing state. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingPostalCode | string | Optional | Cardholder billing postal code. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. |
BillingCountryCode | string | Optional | Cardholder billing country code. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. Length = 2. |
string | Optional | Cardholder's valid email address. This value is used in risk analysis and decisioning. More specifically, can be used for rule creation or additional identity validation using the White Pages Pro add on option. | |
ProductType | string | Mandatory | Generalized description of the item added passed as plain text. This could be flight, tour, hotel, etc. (This is part of shopping cart information in Kount Console). Each transaction submitted for risk analysis and decisioning must be submitted with one shopping cart item. |
ProductDesc | string | Optional | Attribute for a specific description of the item being purchased i.e. airline ticket. This information is general shopping cart information that describes the type of item being purchased. ConnexPay suggests clients submitted a high level description such as Flight, Hotel, Car Rental, etc... and leverage custom parameters to submit more detailed information that can be used for rule creation and transaction decisioning. |
ProductItem | string | Mandatory | Typically the SKU for an item passed as plain text. This information is general shopping cart information to provide secondary detail to the ProductDesc above. ConnexPay suggests clients submit a high level description such as One Way, Round Trip, Seven Nights, etc...and several customer parameters to submit more detailed information that can be used for rule creation and transaction decisioning. Field is required by Kount therefore some value must be submitted. Alphanumeric. |
ProductQuantity | integer | Optional | Quantity of the item being purchased in the shopping cart. This is just a general quantity field. |
ProductPrice | integer | Optional | Price per unit item, displayed in lowest currency factor - expressed in cents. Example: 42400 (which is $424.00). |
OrderNumber | string | Optional | Transaction ID within client environment associated with the order. The value is searchable and reportable in the Kount portal. This value may be sent in multiple instances of the integration for multiple purposes. Customers in the travel space often send the Record Locator/PNR in this field. The maximum length is 32 alpha-numeric characters. |
SellerId | string | Optional | Transaction ID within client environment associated with the customer. This value acts as a secondary identifier in conjunction with OrderNumber. The value is searchable and reportable in the Kount portal. This value may be sent in multiple times within the integration for multiple purposes. The maximum length is 32 characters. |
FlightData | object | Optional | Flight Data. |
FlightPassengers | object[] | Optional | Flight Passengers. Array. |
CustomParameters | object[] | Optional | Custom Parameters. Array. |
FlightData | |||
Airline | string | Optional | Name of Airline; likely carrier code. |
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, drivers liscense or id# associated with passenger. |
Name | string | Optional | Passenger information. Each passenger should be sent in it's own object. Only two passengers can be submitted. Country - Alpha characters only. DateOfBirth - Passenger Date of Birth. YYYY-MM-DD format Id - ID of passenger. Numeric characters only. Name - Name of passenger. Alpha characters only. |
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. Providing information in this field allows a user of the ConnexPay portal to search for a transaction using the cardholder name. |
Cvv2 | integer | Optional | The three or four digit CVV code at the back side of the credit and debit card. This value is required for all card-not-present processing environments. |
ExpirationDate | date | Optional with Token | Card's expiry date in the YYMM format. |
Customer | object | Optional | Customer. |
Customer | |||
FirstName | string | Optional | First name of the customer if he or she is not the cardholder paying for the transaction. |
LastName | string | Optional | Last name of the customer if he or she is not the cardholder paying for the transaction. |
Phone | string | Optional | Customer's phone number. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
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. |
string | Optional | Customer's valid email address which is available in various reports. It is critical that SendReceipt is set to FALSE so that ConnexPay does not send a receipt to the cardholder when the transaction is processed. | |
Address1 | string | Optional | Customer billing address 1. It is strongly recommended to send this value in a card-not-present environment such that enhanced Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. Note: only the street number value portion of address is used for enhanced AVS check. |
Address2 | string | Optional | Customer billing address 2. It is strongly recommended to send this value in a card-not-present environment such that Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. |
Zip | integer | Optional | Customer billing postal code. It is strongly recommended to send this value in a card-not-present environment such that basic Address Validation (AVS) can be performed on transaction and the lowest possible interchange is received on transaction. Only the a standard U.S. 5 digit zip code is elegible for basic AVS check. |
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. Only letters, numbers and a hyphen is allowed |
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 | Optional | Last 4 of Customer's Social Security Number. |
EnhancedData | |||
SaleTax | decimal | Optional | Sales Tax amount. |
AdditionalTaxDetailTaxCategory | string | Optional | Tax Category |
AdditionalTaxDetailTaxType | string | Optional | Tax Type |
AdditionalTaxDetailTaxAmount | decimal | Optional | Tax Amount |
AdditionalTaxDetailTaxRate | decimal | Optional | Tax Rate |
PurchaseOrder | string | Optional | Purchase Order |
OrderDate | date | Optional | Order Date |
ShippingCharges | decimal | Optional | Shipping Charges |
DutyCharges | decimal | Optional | Duty Charges |
CustomerVATNumber | integer | Optional | Customer VAT Number |
VATInvoice | integer | Optional | VAT Invoice |
SummaryCommodityCode | string | Optional | Summary Commodity Code |
ShipToZip | integer | Optional | Ship To Zip |
ShipFromZip | integer | Optional | Ship From Zip |
DestinationCountryCode | string | Optional | Destination Country Code |
SupplierReferenceNumber | integer | Optional | Supplier Reference Number |
CustomerRefID | integer | Optional | Customer Ref ID |
ChargeDescriptor | string | Optional | Charge Descriptor |
AdditionalAmount | decimal | Optional | Additional Amount |
AdditionalAmountType | string | Optional | Additional Amount Type |
ProductName | string | Optional | Product Name |
ProductCode | string | Optional | Product Code |
Price | string | Optional | Price |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
Type | string | Transaction Type. Possible values: Default: Risk validations and payment processing were attempted. Passthrough: Submitted payment method was not sent for processing. Customer's card should be used directly with the supplier. |
Capture
Create Capture
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
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 = "f758a448-7780-4b50-93a1-28329e37f94f",
AuthOnlyGuid = "df5f03e7-5e99-4108-b1a6-2418d7ddcadd",
SequenceNumber = "capture-1",
ConnexPayTransaction = new
{
ExpectedPayments = 5
}
};
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": "f758a448-7780-4b50-93a1-28329e37f94f",
"AuthOnlyGuid" : "df5f03e7-5e99-4108-b1a6-2418d7ddcadd",
"SequenceNumber": "capture-1",
"ConnexpayTransaction": {
"ExpectedPayments": 5
}
}
Json Example Response:
{
"guid": "5669a85c-d1a4-43ac-b799-8bc7f4ffb509",
"sale": {
"guid": "52785a8e-9616-4e1c-b01d-365a99b256b0",
"status": "Transaction - Approved",
"type": "Default",
"batchStatus": "Batch - Open",
"timeStamp": "2020-07-12T21:58:00.15+06:00",
"deviceGuid": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"amount": 10.00,
"activated": true,
"tenderType": "Credit",
"effectiveAmount": 10.00,
"riskResponse": {
"transactionId": "DGG80N33TZTR",
"response": "Approved",
"reason": "",
"score": "34"
},
"orderNumber": "159874",
"cardDataSource": "INTERNET",
"customerID": "xt147",
"batchGuid": "5a80016c-d96f-4339-8e84-47aaf7aff2fd",
"connexPayTransaction": {
"guid": "9eb92a4c-2cd2-4ffa-9959-498aae8a7279",
"expectedPayments": 5,
"incomingTransCode": "B549C92637301662802350529"
},
"processorStatusCode": "A0000",
"processorResponseMessage": "Success",
"wasProcessed": true,
"authCode": "VTLMC1",
"refNumber": "23181066",
"customerReceipt": "Agent Booking 123\\n8320 S HARDY DRIVE\\nTEMPE AZ 85284\\n07/12/2020 02:57:57\\n\\nCREDIT - SALE\\n\\nCARD # : **** **** **** 4111\\nCARD TYPE :MASTERCARD\\nEntry Mode : MANUAL\\n\\nTRANSACTION ID : 23181066\\nInvoice number : 159874\\nAUTH CODE : VTLMC1\\nSubtotal: $10.00\\n--------------------------------------\\nTotal: $10.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",
"statementDescription": "Agent Booking 123",
"generatedBy": "rrmerchant",
"card": {
"first6": "541333",
"first4": "5413",
"last4": "4111",
"cardHolderName": "John Doe",
"cardType": "Mastercard",
"expirationDate": "2019-12",
"customer": {
"guid": "20fbe746-21c5-4325-b307-c46765061efe",
"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"
},
"guid": "fb0377b7-d6d2-4e61-b30a-f590f39b2ea8"
},
"addressVerificationCode": "N",
"addressVerificationResult": "No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address.",
"cvvVerificationCode": "M",
"cvvVerificationResult": "CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant."
}
}
Call this endpoint to Capture an Authorization so that it settles. An Auth expires in the system after 5 days so this endpoint must be called within 5 days of the original Auth or an error will be returned and the Auth will not settle. In this event a new Auth and Capture (or a Sale) will be required in order to collect funds from the Consumer. The amount of the Capture will always equal the amount of the original Authorization.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/Captures
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device's Guid provided by ConnexPay. |
AuthOnlyGuid | string | Mandatory | Guid received from the AuthOnly operation. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
ConnexPayTransaction | object | Mandatory | ConnexPay Transaction. |
ConnexPayTransaction | |||
ExpectedPayments | integer | Mandatory | This is the number of outbound payments that will be made to suppliers. If paying a single supplier the value is 1, if paying two suppliers the value is 2, etc. This number is critical to the release of Daily Markup/Funding. |
Group Sale
Create Group Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class GroupSale
{
public static void CreateGroupSale()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales/group");
request.ContentType = "text/json";
request.Method = "POST";
var groupSale = new
{
DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
GroupId = "Test-Sale-Group-1",
ExpectedNumberOfCards = 3,
GroupName = "Test Sale Group"
};
string json = JsonConvert.SerializeObject(groupSale);
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": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"GroupId": "Test-Sale-Group-1",
"ExpectedNumberOfCards": 3,
"GroupName": "Test Sale Group"
}
Json Example Response:
{
"deviceGuid": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"guid": "727374dd-f4dc-43ab-b49f-bc5deb1c4bcd",
"groupId": "Test-Sale-Group-1",
"status": "Open",
"balance": 0.00,
"groupName": "Test Sale Group",
"incomingTransactionCode": "03MRDILHU3LV0EOQQ00000GRP"
}
This endpoint creates a Sale Group. This is the first step to create group sales. To add any Sale to this newly created group, the response GroupGuid needs to be used with the Sale request.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/sales/group
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device's Guid provided by ConnexPay. |
GroupId | string | Mandatory | Group ID. |
ExpectedNumberOfCards | integer | Mandatory | Number of expected cards. |
GroupName | string | Optional | Group name. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
DeviceGuid | string | Device's Guid provided by ConnexPay. |
Guid | string | Groups Guid |
GroupId | string | Group ID |
Balance | decimal | Group balance |
GroupName | string | Group name |
Status | string | Group status |
IdStatus | string | Group status ID |
IncomingTransactionCode | string | Application level setting to associate a virtual card request with an original group sale. The value is provided in the group create/update response. |
Update Group Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class GroupSale
{
public static void UpdateGroupSale(Guid groupGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://sandboxsalesapi.connexpay.com/api/v1/sales/group/{groupGuid}");
request.ContentType = "text/json";
request.Method = "PUT";
var groupSaleUpdateDto = new
{
DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
Status = 1301,
GroupName = "Test Sale Group"
};
string json = JsonConvert.SerializeObject(groupSaleUpdateDto);
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": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"Status": 1301,
"GroupName": "Test Sale Group"
}
Json Example Response:
{
"deviceGuid": "f758a448-7780-4b50-93a1-28329e37f94f",
"guid": "48b9520c-803e-467e-bb95-38925d6f4766",
"groupId": "saiful-group-1",
"status": "Closed",
"idStatus": 1301,
"balance": 200.00,
"groupName": "Test Sale Group",
"incomingTransactionCode": "03MRDILHU3LV0EOQQ00000GRP"
}
This endpoint allows to update an existing sale group by setting the group status as Closed or changing the GroupName.
HTTP Request
PUT https://sandboxsalesapi.connexpay.com/api/v1/sales/group/{GroupGuid}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
GroupGuid | string | Required | Sale Group Guid. |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
DeviceGuid | string | Mandatory | Device Guid provided by ConnexPay. |
Status | integer | Optional | Group status to update to. Only closing a sale group is allowed now, e.g. 1301 or "GroupClosed". |
GroupName | string | Optional | GroupName to update to. Allowed only alphanumeric characters between 1-100. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
DeviceGuid | string | Mandatory |
Guid | string | Sale Group Guid |
GroupId | string | Group Id |
Balance | decimal | Group sale balance |
GroupName | string | Name of Group sale |
Status | string | Group status |
IdStatus | string | Group status ID |
IncomingTransactionCode | string | Application level setting to associate a virtual card request with an original group sale. The value is provided in the group create/update response. |
Get Group Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;
namespace ConnexPaySample
{
public class SaleGroup
{
public static SaleGroup GetGroup()
{
try
{
var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/sales/group/9c018683-05f9-47d3-b4c1-4d1ccae4a91e");
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:
{
"deviceGuid": "f758a448-7780-4b50-93a1-28329e37f94f",
"guid": "9c018683-05f9-47d3-b4c1-4d1ccae4a91e",
"groupId": "saiful-group-8",
"expectedNumberOfCards": 1,
"status": "Closed",
"idStatus": 1301,
"balance": 100.00,
"groupName": "SG-8",
"incomingTransactionCode": "01QR5AZA7D454PQCD00000GRP"
}
This endpoint gets a sale group.
HTTP Request
GET https://sandboxsalesapi.connexpay.com/api/v1/sales/group/{guid}
Headers
Key | Value |
---|---|
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Description |
---|---|
guid | Group’s guid to get. |
Response
- 200 code (ok).
Cancel
Cancel a Sale
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;
namespace ConnexPaySample
{
public class Cancel
{
public static cancel CreateCancel()
{
try
{
var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/cancel");
request.ContentType = "text/json";
request.Method = "POST";
var cancel1 = new
{
DeviceGuid = "4b5013f7-b275-4929-8e83-0167c6edf639",
SaleGuid = "c5ac2017-99cb-4b1f-a90e-142cc82b21e5",
SequenceNumber = "Sample-seq-1",
VoidReason = "POST_AUTH_USER_DECLINE"
};
string json = JsonConvert.SerializeObject(cancel1);
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",
"SequenceNumber": "Sample-seq-1",
"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": "CONNEXPAY\\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\\nCancel 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",
"sequenceNumber": "Sample-seq-1",
"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",
"customerReceipt": "CONNEXPAY\\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",
"generatedBy": "ultralux",
"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",
}
}
"addressVerificationCode": "N",
"addressVerificationResult": "No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address."
"cvvVerificationCode": "M",
"cvvVerificationResult": "CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant."
}
}
The Cancel route should be used in the event the entire trip/booking (sale & purchase) require cancellation. In this case, the traveler/cardholder would be due a refund from the sale and the Virtual Card would be terminated to prevent the travel supplier from authorizing the Virtual Card.
Calling the Cancel Route:
- Will Void the transaction if the Sale is in an open batch
- Will Return the transaction if the Sale is in a closed batch
- Can only be called when wanting to Void or Return the full Sale amount
- Can be used for Credit or Cash payments
- Will void the ITC and terminate the VC (preventing any new authorizations on the VC)
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/cancel
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 provided by ConnexPay. |
SaleGuid | string | Mandatory | Sale transaction Guid. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
VoidReason | string | Optional | Indicates the reason the transaction was voided. |
Response
- 201 code (created).
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",
Amount = 20.5,
SequenceNumber = "Sample-seq-1",
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",
"Amount": 20.5,
"SequenceNumber": "Sample-seq-1",
"VoidReason": "DEVICE_TIMEOUT"
}
Json Example Response:
{
"guid": "7a4ef786-8288-404d-9340-e837d06784af",
"amount": 20.50,
"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",
"sequenceNumber": "Sample-seq-1",
"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 provided by ConnexPay. |
SaleGuid | string | Conditional Mandatory when SaleReferenceNumber and ReturnGuid parameters are not present | Sale’s Guid. |
ReturnGuid | string | Conditional Mandatory when SaleGuid and SaleReferenceNumber parameters are not present | Return’s Guid. |
SaleReferenceNumber | integer | Conditional Mandatory when SaleGuid and ReturnGuid parameters are not present | SaleReferenceNumber. |
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 |
Amount | decimal | Optional | Amount to be voided. Note: Amount is be used once only for credit card Sales and should not exceed corresponding Sale’s Amount. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
Note: Only one of the parameters from SaleGuid, SaleReferenceNumber and ReturnGuid is allowed in the request.
Response
- 201 code (created).
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",
"amount": 20.50,
"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",
"sequenceNumber": "Sample-seq-1",
"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
- 200 code (ok).
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",
"amount": 20.50,
"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 CUSTOMERS AGREEMENT WITH THE</span><span class="se">\\</span><span class="s2">nISSUER</span><span class="se">\\</span><span class="s2">nAPPROVED</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nCustomer Copy</span><span class="se">\\</span><span class="s2">n"</span><span class="p">,</span><span class="w">
</span><span class="s2">"sale"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"guid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bfff1a26-4207-4871-9597-48282e3fcfea"</span><span class="p">,</span><span class="w">
</span><span class="s2">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Transaction - Approved"</span><span class="p">,</span><span class="w">
</span><span class="s2">"batchStatus"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Batch - Open"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timeStamp"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2017-07-11T11:05:24.65"</span><span class="p">,</span><span class="w">
</span><span class="s2">"deviceGuid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8f65764d-72c1-4dee-ac9f-4cd4c98e8c35"</span><span class="p">,</span><span class="w">
</span><span class="s2">"amount"</span><span class="p">:</span><span class="w"> </span><span class="mf">19.74</span><span class="p">,</span><span class="w">
</span><span class="s2">"effectiveAmount"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="s2">"orderNumber"</span><span class="p">:</span><span class="w"> </span><span class="s2">"11518"</span><span class="p">,</span><span class="w">
</span><span class="s2">"orderDate"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2017-02-03T00:00:00"</span><span class="p">,</span><span class="w">
</span><span class="s2">"batchGuid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1564cb1b-eddb-4747-9565-61a7d7d225f9"</span><span class="p">,</span><span class="w">
</span><span class="s2">"processorStatusCode"</span><span class="p">:</span><span class="w"> </span><span class="s2">"A0000"</span><span class="p">,</span><span class="w">
</span><span class="s2">"processorResponseMessage"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Success"</span><span class="p">,</span><span class="w">
</span><span class="s2">"wasProcessed"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="s2">"authCode"</span><span class="p">:</span><span class="w"> </span><span class="s2">"VTLMC1"</span><span class="p">,</span><span class="w">
</span><span class="s2">"refNumber"</span><span class="p">:</span><span class="w"> </span><span class="s2">"13283644"</span><span class="p">,</span><span class="w">
</span><span class="s2">"invoiceNumber"</span><span class="p">:</span><span class="w"> </span><span class="s2">"11518"</span><span class="p">,</span><span class="w">
</span><span class="s2">"customerReceipt"</span><span class="p">:</span><span class="w"> </span><span class="s2">"SUR TECHNOLOGY HOLDINGS</span><span class="se">\\</span><span class="s2">n8320 S HARDY DRIVE</span><span class="se">\\</span><span class="s2">nTEMPE AZ 85284</span><span class="se">\\</span><span class="s2">n07/11/2017 07:05:27</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nCREDIT - SALE</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nCARD # : **** **** **** 0213</span><span class="se">\\</span><span class="s2">nCARD TYPE :MASTERCARD</span><span class="se">\\</span><span class="s2">nEntry Mode : MANUAL</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nREF # : 13283644</span><span class="se">\\</span><span class="s2">nInvoice number : 11518</span><span class="se">\\</span><span class="s2">nAUTH CODE : VTLMC1</span><span class="se">\\</span><span class="s2">nSubtotal: $19.74</span><span class="se">\\</span><span class="s2">n--------------------------------------</span><span class="se">\\</span><span class="s2">nTotal: $19.74</span><span class="se">\\</span><span class="s2">n--------------------------------------</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nJohn Doe</span><span class="se">\\</span><span class="s2">n</span><span class="se">\\</span><span class="s2">nCUSTOMER ACKNOWLEDGES RECEIPT OF</span><span class="se">\\</span><span class="s2">nGOODS AND/OR SERVICES IN THE AMOUNT</span><span class="se">\\</span><span class="s2">nOF THE TOTAL SHOWN HEREON AND AGREES</span><span class="se">\\</span><span class="s2">nTO PERFORM THE OBLIGATIONS SET FORTH</span><span class="se">\\</span><span class="s2">nBY THE CUSTOMER
S AGREEMENT WITH THE\nISSUER\nAPPROVED\n\n\n\n\nCustomer Copy\n",
"customData": "order details",
"sequenceNumber": "Sample-seq-1",
"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
- 200 code (ok).
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",
SequenceNumber = "Sample-seq-1",
Amount = "19.74",
ReturnRetryCard = new
{
CardNumber = "4716317307520473",
CardHolderName = "John Doe",
Cvv2 = "999",
ExpirationDate = "2312"
}
};
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",
"SequenceNumber": "Sample-seq-1",
"Amount": 19.74,
"ReturnRetryCard":
{
"CardNumber" : "4716317307520473",
"CardHolderName" : "John Doe",
"Cvv2" : "999",
"ExpirationDate" : "2312"
}
}
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",
"sequenceNumber": "Sample-seq-1",
"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 |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
ReturnRetryCard | object | Optional | Card data to be used in the event a sale return to the original card is declined and a retry to a new card should be attempted. This attempt needs to be made within 7 days of the failed return authorization |
Note: Send either SaleGuid or SaleReferenceNumber field in a request.
ReturnRetryCard
Parameter | Type | M/C/O | Value |
---|---|---|---|
CardNumber | string | Mandatory | Card number. Must be 16 characters. |
CardHolderName | string | Optional | Cardholder's name. |
Cvv2 | integer | Optional | The three or four digit CVV code at the back side of the credit and debit card. |
ExpirationDate | date | Optional | Card's expiry date in the YYMM format. |
Response
- 201 code (created).
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",
"sequenceNumber": "Sample-seq-1",
"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
- 200 code (ok).
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",
"sequenceNumber": "Sample-seq-1",
"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
- 200 code (ok).
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"
}
},
"addressVerificationCode": "N",
"cvvVerificationCode": "M",
"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. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
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. |
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
- 201 code (created).
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"
}
},
"addressVerificationCode": "N",
"cvvVerificationCode": "M",
"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
- 200 code (ok).
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"
}
},
"addressVerificationCode": "N",
"cvvVerificationCode": "M",
"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
- 200 code (ok).
Search
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",
Status = "Transaction - Approved"
};
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",
"status": "Transaction - Approved"
}
Json Example Response:
{
"pageCurrent": 1,
"pageCurrentResults": 1,
"pageTotal": 1,
"pageSize": 1,
"totalResults": 1,
"cardSummary": null,
"searchResultDTO": [
{
"status": "Transaction - Approved",
"amount": 1,
"card": {
"cardHolderName": null,
"cardType": "Visa",
"last4": "0473"
},
"orderNumber": null,
"orderDate": null,
"timeStamp": "2018-11-23T14:57:43.78-03:00",
"customerID": null,
"processorResponseMessage": null,
"effectiveAmount": 0,
"batchStatus": "Batch - Open",
"relatedVoid": null,
"relatedReturns": null,
"guid": "d38a9133-6643-4a0a-9675-3cd820a8b5ff",
"deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
"captureGuid": null,
"customData": null,
"generatedByCapture": false,
"partiallyApprovedAmount": null,
"type": "Credit",
"surcharge": null,
"surchargeType": null,
"serviceFee": null,
"tipAmount": null,
"cardDataSource": "INTERNET",
"allowCardEmv": true,
"incomingTransactionCode": "09ZZZTAS37411231800000100"
}
]
}
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 | Merchant Customer Id. |
Response
- 200 code (ok).
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",
Status = "Transaction - Approved"
};
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",
"status": "Transaction - Approved"
}
Json Example Response:
{
"pageCurrent": 1,
"pageCurrentResults": 1,
"pageTotal": 1,
"pageSize": 1,
"totalResults": 1,
"cardSummary": null,
"searchResultDTO": [
{
"status": "Transaction - Approved",
"sale": {
"amount": 10,
"card": {
"cardHolderName": null,
"cardType": "Visa",
"last4": "0445"
}
},
"authOnly": null,
"debitSale": null,
"debitReturn": null,
"ebtFoodStampPurchase": null,
"ebtElectronicVoucher": null,
"ebtReturn": null,
"ebtCashBenefitPurchase": null,
"return": null,
"voidReason": null,
"timeStamp": "2018-11-22T16:57:41.74",
"processorStatusCode": "A0000",
"batchStatus": "Batch - Closed",
"guid": "211c7e9e-f0ce-45e1-be79-ff0333c81478",
"allowCardEmv": true
}
]
}
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
- 200 code (ok).
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",
Status = "Transaction - Approved"
};
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",
"status": "Transaction - Approved"
}
Json Example Response:
{
"pageCurrent": 1,
"pageCurrentResults": 1,
"pageTotal": 1,
"pageSize": 1,
"totalResults": 1,
"cardSummary": null,
"searchResultDTO": [
{
"status": "Transaction - Approved",
"amount": 150,
"card": {
"cardHolderName": null,
"cardType": "Visa",
"last4": "0267"
},
"timeStamp": "2018-11-14T09:26:58.42",
"processorStatusCode": "A0000",
"batchStatus": "Batch - Closed",
"guid": "451dd720-18e6-48b2-a8fa-b9ae4579c3fc",
"relatedVoid": null,
"deviceGuid": "8ec1c40b-0c00-4a57-a9c7-7800bd52c308",
"type": "CreditReturn",
"cardDataSource": "",
"allowCardEmv": true
}
]
}
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 |
CardHolderName | string | Optional | Cardholder’s name. Providing information in this field allows a user of the ConnexPay portal to search for a transaction using the cardholder name. |
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
- 200 code (ok).
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",
Status = "Transaction - Approved"
};
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",
"status": "Transaction - Approved"
}
Json Example Response:
{
"pageCurrent": 1,
"pageCurrentResults": 1,
"pageTotal": 1,
"pageSize": 1,
"totalResults": 1,
"cardSummary": null,
"searchResultDTO": [
{
"status": "Transaction - Approved",
"card": {
"cardHolderName": null,
"cardType": "Mastercard",
"last4": "0759"
},
"timeStamp": "2018-11-09T15:34:49.91",
"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
- 200 code (ok).
Hosted Payments Page (HPP)
HPP Token Request
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class HostedPaymentPage
{
public static void InitializeHostedPaymentPage()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests");
request.Method = "POST";
var hpp = new
{
MerchantName = "ACME",
Description = "Hundred Dollar Trip",
ResultRedirectUrl = "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
LogoUrl = "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png",
Sale = new
{
DeviceGuid = "fde63679-0c47-4a9c-9b47-82cdf1929851",
Amount = "100",
RiskProcessingOnly = false,
OrderNumber = "159874",
ConnexPayTransaction = new
{
ExpectedPayments = 1
},
RiskData = new
{
Name = "APITest User-Timmons",
Gender = "M",
DateOfBirth = "1971-10-12",
Email = "johnd@gmail.com",
ProductType = "Flight",
ProductDesc = "Flight from London to New York",
ProductItem = "784GTWJFK856",
ProductQuantity = 1,
ProductPrice = 10000,
OrderNumber = "159874",
SellerId = "TestSeller",
}
}
}
string json = JsonConvert.SerializeObject(hpp);
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:
{
"MerchantName": "ACME",
"Description": "Hundred Dollar Trip",
"ResultRedirectUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"LogoUrl": "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png",
"Sale": {
"DeviceGuid": "{{Device}}",
"Amount": 100.0,
"RiskProcessingOnly": false,
"OrderNumber": "{{OrderNumber}}",
"ConnexPayTransaction": {
"ExpectedPayments": 1
},
"RiskData": {
"Name": "APITest User-Timmons",
"Gender": "M",
"DateOfBirth": "1971-10-12",
"Email": "{{sourceEmail}}",
"ProductType": "Flight",
"ProductDesc": "Flight from London to New York",
"ProductItem": "784GTWJFK856",
"ProductQuantity": 1,
"ProductPrice": {{SalesAmountTimes100}},
"OrderNumber": "{{OrderNumber}}",
"SellerID": "TestSeller"
}
}
}
Json Example Response:
{
"merchantName": "ACME",
"description": "Hundred Dollar Trip",
"amount": 100.00,
"resultRedirectUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"tempToken": "8263d54a-b61b-4601-a4a8-f7231565b87e",
"expiration": "2020-11-20T14:35:59.14",
"logoUrl": "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png"
}
You can integrate with our Hosted Payments Page where we will collect your consumer’s credit card data securely via a form that allows them to key in payment information
This endpoint initiates a hosted payment request and returns a temp token.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantName | string | Mandatory | Merchant Name. ConnexPay displays this on the Hosted Payment Page. The max length is 100 characters. |
Description | string | optional | Additional information ConnexPay can display in the Hosted Payment Page. The max length is 2048 characters. |
ResultRedirectUrl | string | optional | This is a ConnexPay CLIENT server route ConnexPay uses to (re)direct the consumer payment result back to our client upon payment success, failure or cancel. If this data is not set, then it will use the default one from ConnexPay. |
LogoUrl | string | optional | ConnexPay can display this instead of “MerchantName” in the payment dialog. |
Sale | object | Mandatory | Standard Sale Object, same as the object you will construct for the Create Sale API call (see Sale > Create Sale section). But DO NOT include the “card” object within the sale object because ConnexPay will acquiring this directly from consumer. |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
MerchantName | string | Merchant Name received. |
Description | string | Description received. Not present if didn't receive in the call. |
Amount | decimal | Sale's amount received. |
ResultRedirectUrl | string | ResultRedirectUrl received. |
TempToken | string | Temp token generated by ConnexPay. This temp token is required for requesting the Hosted Payment Page/Form API call. Also, client can associate pending sale with this token for later reference. |
Expiration | date | Temp token expiration date. |
LogoUrl | string | LogoUrl received. Not present if didn't receive in the call. |
HPP Page Request
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;
namespace ConnexPaySample
{
public class HostedPaymentPage
{
public static void GetHostedPaymentPage()
{
try
{
var request = (HttpWebRequest)WebRequest.Create("https://sandboxsales.connexpay.com/#!/HostedPaymentPage/8263d54a-b61b-4601-a4a8-f7231565b87e");
request.Method = "GET";
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:
n/a
Json Example Response:
n/a
This endpoint will load the Hosted Payment Page for consumer to key in the payment info.
HTTP Request
GET https://sandboxsales.connexpay.com/#!/HostedPaymentPage/{tempToken}
URL Parameter
Parameter | Description |
---|---|
tempToken | Temp token get from the Hosted Payment Token Request API. |
Response
- 200 code (OK)
- text/html
HPP Payment Preview
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
using System.Text;
namespace ConnexPaySample
{
public class HostedPaymentPage
{
public static void PreviewHostedPaymentPage()
{
try
{
var request = (HttpWebRequest)WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/GetPreview/8263d54a-b61b-4601-a4a8-f7231565b87e");
request.Method = "GET";
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:
n/a
Json Example Response:
{
"merchantName": "ACME",
"description": "Hundred Dollar Trip",
"amount": 100.00,
"resultRedirectUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"tempToken": "8263d54a-b61b-4601-a4a8-f7231565b87e",
"displayCreditCard": true,
"displayAch": false,
"expiration": "2020-11-20T14:35:59.14",
"logoUrl": "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png",
"merchantGuid": "1818a55e-8541-4bfe-a288-bad870afbe1d",
"used": false
}
This endpoint returns the data points that is used for the Hosted Payment Page. You don't need to call this if you call the Hosted Payment Page Request directly.
HTTP Request
GET https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/GetPreview/{tempToken}
URL Parameter
Parameter | Description |
---|---|
tempToken | Temp token get from the Hosted Payment Token Request API. |
Response
- 200 code (OK)
HPP Make Payment Request
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class HostedPaymentPage
{
public static void ConfirmTransaction()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/ConfirmTransaction");
request.Method = "POST";
var transaction = new
{
TempToken = "8263d54a-b61b-4601-a4a8-f7231565b87e",
Sale = new
{
Card = new
{
CardNumber = "1234567812345678",
CardHolderName = "Test-User",
ExpirationDate = "2201",
Customer = new
{
Email = "test@connexpay.com",
}
}
}
}
string json = JsonConvert.SerializeObject(transaction);
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:
{
"tempToken": "8263d54a-b61b-4601-a4a8-f7231565b87e",
"sale": {
"card": {
"cardNumber": "1234567812345678",
"cardHolderName": "Test-User",
"expirationDate": "2201",
"customer": {
"email": "test@connexpay.com"
}
}
}
}
Json Example Response:
{
"merchantName": "ACME",
"description": "Hundred Dollar Trip",
"amount": 100.00,
"otherUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"resultRedirectUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"cancelUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"tempToken": "8263d54a-b61b-4601-a4a8-f7231565b87e",
"displayCreditCard": true,
"displayAch": false,
"expiration": "2020-11-21T17:08:07.32",
"logoUrl": "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png",
"merchantGuid": "1818a55e-8541-4bfe-a288-bad870afbe1d",
"used": true,
"sale": {
"guid": "33b9f4c8-1b48-49bf-a5c2-f5fdd560dd99",
"status": "Transaction - Approved",
"type": "Default",
"batchStatus": "Batch - Open",
"timeStamp": "2020-11-20T11:23:05.37-06:00",
"deviceGuid": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"amount": 100.00,
"activated": true,
"tenderType": "Credit",
"effectiveAmount": 0.00,
"riskResponse": {
"transactionId": "1111111",
"response": "Approved",
"reason": "",
"score": "34",
"omniscore": "63.7"
},
"orderNumber": "11111111111",
"cardDataSource": "INTERNET",
"batchGuid": "9f723a3f-1851-41e1-912a-747cc5a1e689",
"connexPayTransaction": {
"guid": "9b65a501-13d9-4a72-9081-df515a5b8b96",
"expectedPayments": 1,
"incomingTransCode": "22222222222222222222"
},
"riskProcessingOnly": false,
"processorStatusCode": "A0000",
"processorResponseMessage": "Success",
"wasProcessed": true,
"authCode": "VTLMC1",
"refNumber": "24782402",
"customerReceipt": "CONNEXPAY\n8320 S HARDY DRIVE\nTEMPE AZ 85284\n11/20/2020 16:22:55\n\nCREDIT - SALE\n\nCARD # : **** **** **** 0057\nCARD TYPE :MASTERCARD\nEntry Mode : MANUAL\n\nTRANSACTION ID : 24782402\nInvoice number : Dan-20201119M52433\nAUTH CODE : VTLMC1\nSubtotal: $00.00\n--------------------------------------\nTotal: $00.00\n--------------------------------------\n\n\n\nTest-User\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": "TestUser",
"card": {
"first6": "111111",
"first4": "1111",
"last4": "1111",
"cardHolderName": "Test-User",
"cardType": "Mastercard",
"expirationDate": "2022-01",
"guid": "a15a2dc4-fcc8-4215-a8db-8e21ecc2749a",
"customer": {
"guid": "60989394-6b52-43bd-b13d-32b13c91df0b",
"email": "test@connexpay.com"
}
},
"addressVerificationCode": "0",
"addressVerificationResult": "Unavailable",
"cvvVerificationResult": "Unavailable"
}
}
This endpoint will make a payment on the supplied payment card.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/ConfirmTransaction
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
TempToken | string | Mandatory | Temp token get from the Hosted Payment Token Request API. |
Sale | object | Mandatory | Standard Sale Object definied in the Sale > Create Sale API section. Only need to supply Card info, and 'Card.Customer.Email' if needed. |
Response
- 200 code (created).
HPP Review Transaction
using System;
using Newtonsoft.Json;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class HostedPaymentPage
{
public static void ConfirmTransaction()
{
try
{
var request = (HttpWebRequest) WebRequest.Create("https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/GetTransaction/{tempToken}/{saleGUID}");
request.Method = "GET";
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:
n/a
Json Example Response:
{
"merchantName": "ACME",
"description": "Hundred Dollar Trip",
"amount": 100.00,
"otherUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"resultRedirectUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"cancelUrl": "https://sandboxsales.connexpay.com/#!/HostedPaymentResult",
"tempToken": "8263d54a-b61b-4601-a4a8-f7231565b87e",
"displayCreditCard": true,
"displayAch": false,
"expiration": "2020-11-24T10:07:53.93",
"logoUrl": "https://connexpay.com/wp-content/uploads/2018/10/newlogo.png",
"merchantGuid": "1818a55e-8541-4bfe-a288-bad870afbe1d",
"used": true,
"sale": {
"guid": "8dcdd5b0-9bd0-47a4-8675-b2cd57e5b6d5",
"status": "Transaction - Approved",
"type": "Default",
"batchStatus": "Batch - Open",
"timeStamp": "2020-11-23T04:09:11.33-06:00",
"deviceGuid": "0b7a9536-9fcd-4074-a841-d47eef77b81b",
"amount": 100.00,
"activated": true,
"tenderType": "Credit",
"effectiveAmount": 0.00,
"orderNumber": "Dan-20201119M52433",
"cardDataSource": "INTERNET",
"batchGuid": "9f723a3f-1851-41e1-912a-747cc5a1e689",
"riskProcessingOnly": false,
"processorStatusCode": "A0000",
"processorResponseMessage": "Success",
"wasProcessed": true,
"authCode": "VTLMC1",
"refNumber": "24794962",
"customerReceipt": "CONNEXPAY\n8320 S HARDY DRIVE\nTEMPE AZ 85284\n11/23/2020 09:08:53\n\nCREDIT - SALE\n\nCARD # : **** **** **** 0057\nCARD TYPE :MASTERCARD\nEntry Mode : MANUAL\n\nTRANSACTION ID : 24794962\nInvoice number : Dan-20201119M52433\nAUTH CODE : VTLMC1\nSubtotal: $00.00\n--------------------------------------\nTotal: $00.00\n--------------------------------------\n\n\n\nTest-User\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": "TestUser",
"card": {
"first6": "549974",
"first4": "5499",
"last4": "0057",
"cardHolderName": "Test-User",
"cardType": "Mastercard",
"expirationDate": "2022-01",
"guid": "ce0aac4c-0025-4139-a2d5-da27f32f3be6",
"customer": {
"guid": "608d74fb-6754-4e21-9a58-2c97a6971943",
"email": "test@connexpay.com"
}
},
"addressVerificationCode": "0",
"addressVerificationResult": "Unavailable",
"cvvVerificationResult": "Unavailable",
"incomingTransactionCode": "8982600637417444732449185"
}
}
This endpoint returns the receipt/overview of the transaction after the payment.
HTTP Request
GET https://sandboxsalesapi.connexpay.com/api/v1/HostedPaymentPageRequests/GetTransaction/{tempToken}/{saleGUID}
URL Parameter
Parameter | Description |
---|---|
tempToken | Temp token get from the Hosted Payment Token Request API. |
saleGUID | Unique Identifier of the Sale that was generated by the Hosted Payment Make Payment Request. |
Response
- 200 code (created).
Cash Balance Inquiry
Get Cash Balance
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class CashBalanceInquiry
{
private const string ServerUrl = "salesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Get(Guid merchantGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/Merchants/CashBalance/{merchantGuid}");
request.Method = "GET";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.Accept = "application/json";
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Response:
{
"availableCashBalance": 100.50,
"asOfDate": "2020-02-11T11:03:10.2630464+06:00"
}
This API allows you to know available cash balance.
HTTP Request
GET https://sandboxsalesapi.connexpay.com/api/v1/Merchants/CashBalance/{merchantGuid}
Headers
Key | Value |
---|---|
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantGuid | string | Required | Merchant's Guid. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
AvailableCashBalance | decimal | Merchant's available cash balance. |
AsOfDate | date | Balance Inquiry Date |
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. | |
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 |
AVS Response Codes
Code | Description |
---|---|
A | The street addresses match but the postal/ZIP codes do not, or the request does not include the postal/ZIP code. |
B | Street addresses match, but postal/ZIP code not verified due to incompatible formats. (Acquirer sent both street address and postal/ZIP code.) |
C | Street address and postal/ZIP code not verified due to incompatible formats. (Acquirer sent both street address and postal/ZIP code.) |
D | Street addresses and postal/ZIP codes match. |
F | Street addresses and postal codes match. Applies to U.K.-domestic transactions only. |
G | Address not verified for international transaction. Issuer is not an Address Verification Service (AVS) participant, or AVS data was present in the request but issuer did not return an AVS result, or V.I.P. performed address verification on behalf of the issuer and there was no address record on file for this account. |
I | Address information not verified. |
M | Street addresses and postal/ZIP codes match. |
N | No match. Acquirer sent postal/ZIP code only, or street address only, or both postal/ZIP and street address. |
P | Postal/ZIP codes match. Acquirer sent both postal/ZIP code and street address, but street address not verified due to incompatible formats. |
R | Retry: System unavailable or timed out. Issuer ordinarily performs address verification but was unavailable. |
S | Not applicable. If present, V.I.P. replaces it with U or with G. |
U | Address not verified for domestic transaction. Address not verified for international transaction. Issuer is not an AVS participant, or AVS data was present in the request but issuer did not return an AVS result, or V.I.P. performed address verification on behalf of the issuer and there was no address record on file for this account. |
W | Not applicable. If present, V.I.P. replaces it with Z. Available for U.S. issuers only. |
X | Not applicable. If present, V.I.P. replaces it with Y. Available for U.S. issuers only. |
Y | Street address and postal/ZIP match. |
Z | Postal/ZIP match, street addresses do not match or street address not included in request. |
CVV Response Codes
Code | Description |
---|---|
M | CVV2 Match. Indicates that the Funds Transfer API or the issuer was able to verify the CVV2 value provided by the merchant. |
N | CVV2 No Match. Indicates that the Funds Transfer API or the issuer was not able to verify the CVV2 value provided by the merchant. |
P | Not processed. Indicates that the Funds Transfer API or the issuer was unable to verify the CVV2 value provided by the merchant because either their verification system was not functioning, or not all of the information needed to verify the CVV2 value (such as the expiration date) was included in the request. |
S | CVV2 should be on the card. Indicates that the Funds Transfer API or the issuer was unable to perform CVV2 verification, and notifies the merchant that the card should contain a CVV2 value. |
U | Issuer does not participate in CVV2 service, or participates but has not provided Visa with encryption keys, or both. Indicates that the issuer is not participating in the CVV2 service, or has not provided Visa with encryption keys needed to perform verification, or that STIP has responded to an issuer-unavailable response. |
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 System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class IssueCard
{
private const string ServerUrl = "purchasesapi.connexpaydev.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Create(Guid merchantGuid, string itc)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/IssueCard");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
MerchantGuid = $"{merchantGuid}",
Payee = "Delta",
FirstName = "Adam",
LastName = "Smith",
Phone = "7411237489",
Address1 = "345 Main Road",
Address2 = "",
City = "Miami Beach",
State = "MI",
Zipcode = "33109",
Country = "Mexico",
UsageLimit = 1,
AmountLimit = 180,
ExpirationDate = "2019-12-30",
TerminateDate = "2020-09-19",
PurchaseType = "01",
PurchaseType = "01",
IncomingTransactionCode = $"{itc}",
SequenceNumber = "Sample-seq-1",
NonDomesticSupplier = true,
Transmission = new {
TransmissionMethods = ["Email","Fax"],
EmailRecipient = "emailTo@gmail.com",
MerchantPhoneNumber = "7411237489",
EmailFrom = "emailFrom@gmail.com",
RecipientName = "Smith",
Subject = "Card Information",
Message = "here is your card information...",
DaysToExpire = 1,
FaxRecipient = "+55555555555",
FaxFrom = "Merchant Alias"
}
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"MerchantGuid": "2b586234-7f14-432e-b0f4-a2935f783f38",
"Payee": "Delta",
"FirstName": "Adam",
"LastName": "Smith",
"Phone": "7411237489",
"Address1": "345 Main Road",
"Address2": "",
"City": "Miami Beach",
"State": "MI",
"Zipcode": "33109",
"Country": "Mexico",
"UsageLimit": 1,
"AmountLimit": 180,
"ExpirationDate": "2019-12-30",
"TerminateDate": "2020-09-19",
"PurchaseType": "01",
"SequenceNumber": "Sample-seq-1",
"IncomingTransactionCode": "035U9MGQ5KF3XQAZQ00050000",
"NonDomesticSupplier": true,
"Transmission":{
"TransmissionMethods": ["Email", "Fax"],
"EmailRecipient": "emailTo@gmail.com",
"MerchantPhoneNumber" : "7411237489",
"EmailFrom": "emailFrom@gmail.com",
"RecipientName": "Smith",
"Subject": "Card Information",
"Message": "here is your card information...",
"DaysToExpire": 1,
"FaxRecipient": "+55555555555",
"FaxFrom": "Merchant Alias"
}
}
Json Example Response:
{
"cardHolder":{
"cardHolderGuid":"a2b25172-c863-4325-b3b9-7e33cff2f8d1",
"firstName":"Adam",
"lastName":"Smith",
"phone":"7411237489",
"address1":"345 Main Road",
"address2":"",
"city":"Miami Beach",
"state":"MI",
"zipcode":"33109",
"country":"Mexico"
},
"card":{
"cardGuid":"ae17f687-8ba7-4502-b627-24fdf5e6f218",
"accountNumber":"1111118971563394",
"securityCode":"617",
"amountLimit":180.0,
"usageLimit":1,
"expirationDate":"2019-1230T18:59:59",
"expiration":"1219",
"terminateDate": "2021-09-19T23:59:59",
"currencyCode":"USD",
"firstSix":"111111",
"lastFour":"3394",
"nameLine1":"Adam",
"nameLine2":"Smith",
"status":"Card - Active",
"sequenceNumber": "Sample-seq-1"
},
"cardBrand":"MasterCard",
"cardClass":"Commercial"
}
This endpoint creates a virtual card.
HTTP Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/IssueCard
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantGuid | string | Mandatory | Merchant's guid. Application level value that indicates a virtual card is being requested for clients account. Value provided by ConnexPay. |
FirstName | string | Mandatory | Cardholder's first name. This is the first name placed on the virtual card provided to the travel supplier. The value is also searchable in the ConnexPay portal. |
LastName | string | Mandatory | Cardholder's last name. This is the last name placed on the virtual card provided to the travel supplier. The value is also searchable in the ConnexPay portal. |
Phone | integer | Optional | Cardholder's phone number. Phone number up to 20 character string. |
Address1 | string | Optional | Cardholder's address line 1. The street number is used by the travel supplier when submitting the transaction to perform an AVS check. Alphanumeric. |
Address2 | string | Optional | Cardholder's address line 2. Alphanumeric. |
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. If a non U.S. or Canadian value is submitted the virtual card request will not be processed and an error response returned. |
Zipcode | integer | Optional | Cardholder's zipcode. The zip code is used by the travel supplier when submitting the transaction to perform an AVS check. The Zipcode must be between 1 and 10 characters long, only numbers and letters are allowed. |
Country | string | Optional | Cardholder's country. The Country must be between 2 and 40 characters long, only numbers and letters are allowed. All ISO-3166 countries (https://www.iso.org/obp/ui/) are accepted in English Short Name, Alpha-2, Alpha-3 or Numeric form, e.g. 'Mexico', 'MX', 'MEX' or '484'. |
UsageLimit | decimal | Mandatory | Security Control: Maximum number of times the card may be used - for both pre-auths and standard authorizations - for security purposes the maximum allowed value is 99. All attempts greater than 99 will be declined. For all transactions authorized by ARC, airlines typically settle for each individual ticket on a PNR that is connected to the original authorization. |
AmountLimit | decimal | Mandatory | Security Control: Maximum dollar amount the card can be authorized and settled; value must incorporate any overage i.e. currency conversion, taxes that travel supplier may associate with the transaction. If a travel supplier authorizes card for more than the amount limit the transaction will be decline. Any balance remaining on the card is returned to the ConnexPay client 8-10 days through Residual Margin after expiration and all pending transactions is cleared. |
ExpirationDate | date | Mandatory | Security Control: The last date for which a virtual card may be authorized in YYYY-MM-DD format. For airline or other prepaid transactions, ConnexPay recommends expiring the card 8-10 days after issuance - this provides enough time to pass the card to the travel supplier and their processing. For hotel transactions, ConnexPay suggests 8-10 days after check out to ensure all pending transactions are processed. This value is critical because residual margin will not be calcuated until after the defined expiration date. |
TerminateDate | date | Optional | The TerminateDate (YYYY-MM-DD format) is the date the Virtual Credit Card will be terminated by ConnexPay''s system. TerminateDate is different than the ExpirationDate in that TerminateDate just triggers Residual Margin and ExpirationDate is the month and year that will be applied to the actual VCC. The recommendation is to set the ExpirationDate one or two years in the future and setting the TerminateDate just a day or two after the VCC is expected to be processed. Note, Returns can still be processed on terminated VCCs. |
PurchaseType | string | Mandatory | Security Control: The industry where the virtual card will be utilized. For example, if value set to airline and the card is used at hotel, it will be declined. Available purchase type values are: 1. 01 for Airline. 2. 02 for Hotel. 3. 03 for Car Rental. 4. 98 for No Restriction. 5. 99 for Other. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
IncomingTransactionCode | string | Mandatory | ITC for short Application level setting to associate the virtual card request with an original sale. The value is provided in the sale response of the original sale transaction. All virtual card requests must be associated with an original sale transaction. |
SupplierCategory | string | Optional | The SupplierCategory is used to assist with Intelligent Routing functionality. The field accepts up to 100 alpha-numeric characters. If this is not supplied but supplierId below is a default category of "IATA" will be assumed to support compatibility with initial supplierId implementation that did not include a category option. Alphanumeric with a max length of 100 characters |
SupplierId | string | Optional | The SupplierId is used to assist with Intelligent Routing functionality. The field accepts up to 100 alpha-numeric characters. Alphanumeric with a max length of 100 characters |
NonDomesticSupplier | boolean | Optional | We can issue the “Global VCC” if the Supplier accepting that VCC has an overseas merchant account. This is an optional field. Indicating true will result in issuing this Global VCC. Indicating false (or not including this property in your request) will result in receiving a VCC created for domestic use. |
Transmission | |||
TransmissionMethods | string[] | Mandatory | Methods of Transmission. Supported method: Email, Fax. |
EmailRecipient | string | Mandatory when transmission is Email | The email address of the intended recipient. 255 char max. |
MerchantPhoneNumber | string | Optional | This is the phone number that should display on the virtual card and is the number that should be used if the link has expired. Up to 15 characters. Numbers and plus sign (+) allowed only. |
EmailFrom | string[] | Optional | For email transmissions, this will be the email address that populates the ‘reply to’ section of the email message. 255 char max. |
RecipientName | string | Mandatory | A descriptive name of the email or fax recipient. 255 char max |
Subject | string | Mandatory | High-level subject line description of the transmission contents. 255 char max. |
Message | string | Mandatory | The message body of the email or fax. 1024 char max. |
DaysToExpire | integer | Mandatory when transmission is Email. | The number of days after card issuance until link to VC expires. Range: 1-999 days. |
FaxRecipient | string | Mandatory when transmission is Fax. | The fax number of the intended recipient. Up to 15 characters, numbers and plus sign (+) allowed only. |
FaxFrom | string | Optional | For fax transmissions, this will be the name that populates the "From" section of the fax document. 255 char max. |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
CardHolder | object | Card Holder. |
Card | object | Card. |
CardHolder | ||
FirstName | string | Cardholder's first name. |
LastName | string | Cardholder's last name. |
Phone | integer | Cardholder's phone number. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
Address1 | string | Cardholder's address line 1. |
Address2 | string | Cardholder's address line 2. |
City | string | Cardholder's city. |
State | string | Cardholder's short name state. The ISO 3166-2 CA and US state or province code of a user. Length = 2. |
Zipcode | integer | Cardholder's zipcode. Length = 5. |
Card | ||
CardGuid | string | Global Unique Identififer for the card. |
AccountNumber | integer | Card Number |
SecurityCode | integer | CVV of the card. |
AmountLimit | decimal | Max amount the card can spend. |
UsageLimit | decimal | Number of times the card can be used. |
ExpirationDate | date | Date the AmountLimit and UsageLimit fields expire. Format: YYYY-MM-DDTHH:MM:SS Coordinated Universal Time (UTC). |
Expiration | date | Expiration Date in MMYY format. |
TerminateDate | date | Date the when the card will be terminated internally to calculate residual margin. Format: YYYY-MM-DDTHH:MM:SS Coordinated Universal Time (UTC). |
CurrencyCode | string | 3 digit currency code. |
FirstSix | integer | First six digits of the card number. |
LastFour | integer | Last four digits of the card number. |
NameLine1 | string | Card Holder Name |
NameLine2 | string | Card Holder Name Line 2 |
Status | string | Status of the card. |
SequenceNumber | string | Transaction sequence number within passed with request. |
IssueCard (delayed activation sale example)
Json Example Request: See "Issue Card"
Json Example Response:
{
"cardHolder":{
"cardHolderGuid":"a2b25172-c863-4325-b3b9-7e33cff2f8d1",
"firstName":"Adam",
"lastName":"Smith",
"phone":"7411237489",
"address1":"345 Main Road",
"address2":"",
"city":"Miami Beach",
"state":"MI",
"zipcode":"33109"
},
"card":{
"cardGuid":"ae17f687-8ba7-4502-b627-24fdf5e6f218",
"accountNumber":"1111118971563394",
"securityCode":"617",
"amountLimit":180.0,
"usageLimit":1,
"expirationDate":"2019-1230T18:59:59",
"expiration":"1219",
"currencyCode":"USD",
"firstSix":"111111",
"lastFour":"3394",
"nameLine1":"Adam",
"nameLine2":"Smith",
"status":"Card - Active, but delayed Activation Auth Limit of $1.0 applied.",
"activationDate": "9/2/2020"
},
"cardBrand":"MasterCard",
"cardClass":"Commercial"
}
Issue Card process same as IssueCard.
There will be a check on Virtual Card expiration date to confirm it is after the delayed activation date for the sale under which this card is being requested.
See the slight change in IssueCard JSON response indicating status and expected activation date.
On "activationDate" the virtual card authorization limit will increase to the amount requested on card creation.
Issue Lite
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class IssueLite
{
private const string ServerUrl = "purchasesapi.connexpaydev.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Create(Guid merchantGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/IssueCard/IssueLite");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
MerchantGuid = $"{merchantGuid}",
Payee = "Delta",
FirstName = "Adam",
LastName = "Smith",
Phone = "7411237489",
Address1 = "345 Main Road",
Address2 = "",
City = "Miami Beach",
State = "MI",
Zipcode = "33109",
Country = "Mexico",
UsageLimit = 1,
AmountLimit = 180,
ExpirationDate = "2019-12-30",
TerminateDate = "2020-09-19",
PurchaseType = "01",
PurchaseType = "01",
SequenceNumber = "Sample-seq-1",
NonDomesticSupplier = true,
Transmission = new {
TransmissionMethods = ["Email","Fax"],
EmailRecipient = "emailTo@gmail.com",
MerchantPhoneNumber = "7411237489",
EmailFrom = "emailFrom@gmail.com",
RecipientName = "Smith",
Subject = "Card Information",
Message = "here is your card information...",
DaysToExpire = 1,
FaxRecipient = "+55555555555",
FaxFrom = "Merchant Alias"
}
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"MerchantGuid": "2b586234-7f14-432e-b0f4-a2935f783f38",
"Payee": "Delta",
"FirstName": "Adam",
"LastName": "Smith",
"Phone": "7411237489",
"Address1": "345 Main Road",
"Address2": "",
"City": "Miami Beach",
"State": "MI",
"Zipcode": "33109",
"Country": "Mexico",
"UsageLimit": 1,
"AmountLimit": 180,
"ExpirationDate": "2019-12-30",
"TerminateDate": "2020-09-19",
"PurchaseType": "01",
"SequenceNumber": "Sample-seq-1",
"NonDomesticSupplier": true,
"Transmission":{
"TransmissionMethods": ["Email", "Fax"],
"EmailRecipient": "emailTo@gmail.com",
"MerchantPhoneNumber" : "7411237489",
"EmailFrom": "emailFrom@gmail.com",
"RecipientName": "Smith",
"Subject": "Card Information",
"Message": "here is your card information...",
"DaysToExpire": 1,
"FaxRecipient": "+55555555555",
"FaxFrom": "Merchant Alias"
}
}
Json Example Response:
{
"cardHolder":{
"cardHolderGuid":"a2b25172-c863-4325-b3b9-7e33cff2f8d1",
"firstName":"Adam",
"lastName":"Smith",
"phone":"7411237489",
"address1":"345 Main Road",
"address2":"",
"city":"Miami Beach",
"state":"MI",
"zipcode":"33109",
"country":"Mexico"
},
"card":{
"cardGuid":"ae17f687-8ba7-4502-b627-24fdf5e6f218",
"accountNumber":"1111118971563394",
"securityCode":"617",
"amountLimit":180.0,
"usageLimit":1,
"expirationDate":"2019-1230T18:59:59",
"expiration":"1219",
"terminateDate": "2021-09-19T23:59:59",
"currencyCode":"USD",
"firstSix":"111111",
"lastFour":"3394",
"nameLine1":"Adam",
"nameLine2":"Smith",
"status":"Card - Active",
"sequenceNumber": "Sample-seq-1"
},
"cardBrand":"MasterCard",
"cardClass":"Commercial"
}
This endpoint creates a Virtual Card that does not have an associated sale. This allows ConnexPay Lite clients (clients who issue Virtual Cards from cash) to submit the issue call only rather than both the Sales Call and the Issue Card Call.
HTTP Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/IssueCard/IssueLite
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantGuid | string | Mandatory | Merchant's guid. Application level value that indicates a virtual card is being requested for clients account. Value provided by ConnexPay. |
FirstName | string | Mandatory | Cardholder's first name. This is the first name placed on the virtual card provided to the travel supplier. The value is also searchable in the ConnexPay portal. |
LastName | string | Mandatory | Cardholder's last name. This is the last name placed on the virtual card provided to the travel supplier. The value is also searchable in the ConnexPay portal. |
Phone | integer | Optional | Cardholder's phone number. Phone number up to 20 character string. |
Address1 | string | Optional | Cardholder's address line 1. The street number is used by the travel supplier when submitting the transaction to perform an AVS check. Alphanumeric. |
Address2 | string | Optional | Cardholder's address line 2. Alphanumeric. |
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. If a non U.S. or Canadian value is submitted the virtual card request will not be processed and an error response returned. |
Zipcode | integer | Optional | Cardholder's zipcode. The zip code is used by the travel supplier when submitting the transaction to perform an AVS check. The Zipcode must be between 1 and 10 characters long, only numbers and letters are allowed. |
Country | string | Optional | Cardholder's country. The Country must be between 2 and 40 characters long, only numbers and letters are allowed. All ISO-3166 countries (https://www.iso.org/obp/ui/) are accepted in English Short Name, Alpha-2, Alpha-3 or Numeric form, e.g. 'Mexico', 'MX', 'MEX' or '484'. |
UsageLimit | decimal | Mandatory | Security Control: Maximum number of times the card may be used - for both pre-auths and standard authorizations - for security purposes the maximum allowed value is 99. All attempts greater than 99 will be declined. For all transactions authorized by ARC, airlines typically settle for each individual ticket on a PNR that is connected to the original authorization. |
AmountLimit | decimal | Mandatory | Security Control: Maximum dollar amount the card can be authorized and settled; value must incorporate any overage i.e. currency conversion, taxes that travel supplier may associate with the transaction. If a travel supplier authorizes card for more than the amount limit the transaction will be decline. Any balance remaining on the card is returned to the ConnexPay client 8-10 days through Residual Margin after expiration and all pending transactions is cleared. |
ExpirationDate | date | Mandatory | Security Control: The last date for which a virtual card may be authorized in YYYY-MM-DD format. For airline or other prepaid transactions, ConnexPay recommends expiring the card 8-10 days after issuance - this provides enough time to pass the card to the travel supplier and their processing. For hotel transactions, ConnexPay suggests 8-10 days after check out to ensure all pending transactions are processed. This value is critical because residual margin will not be calcuated until after the defined expiration date. |
TerminateDate | date | Optional | The TerminateDate (YYYY-MM-DD format) is the date the Virtual Credit Card will be terminated by ConnexPay''s system. TerminateDate is different than the ExpirationDate in that TerminateDate just triggers Residual Margin and ExpirationDate is the month and year that will be applied to the actual VCC. The recommendation is to set the ExpirationDate one or two years in the future and setting the TerminateDate just a day or two after the VCC is expected to be processed. Note, Returns can still be processed on terminated VCCs. |
PurchaseType | string | Mandatory | Security Control: The industry where the virtual card will be utilized. For example, if value set to airline and the card is used at hotel, it will be declined. Available purchase type values are: 1. 01 for Airline. 2. 02 for Hotel. 3. 03 for Car Rental. 4. 98 for No Restriction. 5. 99 for Other. |
SequenceNumber | string | Optional | Transaction sequence number within client environment. Note: value is not searchable or reportable in ConnexPay portal. Alphanumeric. |
SupplierCategory | string | Optional | The SupplierCategory is used to assist with Intelligent Routing functionality. The field accepts up to 100 alpha-numeric characters. If this is not supplied but supplierId below is a default category of "IATA" will be assumed to support compatibility with initial supplierId implementation that did not include a category option. Alphanumeric with a max length of 100 characters |
SupplierId | string | Optional | The SupplierId is used to assist with Intelligent Routing functionality. The field accepts up to 100 alpha-numeric characters. Alphanumeric with a max length of 100 characters |
NonDomesticSupplier | boolean | Optional | We can issue the “Global VCC” if the Supplier accepting that VCC has an overseas merchant account. This is an optional field. Indicating true will result in issuing this Global VCC. Indicating false (or not including this property in your request) will result in receiving a VCC created for domestic use. |
Transmission | |||
TransmissionMethods | string[] | Mandatory | Methods of Transmission. Supported method: Email, Fax. |
EmailRecipient | string | Mandatory when transmission is Email | The email address of the intended recipient. 255 char max. |
MerchantPhoneNumber | string | Optional | This is the phone number that should display on the virtual card and is the number that should be used if the link has expired. Up to 15 characters. Numbers and plus sign (+) allowed only. |
EmailFrom | string[] | Optional | For email transmissions, this will be the email address that populates the ‘reply to’ section of the email message. 255 char max. |
RecipientName | string | Mandatory | A descriptive name of the email or fax recipient. 255 char max |
Subject | string | Mandatory | High-level subject line description of the transmission contents. 255 char max. |
Message | string | Mandatory | The message body of the email or fax. 1024 char max. |
DaysToExpire | integer | Mandatory when transmission is Email. | The number of days after card issuance until link to VC expires. Range: 1-999 days. |
FaxRecipient | string | Mandatory when transmission is Fax. | The fax number of the intended recipient. Up to 15 characters, numbers and plus sign (+) allowed only. |
FaxFrom | string | Optional | For fax transmissions, this will be the name that populates the "From" section of the fax document. 255 char max. |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
CardHolder | object | Card Holder. |
Card | object | Card. |
CardHolder | ||
FirstName | string | Cardholder's first name. |
LastName | string | Cardholder's last name. |
Phone | integer | Cardholder's phone number. Phone number up to 15 characters. Numbers and plus sign (+) allowed only. |
Address1 | string | Cardholder's address line 1. |
Address2 | string | Cardholder's address line 2. |
City | string | Cardholder's city. |
State | string | Cardholder's short name state. The ISO 3166-2 CA and US state or province code of a user. Length = 2. |
Zipcode | integer | Cardholder's zipcode. Length = 5. |
Card | ||
CardGuid | string | Global Unique Identififer for the card. |
AccountNumber | integer | Card Number |
SecurityCode | integer | CVV of the card. |
AmountLimit | decimal | Max amount the card can spend. |
UsageLimit | decimal | Number of times the card can be used. |
ExpirationDate | date | Date the AmountLimit and UsageLimit fields expire. Format: YYYY-MM-DDTHH:MM:SS Coordinated Universal Time (UTC). |
Expiration | date | Expiration Date in MMYY format. |
TerminateDate | date | Date the when the card will be terminated internally to calculate residual margin. Format: YYYY-MM-DDTHH:MM:SS Coordinated Universal Time (UTC). |
CurrencyCode | string | 3 digit currency code. |
FirstSix | integer | First six digits of the card number. |
LastFour | integer | Last four digits of the card number. |
NameLine1 | string | Card Holder Name |
NameLine2 | string | Card Holder Name Line 2 |
Status | string | Status of the card. |
SequenceNumber | string | Transaction sequence number within passed with request. |
Update Virtual Card Under a Delayed Activation Sale
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class UpdateDelayedActivationVc
{
private const string ServerUrl = "purchasesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void UpdateDelayedVCamount(Guid cardGuid, decimal newCardAmount)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/IssueCard/UpdateDelayedActivationVc/{cardGuid}");
request.ContentType = "text/json";
request.Method = "PUT";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
ReloadAmount = newCardAmount
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"AmountLimit": 198.00
}
Json Example Response:
{
"card": {
"cardGuid": "4fee6de1-ec49-4b4a-8bf5-d1d13b580965",
"amountLimit": 198.00,
"expirationDate": "2019-12-30T18:59:59",
"expiration": "1219",
"firstSix": "111111",
"lastFour": "3647",
"nameLine1": "Adam",
"nameLine2": "Smith",
"status": "Card - Active, but delayed Activation Auth Limit of $1.0 applied."
"activationDate": "9/2/2020",
},
"mccGroupName": "Airline"
}
HTTP Request
PUT https://sandboxpurchasesapi.connexpay.com/api/v1/IssueCard/UpdateDelayedActivationVc/{cardGuid}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
CardGuid | string | Required | Global Unique Identififer for the Card. |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
ReloadAmount | decimal | Optional | Security Control: Amount to load on top of the current AmountLimit for the Virtual Card. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
MccGroupName | string | Name of the MCC group the card holder currently is issued for. |
Card | ||
CardGuid | string | Global Unique Identififer for the card. |
AmountLimit | decimal | Max amount the card can spend. |
ExpirationDate | date | Period the AmountLimit and UsageLimit fields apply. Format: YYYY-MM-DDTHH:MM:SS |
Expiration | date | Expiration Date in MMYY format. |
FirstSix | string | First six digits of the card number |
LastFour | string | Last four digits of the card number. |
NameLine1 | string | Card Holder's Name |
NameLine2 | string | Card Holder's Name Line 2 |
Status | string | Status of the card. It reads "Card - Active, but delayed Activation Auth Limit of $1.0 applied." |
ActivationDate | string | Date sale is expected to run and when this VC's auth limit will be set to amount limit above. |
UpdateCard
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class IssueCard
{
private const string ServerUrl = "purchasesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Update(Guid cardGuid, string purchaseType, decimal reloadAmount)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/IssueCard/{cardGuid}");
request.ContentType = "text/json";
request.Method = "PUT";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
PurchaseType = purchaseType,
ReloadAmount = reloadAmount
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"PurchaseType": "98",
"AmountLimit": 198.00
}
Json Example Response:
{
"card": {
"cardGuid": "4fee6de1-ec49-4b4a-8bf5-d1d13b580965",
"amountLimit": 103.00,
"expirationDate": "2019-12-30T18:59:59",
"expiration": "1219",
"firstSix": "111111",
"lastFour": "3647",
"nameLine1": "Adam",
"nameLine2": "Smith",
"status": "Card - Active"
},
"mccGroupName": "Airline"
}
Update PurchaseType
There are two use cases for updating a Virtual Card. One is to update the PurchaseType
which in turn updates the MCC where the Virtual Card can be used at. The second use case is for reloading the card in the event an issue occurred that requires more value to be added. Both scenarios are explained below.
Updating PurchaseType
to change where a Virtual Card may be used at:
When a Virtual Card is first created using the /IssueCard route, the PurchaseType
in that original request dictates what MCC group (a list of MCCs that fall under the specific type of travel supplier) should be applied to the Authorization Controls (what MCCs the VC can be authorized at). There are a couple cases where these MCC groups need to be changed: When a mistake was made when the VC was issued - use this PUT route to update the PurchaseType
to the appropriate PurchaseType
. When the travel supplier is under the wrong MCC but the MCC is unknown - use this PUT route to update the PurchaseType
to 98.
Reloading the Virtual Card amount
Reloading a card is useful in a few scenarios. One example would be when a supplier has used the Virtual Card, but then there was a change that required them to charge a bit more than what was issued. Or, if the supplier used the card, voided it for some reason and needs to process the transaction again. When a Virtual Card is voided, the funds are not available for immediate use - so this presents issues as the supplier may expect to be able to use the Virtual Card after it’s voided. Reloading the card will allow them immediate availability to use the card again.
HTTP Request
PUT https://sandboxpurchasesapi.connexpay.com/api/v1/IssueCard/{cardGuid}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
CardGuid | string | Required | Global Unique Identififer for the Card. |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
PurchaseType | string | Optional | Security Control: The industry where the virtual card will be utilized. For example, if value set to airline and the card is used at hotel, it will be declined. Available purchase type values are: 1. 01 for Airline. 2. 02 for Hotel. 3. 03 for Car Rental. 4. 99 for Other. 5. 98 for No Restrictions. |
ReloadAmount | decimal | Optional | Security Control: Amount to load on top of the current AmountLimit for the Virtual Card. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
MccGroupName | string | Name of the MCC group the card holder currently is issued for. |
Card | ||
CardGuid | string | Global Unique Identififer for the card. |
AmountLimit | decimal | Max amount the card can spend. |
ExpirationDate | date | Period the AmountLimit and UsageLimit fields apply. Format: YYYY-MM-DDTHH:MM:SS |
Expiration | date | Expiration Date in MMYY format. |
FirstSix | string | First six digits of the card number |
LastFour | string | Last four digits of the card number. |
NameLine1 | string | Card Holder's Name |
NameLine2 | string | Card Holder's Name Line 2 |
Status | string | Status of the card. |
Terminate Card
using System;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class TerminateCard
{
private const string ServerUrl = "purchasesapi.connexpay.com";
public static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
Console.Write((int)response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Terminate(Guid cardGuid)
{
try
{
var request = (HttpWebRequest)WebRequest.Create($"https://{ServerUrl}/api/v1/TerminateCard/{cardGuid}");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkYW5pZWxvciIsInJvbGUiOiJ1c2VyIiwiaXNzIjoiaHR0cHM6Ly9QdXJjaGFzZXNBcGkuY29ubmV4cGF5ZGV2LmNvbSIsImF1ZCI6Ikc1b0lOZm5UaUtYZGRLRENHa3AyUUJvQXE4VjFLRDJmIiwiZXhwIjoxNTU2Mzc4NzIwLCJuYmYiOjE1NTU1MTQ3MjB9.u70wqixx__usEFUFJjxMPoe7vfzt3XN1JG6p8eFMpxY");
request.ContentType = request.Accept = "application/json";
request.ContentLength = 0;
WriteResponse((HttpWebResponse)request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse)wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
[blank]
Json Example Response:
[blank]
This endpoint terminates a virtual card.
HTTP Request
POST https://sandboxsalesapi.connexpay.com/api/v1/TerminateCard/<guid>
Headers
Key | Value |
---|---|
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Description |
---|---|
guid | Card’s guid to terminate |
Response
- 200 code (ok).
ResendTransmission
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class IssueCard
{
private const string ServerUrl = "purchasesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void ResendTransmission(Guid cardGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/IssueCard/SendPaymentInfo/{cardGuid}");
request.ContentType = "text/json";
request.Method = "PUT";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
TransmissionMethods" = ["Email", "Fax"],
EmailRecipient" = "emailTo@gmail.com",
MerchantPhoneNumber" = "+7411237489",
EmailFrom" = "emailFrom@gmail.com",
RecipientName" = "Smith",
Subject" = "Card Information",
Message" = "here is your card information...",
DaysToExpire" = 1,
FaxRecipient = "+55555555555",
FaxFrom = "Merchant Alias"
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"TransmissionMethods": ["Email", "Fax"],
"EmailRecipient": "emailTo@gmail.com",
"MerchantPhoneNumber" : "+7411237489",
"EmailFrom": "emailFrom@gmail.com",
"RecipientName": "Smith",
"Subject": "Card Information",
"Message": "here is your card information...",
"DaysToExpire": 1,
"FaxRecipient": "+55555555555",
"FaxFrom": "Merchant Alias"
}
Json Example Response:
"Payment Information Sent"
This endpoint resends payment information to recipient.
HTTP Request
PUT https://sandboxpurchasesapi.connexpay.com/api/v1/IssueCard/SendPaymentInfo/{cardGuid}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
CardGuid | string | Required | Global Unique Identififer for the Card. |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
TransmissionMethods | string[] | Mandatory | Methods of Transmission. Supported method: Email, Fax. |
EmailRecipient | string | Mandatory when transmission is Email | The email address of the intended recipient. 255 char max. |
MerchantPhoneNumber | string | Optional | This is the phone number that should display on the virtual card and is the number that should be used if the link has expired. Up to 15 characters. Numbers and plus sign (+) allowed only. |
EmailFrom | string[] | Optional | For email transmissions, this will be the email address that populates the ‘reply to’ section of the email message. 255 char max. |
RecipientName | string | Optional | A descriptive name of the email or fax recipient. 255 char max |
Subject | string | Optional | High-level subject line description of the transmission contents. 255 char max. |
Message | string | Optional | The message body of the email or fax. 1024 char max. |
DaysToExpire | integer | Optional | The number of days after card issuance until link to VC expires. Range: 1-999 days. |
FaxRecipient | string | Mandatory when transmission is Fax | Fax number of the intended recipient. Numbers and plus sign (+) allowed only. |
FaxFrom | string | Optional | For fax transmissions, this will be the name that populates the "From" section of the fax document. 255 char max. |
Response
- 200 code (ok).
Response Message
"Payment Information Sent"
Search
Search Issued Cards
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public class PurchasesSearch
{
private const string ServerUrl = "purchasesapi.connexpaydev.com";
public static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
Console.Write((int)response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void SearchSettlements(Guid merchantGuid, Guid saleGuid, string IncomingTransactionCode
, decimal? issuedAmountFrom, decimal? issuedAmountTo,
decimal? settledAmountFrom, decimal? settledAmountTo, decimal? returnedAmountFrom, decimal? returnedAmountTo))
try
{
var request = (HttpWebRequest)WebRequest.Create($"https://{ServerUrl}/api/v1/Search/IssuedCards");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJWb2lkRGFuaWVsIiwicm9sZSI6InVzZXIiLCJpc3MiOiJodHRwczovL1B1cmNoYXNlc0FwaS5jb25uZXhwYXlkZXYuY29tIiwiYXVkIjoiRzVvSU5mblRpS1hkZEtEQ0drcDJRQm9BcThWMUtEMmYiLCJleHAiOjE1NzU2NjM3MTEsIm5iZiI6MTU3NDc5OTcxMX0.UcS4teybSUXeRnuJORHzJTVulQA0HN_lnjblO-6DGls");
request.ContentType = request.Accept = "application/json";
var search = new
{
MerchantGuid = merchantGuid.ToString(),
SaleGuid = saleGuid.ToString(),
IncomingTransactionCode,
IssuedAmountFrom = issuedAmountFrom,
IssuedAmountTo = issuedAmountTo,
SettledAmountFrom = settledAmountFrom,
SettledAmountTo = settledAmountTo,
ReturnedAmountFrom = returnedAmountFrom,
ReturnedAmountTo = returnedAmountTo
};
string json = JsonConvert.SerializeObject(search);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse)request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse)wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"MerchantGuid": "2b586234-7f14-432e-b0f4-a2935f783f38",
"SaleGuid": "f3f0c5d5-d154-4c2d-b8de-9e6b63f25221",
"IncomingTransactionCode": "03AGCW7D9ZW8KHC3300030000"
"IssuedAmountFrom": 100,
"IssuedAmountTo": 150,
"SettledAmountFrom": 50,
"SettledAmountTo": 100,
"ReturnedAmountFrom": 20.59,
"ReturnedAmountTo": 50.07
}
Json Example Response:
{
"pageCurrent":1,
"pageCurrentResults":2,
"pageTotal":1,
"pageSize":5,
"totalResults":2,
"cardSummary":null,
"searchResultDTO":[
{
"customerName":"John Smith",
"merchantId":"b19d3b78-627b-4b7e-b60f-3b842a64a213",
"incomingTransactionCodeCreationDate":"2020-02-18T17:40:43.66",
"outgoingTransactionCodeCreationDate":"2020-02-18T17:40:54.63",
"issuedAmount":150.00,
"currencyCode":"USD",
"cardType":"Other",
"lastFour":"9766",
"bin":"5ed416a2-a2da-41fc-957a-a9ee366f86b3",
"incomingTransactionCode":"03AGCW7D9ZW8KHC3300030000",
"outgoingTransactionCode":"03AGCW7D9ZW8KHC3300030000USD01ZZZ00015000",
"outgoingTransactionCodeDetail":{
"incomingTransactionCode":"03AGCW7D9ZW8KHC3300030000",
"incomingTransactionCodeDetail":{
"expectedOutgoingTransactionCount":3,
"filler":"AGC",
"authorizationResponseCode":"W7D9ZW",
"authorizationDate":"2020-02-18T17:40:43.66",
"authorizedAmount":300.0
},
"currencyCode":"USD",
"purchaseType":"01",
"filler":"ZZZ",
"paymentAmount":150.0
},
"timeStamp":"2020-02-18T17:40:54.63",
"guid":"179c7243-6b43-4d47-b77c-3f5bb0fc37f5",
"cardStatus":"Card - Active",
"toleranceAmount":30.00,
"terminateDate": "2020-11-26T18:59:59"
},
},
{
"customerName":"John Smith",
"merchantId":"b19d3b78-627b-4b7e-b60f-3b842a64a213",
"incomingTransactionCodeCreationDate":"2020-02-18T17:40:43.66",
"outgoingTransactionCodeCreationDate":"2020-02-18T17:41:03.81",
"issuedAmount":100.00,
"currencyCode":"USD",
"cardType":"Other",
"lastFour":"8493",
"bin":"5ed416a2-a2da-41fc-957a-a9ee366f86b3",
"incomingTransactionCode":"03AGCW7D9ZW8KHC3300030000",
"outgoingTransactionCode":"03AGCW7D9ZW8KHC3300030000USD01ZZZ00005000",
"outgoingTransactionCodeDetail":{
"incomingTransactionCode":"03AGCW7D9ZW8KHC3300030000",
"incomingTransactionCodeDetail":{
"expectedOutgoingTransactionCount":3,
"filler":"AGC",
"authorizationResponseCode":"W7D9ZW",
"authorizationDate":"2020-02-18T17:40:43.66",
"authorizedAmount":300.0
},
"currencyCode":"USD",
"purchaseType":"01",
"filler":"ZZZ",
"paymentAmount":50.0
},
"timeStamp":"2020-02-18T17:41:03.81",
"guid":"7638a84e-40cb-4db7-b9b8-a401a906b310",
"cardStatus":"Card - Active"
}
],
"allowedToCreateVC":false
}
This endpoint searches for Issued Virtual Cards.
Http Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/IssuedCards/
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/IssuedCards/{pageNumber}
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/IssuedCards/{pageNumber}/{pageSize}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
PageNumber | integer | Optional | Number of page of the results. Default is 1. |
PageSize | integer | Optional | Size of each page of the results. Default is 1000. |
Json Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantGuid | string | Mandatory | Merchant's Guid. |
SaleGuid | string | Optional | Sale Guid. |
IncomingTransactionCode | string | Optional | IncomingTransactionCode to search for |
TimeStampFrom | date | Optional | Card's Issued Date. |
TimeStampFrom | date | Optional | Card's Issued Date. |
IssuedAmountFrom | decimal | Optional | Issued Amount of the Card. |
IssuedAmountTo | decimal | Optional | Issued Amount of the Card. |
OutgoingTransactionCode | string | Optional | OutgoingTransactionCode to search for |
SettledAmountFrom | decimal | Optional | VCC Settled Amount. |
SettledAmountTo | decimal | Optional | VCC Settled Amount. |
ReturnedAmountFrom | decimal | Optional | VCC Settled Return Amount. |
ReturnedAmountTo | decimal | Optional | VCC Settled Return Amount. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
PageCurrent | Integer | Current Page Number. |
PageCurrentResults | Integer | Total number of records on this page. |
PageTotal | Integer | Total pages. |
PageSize | Integer | Page Size. |
TotalResults | Integer | Total number of records for all pages. |
SearchResultDTO | object | Card details. |
AllowedToCreateVC | boolean | If logged in user is allowed to create virtual card. |
SearchResultDTO
Parameter | Type | Value |
---|---|---|
Guid | string | Card GUID. |
CardStatus | string | Card status. |
ToleranceAmount | decimal | Tolerance amount requested for the card. |
CustomerName | string | Client name |
MerchantId | string | Merchant Guid. |
IncomingTransactionCode | string | IncomingTransactionCode. |
incomingTransactionCodeCreationDate | date | IncomingTransactionCode creation date. |
OutgoingTransactionCode | string | OutgoingTransactionCode. |
outgoingTransactionCodeCreationDate | date | OutgoingTransactionCode creation date. |
IssuedAmount | decimal | Issued Amount. |
LastFour | string | Last four digits of the card number. |
CardType | string | Card type. |
CurrencyCode | string | Currency code of the issued card. |
Bin | string | Card Bin. |
TimeStamp | date | Card creation timestamp. |
OutgoingTransactionCodeDetail | object | OutgoingTransactionCode details. |
TerminateDate | date | The TerminateDate (YYYY-MM-DD format) is the date the Virtual Credit Card will be terminated by ConnexPay''s system. TerminateDate is different than the ExpirationDate in that TerminateDate just triggers Residual Margin and ExpirationDate is the month and year that will be applied to the actual VCC. The recommendation is to set the ExpirationDate one or two years in the future and setting the TerminateDate just a day or two after the VCC is expected to be processed. Note, Returns can still be processed on terminated VCCs. |
OutgoingTransactionCodeDetail
Parameter | Type | Value |
---|---|---|
IncomingTransactionCode | string | IncomingTransactionCode. |
CurrencyCode | string | Currency code of the issued card. |
PurchaseType | string | Purchase type used for the card. |
paymentAmount | decimal | Payment amount. |
Search Settlements
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public class PurchasesSearch
{
private const string ServerUrl = "purchasesapi.connexpay.com";
public static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
Console.Write((int)response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void SearchSettlements(Guid merchantGuid, DateTime? fromDate, DateTime? toDate, string orderNumber)
{
try
{
var request = (HttpWebRequest)WebRequest.Create($"https://{ServerUrl}/api/v1/Search/Settlements");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJWb2lkRGFuaWVsIiwicm9sZSI6InVzZXIiLCJpc3MiOiJodHRwczovL1B1cmNoYXNlc0FwaS5jb25uZXhwYXlkZXYuY29tIiwiYXVkIjoiRzVvSU5mblRpS1hkZEtEQ0drcDJRQm9BcThWMUtEMmYiLCJleHAiOjE1NzU2NjM3MTEsIm5iZiI6MTU3NDc5OTcxMX0.UcS4teybSUXeRnuJORHzJTVulQA0HN_lnjblO-6DGls");
request.ContentType = request.Accept = "application/json";
var search = new
{
merchantGuid = merchantGuid.ToString(),
dateFrom = fromDate?.ToString("O"),
dateTo = toDate?.ToString("O"),
orderNumber
};
string json = JsonConvert.SerializeObject(search);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse)request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse)wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"merchantGuid": "568f7853-6e3d-4b3b-80f5-058763318fcb",
"dateFrom": "2019-11-01T00:00:00.0000000",
"dateTo": "2019-11-30T00:00:00.0000000",
"orderNumber": "Dan-TV9J6VJ"
}
Json Example Response:
{
"pageCurrent": 1,
"pageCurrentResults": 2,
"pageTotal": 1,
"pageSize": 1000,
"totalResults": 2,
"searchResultDTO": [{
"guid": "f856455c-6028-4aca-8db5-0f6c642a3ce2",
"merchant": "Hilton - 1",
"client": "Void Merchant 1",
"customerId": "DanCID-TV9J6VJ",
"issuedDate": "2019-11-15T12:11:10.1",
"orderNumber": "Dan-TV9J6VJ",
"incomingTransactionCode": "013BOCW8H34WO3XPU00025000",
"outgoingTransactionCode": "013BOCW8H34WO3XPU00025000USD01ZZZ00004900",
"cardGuid": "3d595fa2-0d9f-4861-8f0d-39086da1b53f",
"cardStatus": 401,
"firstSix": "111111",
"lastFour": "5918",
"expirationDate": "2019-11-06T00:00:00",
"releasedDate": "2019-11-13T00:00:00",
"productType": "Airline",
"totalAmount": 201.00,
"maxAuths": 1,
"postedDate": "2019-11-15T12:11:17.727",
"postedAmount": 66.00,
"auths": 0
}, {
"guid": "8b935e7c-f3df-4ec3-a931-33c1086d5a5c",
"merchant": "Hilton - 1",
"client": "Void Merchant 1",
"customerId": "DanCID-TV9J6VJ",
"issuedDate": "2019-11-15T12:11:10.1",
"orderNumber": "Dan-TV9J6VJ",
"incomingTransactionCode": "013BOCW8H34WO3XPU00025000",
"outgoingTransactionCode": "013BOCW8H34WO3XPU00025000USD01ZZZ00004900",
"cardGuid": "3d595fa2-0d9f-4861-8f0d-39086da1b53f",
"cardStatus": 401,
"firstSix": "111111",
"lastFour": "5918",
"expirationDate": "2019-11-06T00:00:00",
"releasedDate": "2019-11-13T00:00:00",
"productType": "Airline",
"totalAmount": 201.00,
"maxAuths": 1,
"postedDate": "2019-11-15T12:11:11.35",
"postedAmount": 244.00,
"auths": 0
}
]
}
This endpoint searches for Virtual Card Settlements.
Http Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/Settlements/
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/Settlements/{pageNumber}
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Search/Settlements/{pageNumber}/{pageSize}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
PageNumber | integer | Optional | Number of page of the results. Default is 1. |
PageSize | integer | Optional | Size of each page of the results. Default is 1000. |
Json Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
MerchantGuid | string | Optional | Merchant's Guid. |
DateFrom | date | Optional | Card's Issued Date. |
DateTo | date | Optional | Card's Issued Date. |
OrderNumber | string | Optional | Order Number. Max. Length = 50. |
IssuedAmountFrom | decimal | Optional | Issued Amount of the Card. |
IssuedAmountTo | decimal | Optional | Issued Amount of the Card. |
IssuedCardLastFour | string | Optional | Card last four number. |
PostedAmountFrom | decimal | Optional | Posted Amount of the Card. |
PostedAmountTo | decimal | Optional | Posted Amount of the Card. |
ExpirationDateFrom | date | Optional | Card's expiration date. |
ExpirationDateTo | date | Optional | Card's expiration date. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
PageCurrent | Integer | Current Page Number. |
PageCurrentResults | Integer | Total number of records on this page. |
PageTotal | Integer | Total pages. |
PageSize | Integer | Page Size. |
TotalResults | Integer | Total number of records for all pages. |
SearchResultDTO | object | Settlement record. |
SearchResultDTO
Parameter | Type | Value |
---|---|---|
Guid | string | Settlement record Guid. |
Merchant | string | Merchant. |
Client | string | Client. |
CustomerId | string | Customer ID. |
IssuedDate | date | Card Issued Date. |
OrderNumber | string | Order Number. |
IncomingTransactionCode | string | IncomingTransactionCode. |
OutgoingTransactionCode | string | OutgoingTransactionCode. |
CardGuid | string | Card's Guid. |
CardStatus | string | Card's Status. (400 = active, 401 = terminated) |
FirstSix | string | First six digits of the card number. |
LastFour | string | Last four digits of the card number. |
ExpirationDate | date | Expiration Date |
ReleasedDate | date | Expiration Date plus 7 days. |
ProductType | string | Product Type |
TotalAmount | string | Issued Amount |
MaxAuths | string | Usage Limit. |
PostedDate | date | Posted Date. |
PostedAmount | string | Posted Amount. |
Auths | string | Number of authorizations left. |
Transactions
Purchase Transactions
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class IssueCard
{
private const string ServerUrl = "purchasesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Get(Guid cardGuid)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/Cards/Transactions/{cardGuid}");
request.ContentType = "text/json";
request.Method = "GET";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Response:
{
"transactions": [
{
"error": "Failed to retrieve transaction 3a1ab440-6b29-4bcb-aa21-546a6913f8fe"
},
{
"type": "authorization",
"amount": 115.5,
"status": "DECLINED",
"description": "Auth restriction found for given mid or mcc",
"merchantName": "Marqeta Storefront",
"timestamp": "2019-12-12T17:38:56Z"
},
{
"type": "authorization",
"amount": 115.5,
"status": "DECLINED",
"description": "Auth restriction found for given mid or mcc",
"merchantName": "Marqeta Storefront",
"timestamp": "2019-12-12T17:44:43Z"
}
]
}
This API allows you to pull back history of the Virtual Card. This is the same API (and data) that is used when clicking the “Transactions” button on the Virtual Card to see the transaction history. The API will return the merchant name that the Virtual Card was used at, the date and time, transaction type (auth, settlement, refund, void, etc.), the response/memo which correlates to the transaction type and the amount.
HTTP Request
GET https://sandboxpurchasesapi.connexpay.com/api/v1/Cards/Transactions/{cardGuid}
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Type | M/C/O | Value |
---|---|---|---|
CardGuid | string | Required | Global Unique Identififer for the Card. |
Response
- 200 code (ok).
Response Parameters
Parameter | Type | Value |
---|---|---|
Count | number | Transactions count. |
Data | array | Array of Transaction |
Transaction | ||
Type | string | The type of event that occurred. |
Amount | string | Transaction amount. |
Status | string | The status of the transaction. Avalable statuses are: 1. PENDING 2. CLEARED 3. COMPLETION 4. DECLINED 5. ERROR |
Description | string | This gives a bit more help context to the Type and Status . |
MerchantName | string | This is the statement descriptor of the merchant that was used for that transaction. |
Timestamp | date | The date and time of the transaction. |
Addendum
Virtual Card Addendum
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace ConnexPaySample
{
public static class Addendum
{
private const string ServerUrl = "purchasesapi.connexpay.com";
private static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream() ?? throw new Exception("No Response")))
{
Console.Write((int) response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Create(Guid merchantGuid, string itc)
{
try
{
var request = (HttpWebRequest) WebRequest.Create($"https://{ServerUrl}/api/v1/Addendum/VirtualCard");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization",
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0Y2Zvcm1hbDEiLCJyb2xlIjoidXNlciIsImlzcyI6Imh0dHBzOi8vUHVyY2hhc2VzQXBpLmNvbm5leHBheWRldi5jb20iLCJhdWQiOiJHNW9JTmZuVGlLWGRkS0RDR2twMlFCb0FxOFYxS0QyZiIsImV4cCI6MTU3NjE4MDY1NiwibmJmIjoxNTc1MzE2NjU2fQ.hzOG8D-SJXxg_pc61ttIzQZa7S2UebHAbmQ2CqPikS8");
request.ContentType = request.Accept = "application/json";
var requestObj = new
{
itemGuid = $"2b586234-7f14-432e-b0f4-a2935f783f38",
value = "5AH6FT",
category = "PNR",
idExternal = "299",
note = "Additional Info",
sequence = "TICKET1",
};
string json = JsonConvert.SerializeObject(requestObj);
Console.WriteLine(json);
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
WriteResponse((HttpWebResponse) request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse) wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
{
"itemGuid": "2b586234-7f14-432e-b0f4-a2935f783f38",
"value": "5AH6FT",
"category": "PNR",
"idExternal": "299",
"note": "Additional Info",
"sequence": "TICKET1"
}
Json Example Response:
{
"guid": "3d1d79c8-3b3e-4bba-be77-e74df716c47c",
"itemGuid": "2b586234-7f14-432e-b0f4-a2935f783f38",
"value": "5AH6FT",
"category": "PNR",
"idExternal": "299",
"note": "Additional Info",
"sequence": "TICKET1"
}
This endpoint creates a virtual card addendum info item.
HTTP Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Addendum/VirtualCard
Headers
Key | Value |
---|---|
Content-Type | "application/json" |
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
JSON Body
Parameter | Type | M/C/O | Value |
---|---|---|---|
ItemGuid | string | Mandatory | Guid for the Virtual Card you are attaching information to with this addendum request. This Guid was returned to client when the Virtual Card was initially created. |
Value | string | Mandatory | Character data to associate with the Virtual card. |
Category | string | Optional | Can be used by client to specify a desired category for an Addenda item. |
IdExternal | string | Optional | Can be supplied by client to associate this addendum with an ID in client's data. |
Note | string | Optional | Addiitonal information to associate with this addendum, as desired. |
Sequence | string | Optional | If client creates multiple addenda for a single Virtual Card this sequence can be specified if a client desires. |
Response
- 201 code (created).
Response Parameters
Parameter | Type | Value |
---|---|---|
Guid | string | Created addendum guid. Retain should you desire to remove the addendum later. |
ItemGuid | string | Guid for the Virtual Card you are attaching information to with this addendum request. This Guid was returned to client when the Virtual Card was initially created. |
Value | string | Character data now associated with the Virtual card. |
Category | string | Specified client category for an Addenda item. |
IdExternal | string | Supplied cross-reference to a client ID for this addendum. |
Note | string | Addiitonal information in this addendum. |
Sequence | string | Client's sequence indicator for this addendum item. |
Addendum Remove
using System;
using System.IO;
using System.Net;
namespace ConnexPaySample
{
public class Addendum
{
private const string ServerUrl = "purchasesapi.connexpay.com";
public static void WriteResponse(HttpWebResponse response)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
Console.Write((int)response.StatusCode);
Console.WriteLine();
Console.WriteLine(response.StatusDescription);
Console.WriteLine(reader.ReadToEnd());
}
}
public static void Remove(Guid addendumGuid)
{
try
{
var request = (HttpWebRequest)WebRequest.Create($"https://{ServerUrl}/api/v1/Addendum/Remove/{addendumGuid}");
request.ContentType = "text/json";
request.Method = "POST";
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkYW5pZWxvciIsInJvbGUiOiJ1c2VyIiwiaXNzIjoiaHR0cHM6Ly9QdXJjaGFzZXNBcGkuY29ubmV4cGF5ZGV2LmNvbSIsImF1ZCI6Ikc1b0lOZm5UaUtYZGRLRENHa3AyUUJvQXE4VjFLRDJmIiwiZXhwIjoxNTU2Mzc4NzIwLCJuYmYiOjE1NTU1MTQ3MjB9.u70wqixx__usEFUFJjxMPoe7vfzt3XN1JG6p8eFMpxY");
request.ContentType = request.Accept = "application/json";
request.ContentLength = 0;
WriteResponse((HttpWebResponse)request.GetResponse());
}
catch (WebException wex)
{
if (wex.Response != null)
using (var errorResponse = (HttpWebResponse)wex.Response)
WriteResponse(errorResponse);
}
catch (IOException e)
{
Console.WriteLine(e);
}
}
}
}
Json Example Request:
[blank]
Json Example Response:
{
"message": "Addendum Removed"
}
This endpoint deletes an Addendum information item from an object.
HTTP Request
POST https://sandboxpurchasesapi.connexpay.com/api/v1/Andendum/Remove/<guid>
Headers
Key | Value |
---|---|
Authorization | Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..." |
URL Parameters
Parameter | Description |
---|---|
Guid | The Addendum guid to terminate. |
Response
- 200 code (ok).