Introduction
Zift provides a Web Services API which is called via method POST over HTTPS. Requests should contain the API Operation, Authentication Information, and related information specific to the API Operation being performed.
Important API Connection Information
- Request method is POST.
- Request fields are passed within HTTPS request body (including cases with callbacks) and are required to be URL-encoded.
- The content-type must be set to
application/x-www-form-urlencoded
. - Response fields are passed within the body part of the HTTPS response using
name1=key1&name2=key2
(GET URL) format.
API Endpoints
When starting your integration we recommended that you use our sandbox environment. Once you are satisfied with your integration you can connect to our production system. Below are the API endpoints for our sandbox and production.
API Processing Endpoints:
- Production:
https://secure.zift.io/gates/xurl?
- Sandbox:
https://sandbox-secure.zift.io/gates/xurl?
Terminal Processing Endpoints:
- Production:
https://manage.zift.io/terminals/xurl?
- Sandbox:
https://sandbox-manage.zift.io/terminals/xurl?
Merchant Creation API Endpoints:
- Production:
https://manage.zift.io/gates/onboarding?
- Sandbox:
https://sandbox-manage.zift.io/gates/onboarding?
API Access
If you don't have Zift sandbox API credentials please submit a request to our team. We will create an account for you so you can start working with our API.
Request Sandbox Account
Zift API Postman Collection
- Production
- Sandbox
In each environment you should create the following variables:
- trans-api-username: Username for transaction API and Terminal Cloud API
- trans-api-password: Password for transaction API
- terminal-password: Password for Terminal Cloud API (first 20 characters of trans-api-password)
- terminalId: The ID assigned to your test terminal
- accountId: Account ID for use with transaction tests
If you are integrating to our onboarding API (Merchant Creation) you will need the following variables:
- onb-api-username: Username for onboarding API
- onb-api-password: Password for onboarding API
- portfolioId: Onboarding portfolio ID
- resellerId: Onboarding reseller ID
- profileId: Onboarding profile ID
- feeTemplateId: Related fee template
- ProcessingConfigurationScript: Related configuration script
When you sign up for a sandbox account you will receive the values for these variables via email
Once your integration is complete, Zift will schedule a Go Live
call to review your integration. At that point you will receive a secure email with your production credentials.
Download Zift API Postman Collection
Transactions
All of our processing API requests are built off of the requestType
parameter. For payment transactions the possible values for requestType
are sale
, sale-auth
, credit
, refund
and void
. Additional parameters in the request are used to designate ACH vs. Credit Card transactions and redirection to our secure hosted payment pages (HPP).
The following components make up the basic API request for all sale transactions:
- API Operation
- Authentication Information
- Merchant Context
- Payment Details
- Customer Information
- External Identifiers
Charge (sale)
The table below lists the parameters to build a basic sale
request to authorize and capture a credit card or ACH payment.
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | sale | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
Account Fields
Name | Value or Format | Description |
---|---|---|
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountNumber | String (20) | Conditional Credit card or bank account number. Note: This field is required unless you are sending track data in the accountData field (listed below). |
accountData | String (500) | Conditional Track/EMV data of a payment card. Note: This field is required unless you are sending account or card data in the accountNumber filed (listed above). This field is typically only used with card swipe devices or terminals. See Integration Notes for usage
|
accountAccessory | String (10) | Required Card expiration date or bank routing number. |
csc | String(4) | Card security code (three digits on the back of a payment card). |
token | String (40) | The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Required Name of the card holder or bank account owner. |
holderBirthdate | Date (yyyyMMdd) | Birthdate of a payment card or bank account holder. |
Transaction Fields
Name | Value or Format | Description |
---|---|---|
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
transactionCategoryType | Enum | Represents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions. |
transactionModeType | P or N | Mode of the transaction.
|
memo | String (255) | Description of the transaction. Returned in the response. |
isPartialAuthorization | Boolean; 0 - disabled, 1 - enabled; default = 0 | Indicates whether partial authorization is enabled. See integration notes for more information. |
Billing Address Fields
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
countryCode | String (2) | The country of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
Cross-Reference Fields
Name | Value or Format | Description |
---|---|---|
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
itemCode | String (60) | Identifier of a purchased product or service within your system or platform. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
userCode | String (60) | Identifier of a user supplied by a submitter that initiates the API call. |
Extended Logic
Name | Value or Format | Description |
---|---|---|
sequenceNumber | Integer | Sequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments onlytransactionCategory= I or R . |
sequenceCount | Integer | Total number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only.transactionCategory= I |
settlementDelay | Integer | Period for which transaction settlement is delayed. |
settlementGroupCode | String(60) | Identifier of a settlement group. |
subscriptionCode | Long | Code of a subscription to a processing bank. See integration notes for more information. |
format | Enum | Defines what resource is going to be received within an offline callback. See integration notes for more information. |
items | List | List of items included in the transaction. The items parameter follows our subrecord format explained here.
For Level II transactions use this list of subrecord items |
Shipping Address Fields
Name | Value or Format | Description |
---|---|---|
shippingDate | Date | Date of a purchase (current date or any date in the past). |
shippingName | String(100) | Name of an order recipient. |
shippingStreet | String(128) | Street of a shipping address associated with an order recipient. |
shippingCity | String(50) | City of a shipping address associated with an order recipient. |
shippingCountryCode | String(2) | Country code of a shipping address associated with an order recipient. |
shippingState | String(2) | State of a shipping address associated with an order recipient. |
shippingZipCode | String(15) | ZIP code of a shipping address associated with an order recipient. |
Transaction Fields
Name | Value or Format | Description |
---|---|---|
shippingOriginZipCode | String(10) | ZIP-code associated with an address from which an order is shipped. See integration notes for more information. |
discountAmount | Integer | Discount amount applied to the order/transaction. See integration notes for more information. |
taxInvoiceCode | String(15) | Tax invoice number associated with the order/transaction. See integration notes for more information. |
localTaxAmount | Integer | Amount of a local (city, country, etc.) tax charged on the order/transaction. See integration notes for more information. |
localTaxIndicator | Enum | Defines how a local tax is handled. See integration notes for more information. |
nationalTaxAmount | Integer | Amount of a national/federal tax charged on the order/transaction. See integration notes for more information. |
nationalTaxIndicator | Enum | Defines how a national/federal tax is handled. See integration notes for more information. |
orderDate | Date | Date of an order placement. See integration notes for more information. |
commodityCode | String(4) | Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information. |
items | List | List of items included in the transaction. The items parameter follows our subrecord format explained here.
For Level II transactions use this list of subrecord items |
Level II Transaction Fields
Name | Value or Format | Description |
---|---|---|
orderCode | String(17) | Unique identifier of an order within a submitter's system. See integration notes for more information. |
shippingAmount | Integer | Amount of shipping and handling fees charged for an order delivery. See integration notes for more information. |
dutyAmount | Integer | Amount of a duty (import tax) charged on the order/transaction. See integration notes for more information. |
taxAmount | Integer | Tax amount charged on the order/transaction. Included in the total amount. See integration notes for more information. |
taxRate | Integer | Tax rate charged on the order/transaction. See integration notes for more information. implied 2 decimal places (e.g. 150 = 1.5%; 1000 = 10%) |
taxIndicator | Enum | Defines how taxes are handled for the transaction. See integration notes for more information. |
customerAccountTaxId | String(13) | Tax ID of a customer associated with the order/transaction. See integration notes for more information. |
Level III Transaction Fields
Name | Value or Format | Description |
---|---|---|
shippingOriginZipCode | String(10) | ZIP-code associated with an address from which an order is shipped. See integration notes for more information. |
discountAmount | Integer | Discount amount applied to the order/transaction. See integration notes for more information. |
taxInvoiceCode | String(15) | Tax invoice number associated with the order/transaction. See integration notes for more information. |
localTaxAmount | Integer | Amount of a local (city, country, etc.) tax charged on the order/transaction. See integration notes for more information. |
localTaxIndicator | Enum | Defines how a local tax is handled. See integration notes for more information. |
nationalTaxAmount | Integer | Amount of a national/federal tax charged on the order/transaction. See integration notes for more information. |
nationalTaxIndicator | Enum | Defines how a national/federal tax is handled. See integration notes for more information. |
orderDate | Date | Date of an order placement. See integration notes for more information. |
commodityCode | String(4) | Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information. |
items | List | List of items included in the transaction. The items parameter follows our subrecord format explained here.
For Level II transactions use this list of subrecord items |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=sale" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "amount=5000" \
-d "accountType=R" \
-d "transactionIndustryType=RE" \
-d "holderType=P" \
-d "holderName=John+Smith" \
-d "accountNumber=5499740000000057" \
-d "accountAccessory=0422" \
-d "street=12+Main+St" \
-d "city=Denver" \
-d "state=CO" \
-d "zipCode=30301" \
-d "customerAccountCode=0000000001" \
-d "transactionCode=0000000001" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=sale"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&amount=5000"
+ "&accountType=R"
+ "&transactionIndustryType=RE"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'sale',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'amount'=>'5000',
'accountType'=>'R',
'transactionIndustryType'=>'RE',
'holderType'=>'P',
'holderName'=>'John+Smith',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=sale"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&amount=5000"
+ "&accountType=R"
+ "&transactionIndustryType=RE"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=sale"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&amount=5000"
postData = postData + "&accountType=R"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&holderType=P"
postData = postData + "&holderName=John+Smith"
postData = postData + "&accountNumber=5499740000000057"
postData = postData + "&accountAccessory=0422"
postData = postData + "&street=12+Main+St"
postData = postData + "&city=Denver"
postData = postData + "&state=CO"
postData = postData + "&zipCode=30301"
postData = postData + "&customerAccountCode=0000000001"
postData = postData + "&transactionCode=0000000001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'sale',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'amount'=>'5000',
'accountType'=>'R',
'transactionIndustryType'=>'RE',
'holderType'=>'P',
'holderName'=>'John+Smith',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'sale',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'amount':'5000',
'accountType':'R',
'transactionIndustryType':'RE',
'holderType':'P',
'holderName':'John+Smith',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'sale',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
amount=>'5000',
accountType=>'R',
transactionIndustryType=>'RE',
holderType=>'P',
holderName=>'John+Smith',
accountNumber=>'5499740000000057',
accountAccessory=>'0422',
street=>'12+Main+St',
city=>'Denver',
state=>'CO',
zipCode=>'30301',
customerAccountCode=>'0000000001',
transactionCode=>'0000000001'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'sale',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'amount':'5000',
'accountType':'R',
'transactionIndustryType':'RE',
'holderType':'P',
'holderName':'John+Smith',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
Endpoint: POST: https://sandbox-secure.zift.io/gates/xurl
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:sale
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
amount:100
accountType:R
transactionIndustryType:RE
accountNumber:4111111111111111
accountAccessory:0422
csc:123
holderName:Test Transaction
street:41 E 300 S
city:Spanish Fork
state:UT
zipCode:84663
countryCode:US
phone:8774561382
email:tstark@zift.io
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | Enum | Indicates the type of response. |
accountId | String (12) | Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
token | String (40) | The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderName | String (150) | Name of the card holder or bank account owner. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
cashbackAmount | Integer (in cents) | cashbackAmount used in the transaction. |
feeAmount | Integer | Contains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance. Note: Based on merchant configurations, actual processing/interchange fee will be deducted either from the amount remitted to the organization beneficiary or from the service fee amount of the submitter. |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Returned in the original transaction response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
requestId | String (40) | Identifier of the API request. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. |
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
providerCscResponseCode | String (3) | CSC response code returned by the payment and acquiring networks. Supports legacy systems. |
items | List | List of items included in the transaction. ex: (code=001;itemId=I123;splits=(accountId=20011;trans actionId=S10001)(accountId=20012;transacti onId=S10002)) |
Authorize a Transaction
The table below lists the parameters to authorize a customers card. The authorization request authorizes a specified amount of funds on a cardholders account that can be captured and processed at a later date. If a capture operation is never performed the sale-auth
transaction will automatically be voided within the system. Authorizations typically last for 7 days but can vary depending on the cardholders issuing bank.
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | sale-auth | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
Authorize Account Fields
Name | Value or Format | Description |
---|---|---|
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountNumber | String (20) | Conditional Credit card or bank account number. Note: This field is required unless you are sending track data in the accountData field (listed below). |
accountData | String (500) | Conditional Track/EMV data of a payment card. Note: This field is required unless you are sending account or card data in the accountNumber filed (listed above). This field is typically only used with card swipe devices or terminals. See Integration Notes for usage
|
accountAccessory | String (10) | Required Card expiration date or bank routing number. |
csc | String(4) | Card security code (three digits on the back of a payment card). |
token | String (40) | The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Required Name of the card holder or bank account owner. |
holderBirthdate | Date (yyyyMMdd) | Birthdate of a payment card or bank account holder. |
Authorize Transaction Fields
Name | Value or Format | Description |
---|---|---|
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
transactionCategoryType | Enum | Represents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions. |
transactionModeType | P or N | Mode of the transaction.
|
memo | String (255) | Description of the transaction. Returned in the response. |
isPartialAuthorization | Boolean; 0 - disabled, 1 - enabled; default = 0 | Indicates whether partial authorization is enabled. See integration notes for more information. |
Authorize Customer Billing Fields
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
countryCode | String (2) | The country of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
Authorize Cross-Reference Fields
Name | Value or Format | Description |
---|---|---|
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
itemCode | String (60) | Identifier of a purchased product or service within your system or platform. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
userCode | String (60) | Identifier of a user supplied by a submitter that initiates the API call. |
Authorize Extended Logic
Name | Value or Format | Description |
---|---|---|
sequenceNumber | Integer | Sequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments onlytransactionCategory= I or R . |
sequenceCount | Integer | Total number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only.transactionCategory= I |
settlementDelay | Integer | Period for which transaction settlement is delayed. |
settlementGroupCode | String(60) | Identifier of a settlement group. |
subscriptionCode | Long | Code of a subscription to a processing bank. See integration notes for more information. |
format | Enum | Defines what resource is going to be received within an offline callback. See integration notes for more information. |
items | List | List of items included in the transaction. The items parameter follows our subrecord format explained here.
For Level II transactions use this list of subrecord items |
Authorize Level II Parameters (credit card only)
Name | Value or Format | Description |
---|---|---|
orderCode | String(17) | Unique identifier of an order within a submitter's system. See integration notes for more information. |
shippingAmount | Integer | Amount of shipping and handling fees charged for an order delivery. See integration notes for more information. |
dutyAmount | Integer | Amount of a duty (import tax) charged on the order/transaction. See integration notes for more information. |
taxAmount | Integer | Tax amount charged on the order/transaction. Included in the total amount. See integration notes for more information. |
taxRate | Integer | Tax rate charged on the order/transaction. See integration notes for more information. implied 2 decimal places (e.g. 150 = 1.5%; 1000 = 10%) |
taxIndicator | Enum | Defines how taxes are handled for the transaction. See integration notes for more information. |
customerAccountTaxId | String(13) | Tax ID of a customer associated with the order/transaction. See integration notes for more information. |
Authorize Level III Parameters (credit card only)
Name | Value or Format | Description |
---|---|---|
shippingOriginZipCode | String(10) | ZIP-code associated with an address from which an order is shipped. See integration notes for more information. |
discountAmount | Integer | Discount amount applied to the order/transaction. See integration notes for more information. |
taxInvoiceCode | String(15) | Tax invoice number associated with the order/transaction. See integration notes for more information. |
localTaxAmount | Integer | Amount of a local (city, country, etc.) tax charged on the order/transaction. See integration notes for more information. |
localTaxIndicator | Enum | Defines how a local tax is handled. See integration notes for more information. |
nationalTaxAmount | Integer | Amount of a national/federal tax charged on the order/transaction. See integration notes for more information. |
nationalTaxIndicator | Enum | Defines how a national/federal tax is handled. See integration notes for more information. |
orderDate | Date | Date of an order placement. See integration notes for more information. |
commodityCode | String(4) | Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information. |
items | List | List of items included in the transaction. The items parameter follows our subrecord format explained here.
For Level II transactions use this list of subrecord items |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=sale-auth" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionIndustryType=RE" \
-d "transactionCode=0000000001" \
-d "amount=5000" \
-d "holderType=P" \
-d "holderName=John+Smith" \
-d "street=12+Main+St" \
-d "city=Denver" \
-d "state=CO" \
-d "zipCode=30301" \
-d "accountType=R" \
-d "accountNumber=5499740000000057" \
-d "accountAccessory=0422" \
-d "customerAccountCode=0000000001" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=sale-auth"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&transactionCode=0000000001"
+ "&amount=5000"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&accountType=R"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&customerAccountCode=0000000001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'sale-auth',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'transactionCode'=>'0000000001',
'amount'=>'5000',
'holderType'=>'P',
'holderName'=>'John+Smith',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'accountType'=>'R',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'customerAccountCode'=>'0000000001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=sale-auth"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&transactionCode=0000000001"
+ "&amount=5000"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&accountType=R"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&customerAccountCode=0000000001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=sale-auth"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&transactionCode=0000000001"
postData = postData + "&amount=5000"
postData = postData + "&holderType=P"
postData = postData + "&holderName=John+Smith"
postData = postData + "&street=12+Main+St"
postData = postData + "&city=Denver"
postData = postData + "&state=CO"
postData = postData + "&zipCode=30301"
postData = postData + "&accountType=R"
postData = postData + "&accountNumber=5499740000000057"
postData = postData + "&accountAccessory=0422"
postData = postData + "&customerAccountCode=0000000001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'sale-auth',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'transactionCode'=>'0000000001',
'amount'=>'5000',
'holderType'=>'P',
'holderName'=>'John+Smith',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'accountType'=>'R',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'customerAccountCode'=>'0000000001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'sale-auth',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionIndustryType':'RE',
'transactionCode':'0000000001',
'amount':'5000',
'holderType':'P',
'holderName':'John+Smith',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'accountType':'R',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'customerAccountCode':'0000000001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'sale-auth',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionIndustryType=>'RE',
transactionCode=>'0000000001',
amount=>'5000',
holderType=>'P',
holderName=>'John+Smith',
street=>'12+Main+St',
city=>'Denver',
state=>'CO',
zipCode=>'30301',
accountType=>'R',
accountNumber=>'5499740000000057',
accountAccessory=>'0422',
customerAccountCode=>'0000000001'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'sale-auth',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionIndustryType':'RE',
'transactionCode':'0000000001',
'amount':'5000',
'holderType':'P',
'holderName':'John+Smith',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'accountType':'R',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'customerAccountCode':'0000000001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
Endpoint: POST:https://sandbox-secure.zift.io/gates/xurl
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:sale-auth
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
amount:100
accountType:C
transactionIndustryType:RE
accountNumber:1234567
accountAccessory:324377516
csc:123
holderName:Test Transaction
street:41 E 300 S
city:Spanish Fork
state:UT
zipCode:84663
countryCode:US
phone:8774561382
email:tstark@zift.io
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | sale-auth | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
accountType | Indicates the accountType used in the transaction. If present in the request it will be returned in the response. | |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
holderName | String (150) | Name of the card holder or bank account owner. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
amount | Integer (in cents) | Specifies the total authorized amount. Always returned in the response. |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
cashbackAmount | Integer (in cents) | cashbackAmount used in the transaction. |
taxAmount | Integer (in cents) | Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response. |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
requestId | String (40) | Identifier of the API request. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
splits | List | List of split payment scenarios included in the transaction. ex:(accountId=20011;transactionId=S10001) |
items | List | List of items included in the transaction. |
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
Capture an Authorized Amount
The table below lists the parameters to capture funds that have previously been authorized on a customers card. If a capture operation is never performed on a previously authorized card the sale-auth
transaction will automatically be voided within the system. Authorizations typically last for 7 days but can vary depending on the cardholders issuing bank.
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | capture | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
Capture Transaction Fields
Name | Value or Format | Description |
---|---|---|
transactionId | Long | Required Unique identifier of the transaction within Zift. Returned in the original transaction response. |
amount | Integer (in cents) | Amount of the transaction that is going to be captured. By default it is equal to the total amount of the original transaction but can be set to a lower value for partial capture.
Note: If you are capturing a transaction with a tip amount you will need to add the tip amount to the original sale-auth amount. For example if the original sale-auth was $10.00 and the tip is $1.00 your capture amount should be $11.00. You will then list the specific tip amount ($1.00) in the tipAmount parameter. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
settlementDelay | Integer | Period for which transaction settlement is delayed. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
tipAmount | Integer (in cents) | For restaurant industry only. Amount of tips.
Note: In order to capture a sale-auth transaction with a tipAmount you must run the original transaction with a transactionIndustryType=RS for restaurant. |
tipRecipientCode | String(15) | Unique identifier of a person within your organization that is going to receive tips. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=capture" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionId=123456" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=capture"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'capture',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=capture"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=capture"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionId=123456"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'capture',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'capture',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'capture',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionId=>'123456'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'capture',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
Endpoint: POST: https://sandbox-secure.zift.io/gates/xurl?
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:capture
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
transactionId:{{transactionId}}
amount:100
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | capture | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
remainingAmount | Integer (in cents) | Remaining amount of the original transaction that has not been voided or refunded back. The value of 0 indicates that a full void or refund has been issued on the transaction. |
taxAmount | Integer (in cents) | Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response. |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String(60) | originalTransactionCode used in the transaction. If present in the request it will be returned in the response. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
terminalMessage | String (100) | Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information. |
Refund or Void a Transaction
If you have a transaction that needs to be reversed but can no longer be voided because it has been settled you would use the refund
request. If you have a transaction that needs to be reversed but has not settled use the void
request. Below is an example of a basic void and refund request.
Name | Value or Format | Description |
---|---|---|
requestType | void or refund | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
transactionId | Long | Required Unique identifier of the transaction within Zift. Always present in the response. |
amount | Integer (in cents) | For partial voids/refunds only. Amount of the transaction that is going to be voided or refunded. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
voidReasonCode | Enum | Defines a reason why the void is issued. Click here for possible values. |
userCode | String (60) | Identifier of a user supplied by a submitter that initiates the API call. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=refund" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionId=123456" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=refund"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'refund',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=refund"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=refund"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionId=123456"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'refund',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'refund',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'refund',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionId=>'123456'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'refund',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
Endpoint: POST:https://sandbox-secure.zift.io/gates/xurl?
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:void or refund
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
transactionId:{{transactionId}}
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | void or refund | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
remainingAmount | Integer (in cents) | Remaining amount of the original transaction that has not been voided or refunded back. The value of 0 indicates that a full void or refund has been issued on the transaction. |
voidAmount | Integer (in cents) | Amount of void associated with the transaction. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
Credit
Use this operation to process an ACH credit transaction and send money to a client, customer or vendors bank account.
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | credit | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
Credit Account Information
Name | Value or Format | Description |
---|---|---|
accountType | C or S | Specifies the payment method to be used with this transaction, For ACH transactions you can indicate a checking account (C ) or savings account (S ). |
accountNumber | String (20) | Required Bank account number. |
accountAccessory | String (10) | Required Bank routing number. |
token | String (40) | The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Required Name of the card holder or bank account owner. |
holderBirthdate | Date (yyyyMMdd) | Birthdate of a payment card or bank account holder. |
Credit Transaction Fields
Name | Value or Format | Description |
---|---|---|
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
transactionCategoryType | Enum | Represents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions. |
transactionModeType | P or N | Mode of the transaction.
|
memo | String (255) | Description of the transaction. Returned in the response. |
isPartialAuthorization | Boolean; 0 - disabled, 1 - enabled; default = 0 | Indicates whether partial authorization is enabled. See integration notes for more information. |
Credit Billing Address Fields
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
countryCode | String (2) | The country of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
Credit Cross-References Fields
Name | Value or Format | Description |
---|---|---|
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
itemCode | String (60) | Identifier of a purchased product or service within your system or platform. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
userCode | String (60) | Identifier of a user supplied by a submitter that initiates the API call. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=credit" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionIndustryType=RE" \
-d "amount=5000" \
-d "accountType=C" \
-d "holderType=P" \
-d "holderName=John+Smith" \
-d "accountNumber=1234567" \
-d "accountAccessory=324377516" \
-d "street=12+Main+St" \
-d "city=Denver" \
-d "state=CO" \
-d "zipCode=30301" \
-d "customerAccountCode=0000000001" \
-d "transactionCode=0000000001" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=credit"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&amount=5000"
+ "&accountType=C"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&accountNumber=1234567"
+ "&accountAccessory=324377516"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'credit',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'amount'=>'5000',
'accountType'=>'C',
'holderType'=>'P',
'holderName'=>'John+Smith',
'accountNumber'=>'1234567',
'accountAccessory'=>'324377516',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=credit"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&amount=5000"
+ "&accountType=C"
+ "&holderType=P"
+ "&holderName=John+Smith"
+ "&accountNumber=1234567"
+ "&accountAccessory=324377516"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=credit"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&amount=5000"
postData = postData + "&accountType=C"
postData = postData + "&holderType=P"
postData = postData + "&holderName=John+Smith"
postData = postData + "&accountNumber=1234567"
postData = postData + "&accountAccessory=324377516"
postData = postData + "&street=12+Main+St"
postData = postData + "&city=Denver"
postData = postData + "&state=CO"
postData = postData + "&zipCode=30301"
postData = postData + "&customerAccountCode=0000000001"
postData = postData + "&transactionCode=0000000001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'credit',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'amount'=>'5000',
'accountType'=>'C',
'holderType'=>'P',
'holderName'=>'John+Smith',
'accountNumber'=>'1234567',
'accountAccessory'=>'324377516',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'credit',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionIndustryType':'RE',
'amount':'5000',
'accountType':'C',
'holderType':'P',
'holderName':'John+Smith',
'accountNumber':'1234567',
'accountAccessory':'324377516',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'credit',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionIndustryType=>'RE',
amount=>'5000',
accountType=>'C',
holderType=>'P',
holderName=>'John+Smith',
accountNumber=>'1234567',
accountAccessory=>'324377516',
street=>'12+Main+St',
city=>'Denver',
state=>'CO',
zipCode=>'30301',
customerAccountCode=>'0000000001',
transactionCode=>'0000000001'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'credit',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionIndustryType':'RE',
'amount':'5000',
'accountType':'C',
'holderType':'P',
'holderName':'John+Smith',
'accountNumber':'1234567',
'accountAccessory':'324377516',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
Endpoint: POST:https://sandbox-secure.zift.io/gates/xurl
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:credit
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
amount:100
accountType:R
transactionIndustryType:RE
accountNumber:4111111111111111
accountAccessory:0422
csc:123
holderName:Test Transaction
street:41 E 300 S
city:Spanish Fork
state:UT
zipCode:84663
countryCode:US
phone:8774561382
email:tstark@zift.io
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | credit | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
accountType | Indicates the accountType used in the transaction. If present in the request it will be returned in the response. | |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
holderName | String (150) | Name of the card holder or bank account owner. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
amount | Integer (in cents) | Specifies the total authorized amount of the transaction. |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
cashbackAmount | Integer (in cents) | cashbackAmount used in the transaction. |
taxAmount | Integer (in cents) | Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response. |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
requestId | String (40) | Identifier of the API request. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
splits | List | List of split payment scenarios included in the transaction. ex:(accountId=20011;transactionId=S10001) |
items | List | List of items included in the transaction. |
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
providerCscResponseCode | String (3) | CSC response code returned by the payment and acquiring networks. Supports legacy systems. |
Account Verification
An operation used to verify that a credit card or debit card is active and perform AVS verification without actual authorization.
You can also use this operation to verify a routing number is valid and has been entered correctly which can help avoid unnecessary and costly ACH returns.
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | account-verification | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
Account Fields
Name | Value or Format | Description |
---|---|---|
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountNumber | String (20) | Conditional Credit card or bank account number. Note: This field is required unless you are sending track data in the accountData field (listed below). |
accountAccessory | String (10) | Conditional Card expiration date or bank routing number. |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Conditional Name of the card holder or bank account owner. |
csc | String(4) | Card security code (three digits on the back of a payment card). |
Transaction Fields
Name | Value or Format | Description |
---|---|---|
token | String (40) | Conditional The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
Billing Address Fields
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
countryCode | String (2) | The country of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
Account Verification Conditions
token
is used.
Field | Usage |
---|---|
accountNumber | Not used |
accountAccessory | Required |
holderName | Required |
token | Required |
csc | Optional |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=account-verification" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionIndustryType=RE" \
-d "accountAccessory=0422" \
-d "accountNumber=5499740000000057" \
-d "accountType=R" \
-d "transactionCode=0000000001" \
-d "customerAccountCode=0000000001" \
-d "holderName=John+Smith" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=account-verification"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&accountAccessory=0422"
+ "&accountNumber=5499740000000057"
+ "&accountType=R"
+ "&transactionCode=0000000001"
+ "&customerAccountCode=0000000001"
+ "&holderName=John+Smith"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'account-verification',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'accountAccessory'=>'0422',
'accountNumber'=>'5499740000000057',
'accountType'=>'R',
'transactionCode'=>'0000000001',
'customerAccountCode'=>'0000000001',
'holderName'=>'John+Smith',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=account-verification"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionIndustryType=RE"
+ "&accountAccessory=0422"
+ "&accountNumber=5499740000000057"
+ "&accountType=R"
+ "&transactionCode=0000000001"
+ "&customerAccountCode=0000000001"
+ "&holderName=John+Smith"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=account-verification"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&accountAccessory=0422"
postData = postData + "&accountNumber=5499740000000057"
postData = postData + "&accountType=R"
postData = postData + "&transactionCode=0000000001"
postData = postData + "&customerAccountCode=0000000001"
postData = postData + "&holderName=John+Smith"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'account-verification',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionIndustryType'=>'RE',
'accountAccessory'=>'0422',
'accountNumber'=>'5499740000000057',
'accountType'=>'R',
'transactionCode'=>'0000000001',
'customerAccountCode'=>'0000000001',
'holderName'=>'John+Smith',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'account-verification',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionIndustryType':'RE',
'accountAccessory':'0422',
'accountNumber':'5499740000000057',
'accountType':'R',
'transactionCode':'0000000001',
'customerAccountCode':'0000000001',
'holderName':'John+Smith'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'account-verification',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionIndustryType=>'RE',
accountAccessory=>'0422',
accountNumber=>'5499740000000057',
accountType=>'R',
transactionCode=>'0000000001',
customerAccountCode=>'0000000001',
holderName=>'John+Smith'
],
);
print $req->content;
##python_processing_account-verification##
Endpoint: https://sandbox-secure.zift.io/gates/xurl?
Headers: Content-Type=application/x-www-form-urlencoded
Body: x-www-form-urlencoded
requestType:account-verification
userName:{{username-trans-sand}}
password:{{password-trans-sand}}
accountId:{{accountId-sand}}
accountType:R
transactionIndustryType:RE
accountNumber:4111111111111111
accountAccessory:0422
csc:123
holderName:Test Transaction
street:41 E 300 S
city:Spanish Fork
state:UT
zipCode:84663
countryCode:US
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | account-verification | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
terminalId | String (12) | Terminal ID associated with the transaction. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
terminalMessage | String (100) | Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
providerCscResponseCode | String (3) | CSC response code returned by the payment and acquiring networks. Supports legacy systems. |
Authentication
Authentication is used to generate a temporary password for use with the proxynization API. The temporary password from from the authentication
call will be used by the proxynization API to authenticate your
request and return a temporary token to your payment page.
Name | Value or Format | Description |
---|---|---|
requestType | authentication | Specifies the type of operation to be performed. |
userName | String (50) | Name of a user that initiates the API call. |
password | String (32) | Password of a user that initiates the API call. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
contextType | api or proxynization | Defines what API a temporary password will be used for. Allowed Values api indicates standard processing API - defaultproxynization indicates proxynization API |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=authentication" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=authentication"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'authentication',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=authentication"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=authentication"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'authentication',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body##
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'authentication',
'userName':'myUsername',
'password':'myP%40ssword'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})##
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'authentication',
userName=>'myUsername',
password=>'myP%40ssword'
],
);
print $req->content;##
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'authentication',
'userName':'myUsername',
'password':'myP%40ssword'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)on##
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | authentication | Indicates the type of response. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
passwordExpirationDate | Date (yyyyMMddHHmmSS) | The date and time this the temporary password will expire. |
temporaryPassword | String (20) | The system generated temporary password. |
Tokenization
Tokenization allows you to convert a card number or bank account number into a PCI compliant token. As a Level I PCI Compliant platform we store the actual card or bank account number giving you the ability to reference it with a token for future processing. You can use the concepts and tools described below to help reduce your exposure to sensitive data and PCI scope.
Proxynization.js
Our proxynization API is a JavaScript library that can be embedded into your payment pages. This library allows you to generate temporary tokens from your payment page before data is submitted to your system helping to reduce PCI scope.
Proxynization Implementation Overview
- Reference our proxynization.js library on your payment page. Below are production and sandbox links to our proxynization library.
- Production: https://secure.zift.io/services/api.proxynization.js
- Sandbox: https://sandbox-secure.zift.io/services/api.proxynization.js
Note: You may also download and host this library on your server. However, you will be responsible to make sure all library updates have been implemented when Zift updates the proxynization.js library. You can view theChange Log
to see if there are any updates to the proxynization.js library. - Use the
authentication
request to receive a temporary password which will be valid for 10 minutes. Make sure you use the correctcontextType
when makeing the authentication call. Use: contextType=proxynization - Submit the proxynization request with your previously received temporary password to get a proxy number;
- Use the returned proxy number in the
accountNumber
field for subsequentsale
,credit
andtokenization
requests.
See the workflow section below implementation details.
Security Constraint
JavaScript by nature has security limitations. Since it is a client-side language its source code is entirely accessible.
Therefore, it is impossible to secure passwords within JavaScript.
Consequently, you should never use javascript to directly make calls to the Zift API endpoints such as sale
or sale-auth
.
Proxynization.js Workflow
-
Include
api.proxynization.js
Copy the following lines and paste them to your HTML page. This will enable the proxynization functionality within your application.
<script type="text/javascript" src="https://[server-name]/services/api.proxynization.js"></script>
-
Implement the callback function.
The callback function will be invoked once the proxynization response is returned from our system. We generate a function call which invokes the pre-defined callback function and passes the proxynization results into it. Post-proxynization logic (such as submission of the form to your server) should be included in the callback function.
The callback function must declare three parameters:
responseCode
,responseMessage
andproxyNumber
:Parameter Description responseCode Zift generated response code. Possible values are listed in the table. responseMessage Zift generated response message, associated with the responseCode
value. Possible values are listed in the table.proxyNumber Temporary proxy number. Callback function example:
function clientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('accountNumber').value = proxyNumber; paymentForm.submit(); } else{ alert(responseMessage); return false; }}
-
Make the
authentication
request.Retrieve the temporary password from the
authentication
call response and assign it to the Proxynization API object. To obtain the temporary password, submit anauthentication
request, using your credentials:https://sandbox-secure.zift.io/gates/xurl?requestType=authentication&userName=*****&password=*****&contextType=proxynization
Server-side code example:
ProxynizationAPI.password = '<?php echo (getPass()); ?>';
Final JavaScript code example:
(ProxynizationAPI.password = '7e850d1d-0f94-4281-92f9-2c2c8bc8f70e';)
Note: The temporary password (such as 7e850d1d-0f94-4281-92f9-2c2c8bc8f70e) is dynamically obtained from Zift every time when the page is refreshed. It is valid for 10 minutes and can only be used once. -
Implement your payment form and insert a proxynization call within the form's submit action.
process()
function takes two parameters:- The first parameter can either be the value of account number, or it can be the ID of the component from which the value can be obtained. If the value of the parameter starts with a hashtag (#) symbol, the first parameter is assumed to be the ID of the component. If a hashtag is not present, the first parameter is assumed to be an account number.
- The second parameter is the name of the callback function (previously implemented, see step 2), that will be called when the proxynization call is completed.
Proxynization call example:
<input type="button" onClick="ProxynizationAPI.process('#accountNumber','clientCallback');"/>
How to use the proxy number
The proxynization call is used to generate a temporary token (proxy number) for a credit ard or bank account number. The resulting temporary token can be substituted
for the actual credit card or bank account number in various API calls such as sale
or sale-auth
.
Heads up!
To indicate that the proxy number is being used within the accountNumber
field its value should be preceded by an asterisk (*) accountNumber=*proxynumber
.
Create a Token
requestType=tokenization
The tokenization
request allows you to submit a card number or bank account directly to our servers for secure storage. We will return a token which can be used to reference the card or bank account for future API calls.
By default we tokenize all credit card and bank account data sent to our servers. This allows you to easily save payment methods for your customers. The tokenization
request can be used as a standalone operation for tokenization only.
The tokenization call is typically used to help your customers manage the payment methods (card on file) in your system.
Name | Value or Format | Description |
---|---|---|
requestType | tokenization | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountNumber | String (20) | Required Credit card or bank account number. Note: This field is required unless you are sending track data in the accountData field (listed below). |
accountAccessory | String (10) | Required Card expiration date or bank routing number. |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Name of the card holder or bank account owner. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
verificationMode | Enum | Defines how pre-tokenization verification is handled.NN Indicates that pre-tokenization verification of the payment card or bank account is not performed.PF Indicates that pre-tokenization verification of the payment card or bank account is performed by a processor. If verification fails, tokenization request is declined. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
Create a Token Billing Address Information
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
countryCode | String (2) | The country of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=tokenization" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "accountType=R" \
-d "accountNumber=5499740000000057" \
-d "accountAccessory=0422" \
-d "transactionCode=0000000001" \
-d "holderName=Tony+Stark" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=tokenization"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&accountType=R"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&transactionCode=0000000001"
+ "&holderName=Tony+Stark"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'tokenization',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'accountType'=>'R',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'transactionCode'=>'0000000001',
'holderName'=>'Tony+Stark',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=tokenization"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&accountType=R"
+ "&accountNumber=5499740000000057"
+ "&accountAccessory=0422"
+ "&transactionCode=0000000001"
+ "&holderName=Tony+Stark"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=tokenization"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&accountType=R"
postData = postData + "&accountNumber=5499740000000057"
postData = postData + "&accountAccessory=0422"
postData = postData + "&transactionCode=0000000001"
postData = postData + "&holderName=Tony+Stark"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'tokenization',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'accountType'=>'R',
'accountNumber'=>'5499740000000057',
'accountAccessory'=>'0422',
'transactionCode'=>'0000000001',
'holderName'=>'Tony+Stark',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'tokenization',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'accountType':'R',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'transactionCode':'0000000001',
'holderName':'Tony+Stark'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'tokenization',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
accountType=>'R',
accountNumber=>'5499740000000057',
accountAccessory=>'0422',
transactionCode=>'0000000001',
holderName=>'Tony+Stark'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'tokenization',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'accountType':'R',
'accountNumber':'5499740000000057',
'accountAccessory':'0422',
'transactionCode':'0000000001',
'holderName':'Tony+Stark'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)##
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | tokenization | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
accountType | Indicates the accountType used in the transaction. If present in the request it will be returned in the response. | |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
holderName | String (150) | Name of the card holder or bank account owner. |
requestId | String (40) | Identifier of the API request. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
terminalMessage | String (100) | Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information. |
Charge With a Token
To process a transaction using a token follow the same method used in the Charge A Card or Charge A Bank Account operations and replace the accountNumber
parameter with token
.
Name | Value or Format | Description |
---|---|---|
requestType | sale , sale-auth | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountAccessory | String (10) | Required Card expiration date or bank routing number. |
token | String (40) | Required The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
holderName | String (150) | Required Name of the card holder or bank account owner. |
Charge Using a Token - Customer Billing Fields
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
countryCode | String (2) | The country of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=sale" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "amount=5000" \
-d "accountType=R" \
-d "transactionIndustryType=RE" \
-d "holderType=P" \
-d "holderName=Tony+Stark" \
-d "accountNumber=" \
-d "accountAccessory=0422" \
-d "street=12+Main+St" \
-d "city=Denver" \
-d "state=CO" \
-d "zipCode=30301" \
-d "customerAccountCode=0000000001" \
-d "transactionCode=0000000001" \
-d "token=MC10000000254965411111 " \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=sale"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&amount=5000"
+ "&accountType=R"
+ "&transactionIndustryType=RE"
+ "&holderType=P"
+ "&holderName=Tony+Stark"
+ "&accountNumber="
+ "&accountAccessory=0422"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
+ "&token=MC10000000254965411111 "
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'sale',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'amount'=>'5000',
'accountType'=>'R',
'transactionIndustryType'=>'RE',
'holderType'=>'P',
'holderName'=>'Tony+Stark',
'accountNumber'=>'',
'accountAccessory'=>'0422',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
'token'=>'MC10000000254965411111 ',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=sale"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&amount=5000"
+ "&accountType=R"
+ "&transactionIndustryType=RE"
+ "&holderType=P"
+ "&holderName=Tony+Stark"
+ "&accountNumber="
+ "&accountAccessory=0422"
+ "&street=12+Main+St"
+ "&city=Denver"
+ "&state=CO"
+ "&zipCode=30301"
+ "&customerAccountCode=0000000001"
+ "&transactionCode=0000000001"
+ "&token=MC10000000254965411111 "
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=sale"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&amount=5000"
postData = postData + "&accountType=R"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&holderType=P"
postData = postData + "&holderName=Tony+Stark"
postData = postData + "&accountNumber="
postData = postData + "&accountAccessory=0422"
postData = postData + "&street=12+Main+St"
postData = postData + "&city=Denver"
postData = postData + "&state=CO"
postData = postData + "&zipCode=30301"
postData = postData + "&customerAccountCode=0000000001"
postData = postData + "&transactionCode=0000000001"
postData = postData + "&token=MC10000000254965411111 "
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'sale',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'amount'=>'5000',
'accountType'=>'R',
'transactionIndustryType'=>'RE',
'holderType'=>'P',
'holderName'=>'Tony+Stark',
'accountNumber'=>'',
'accountAccessory'=>'0422',
'street'=>'12+Main+St',
'city'=>'Denver',
'state'=>'CO',
'zipCode'=>'30301',
'customerAccountCode'=>'0000000001',
'transactionCode'=>'0000000001',
'token'=>'MC10000000254965411111 ',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'sale',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'amount':'5000',
'accountType':'R',
'transactionIndustryType':'RE',
'holderType':'P',
'holderName':'Tony+Stark',
'accountNumber':'',
'accountAccessory':'0422',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001',
'token':'MC10000000254965411111 '
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'sale',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
amount=>'5000',
accountType=>'R',
transactionIndustryType=>'RE',
holderType=>'P',
holderName=>'Tony+Stark',
accountNumber=>'',
accountAccessory=>'0422',
street=>'12+Main+St',
city=>'Denver',
state=>'CO',
zipCode=>'30301',
customerAccountCode=>'0000000001',
transactionCode=>'0000000001',
token=>'MC10000000254965411111 '
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'sale',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'amount':'5000',
'accountType':'R',
'transactionIndustryType':'RE',
'holderType':'P',
'holderName':'Tony+Stark',
'accountNumber':'',
'accountAccessory':'0422',
'street':'12+Main+St',
'city':'Denver',
'state':'CO',
'zipCode':'30301',
'customerAccountCode':'0000000001',
'transactionCode':'0000000001',
'token':'MC10000000254965411111 '
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | Enum | Indicates the type of response. |
accountId | String (12) | Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
token | String (40) | The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderName | String (150) | Name of the card holder or bank account owner. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
cashbackAmount | Integer (in cents) | cashbackAmount used in the transaction. |
feeAmount | Integer | Contains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance. Note: Based on merchant configurations, actual processing/interchange fee will be deducted either from the amount remitted to the organization beneficiary or from the service fee amount of the submitter. |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Returned in the original transaction response. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
requestId | String (40) | Identifier of the API request. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. |
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
providerCscResponseCode | String (3) | CSC response code returned by the payment and acquiring networks. Supports legacy systems. |
items | List | List of items included in the transaction. ex: (code=001;itemId=I123;splits=(accountId=20011;trans actionId=S10001)(accountId=20012;transacti onId=S10002)) |
Get a Token Profile
requestType=get-profile
Use this operation to retrieve additional card holder data stored with a token for a card or bank account you have tokenized.
get-profile
only works if profiling is activated on the account. Please contact us if this is a feature you would like to use.get-profile
only works for cards that have been tokenized after we have activated profiling on your account.Name | Value or Format | Description |
---|---|---|
requestType | get-profile | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
token | String (40) | Required The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=get-profile" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "token=XVC01P0000000084632147254611114111001111" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=get-profile"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&token=XVC01P0000000084632147254611114111001111"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'get-profile',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'token'=>'XVC01P0000000084632147254611114111001111',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=get-profile"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&token=XVC01P0000000084632147254611114111001111"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=get-profile"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&token=XVC01P0000000084632147254611114111001111"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'get-profile',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'token'=>'XVC01P0000000084632147254611114111001111',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'get-profile',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'token':'XVC01P0000000084632147254611114111001111'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'get-profile',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
token=>'XVC01P0000000084632147254611114111001111'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'get-profile',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'token':'XVC01P0000000084632147254611114111001111'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)#
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | get-profile | Indicates the type of response. |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
holderName | String (150) | Name of the card holder or bank account owner. |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
state | String (2) | The state of the card holder. |
zip | Y - yes, N - no; default - Y | Indicates whether an export response file is returned as an archived ZIP file or a .csv file. |
Terminal Cloud
Terminal Cloud: Overview
Zift's terminal cloud allows you to connect one or more terminals to your Point of Sale system without directly integrating with the terminal itself. When you order a terminal from Zift, it comes with Zift's terminal application already installed. When turned on, the terminal will automatically connect and register with Zift's terminal cloud. At this point the terminal is ready to accept instructions from your Point of Sale system and payments from the customer.
Connecting to a terminal is as simple as running a sale transaction. To initiate a transaction, your Point of Sale system will make a sale
call to Zift's terminal API (see API endpoints below). The terminal will take over and ask the customer for payment. Once complete, the result of
the transaction will be returned to your original API request.
All typical transaction types are supported by our terminal cloud. Using the terminal cloud you can charge a card, refund, void and under special circumstances perform a credit.
Terminal Cloud API Endpoints
- Production: https://portal.zift.io/terminals/xurl?
- Sandbox: https://sandbox-portal.zift.io/terminals/xurl?
Integration Considerations
Only terminals loaded with Zift terminal application may use the Zift terminal cloud. If you have an existing terminal you may purchase a new terminal from Zift. Zift has both signature (Ingenico ICT 250) and non-signature terminals (Ingenico ISC 250) available.
Transactions must be initiated from your Point of Sale system. You cannot original transactions at the terminal when in terminal cloud configuration.
When integrating with the terminal API make sure your server configuration allows enough time to complete the transactions. There are a number of factors that can affect response times from the terminal. For example, the local network may be running slow or the customer may not be ready to swipe their card. We recommend allowing up to 180 seconds for a given HTTP request to complete. If your server terminates the connection due to 'time out' before it is completed, the transaction will complete but your Point of Sale system will not be informed of the transaction result.
Terminal Cloud: Sale / Sale-auth
The Sale
and Sale-auth
API calls will tell the terminal to ask for payment. When the sale
API call is issued, the terminal
screen will ask the customer to confirm the amount. Once confirmed, the customer will swipe or dip (EMV) their card. The terminal will then display the transaction
result. Once all terminal operations are complete, the terminal cloud will return your original API request with the result of the transaction.
sale-auth
API call do not automatically settle. You must 'capture' your sale-auth
transactions using Capture
if you want the transaction to go through to settlement.sale-auth
will be automatically voided after the transaction cut-off
time. If you need to capture transactions after your daily cut-off time contact support@zift.io
to make sure your merchant account has been adusted accordingly.Name | Value or Format | Description |
---|---|---|
requestType | sale | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
transactionIndustryType | Enum | Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
taxAmount | Integer | Tax amount charged on an item. Amount in cents. |
receiptMode | Enum | Value identifying how the transaction receipt is delivered to the customer. N = no receipt is printed out E = receipt is sent to a customer via an e-maill T = receipt is printed out via the terminal P = receipt is printed out via a POS |
ticketId | String (12) | Unique identifier of a ticket provided by the terminal. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
holderName | String (150) | Name of the card holder or bank account owner. |
String (100) | Email associated with a payment card or bank account holder. | |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
holderVerificationModeType | Enum | Defines how a payment card is verified. |
isPartialAuthorization | Boolean; 0 - disabled, 1 - enabled; default = 0 | Indicates whether partial authorization is enabled. See integration notes for more information. |
settlementGroupCode | String(60) | Identifier of a settlement group. |
processingMode | Enum | Defines how the transaction is processed. See integration notes for more information. |
memo | String (255) | Description of the transaction. Returned in the response. |
Name | Value or Format | Description |
---|---|---|
ticketNumber | String (20) | External Cross-Reference. Unique identifier of a ticket from the integrator's Point of Sale system. |
ticketNumber | String (20) | External Cross-Reference. Unique identifier of a ticket from the integrator's Point of Sale system. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
laneCode | String(10) | Identifier of a lane associated with the transaction. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=sale" \
-d "userName=username" \
-d "password=password" \
-d "accountId=12456789" \
-d "terminalId=001" \
-d "amount=2000" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=sale"
+ "&userName=username"
+ "&password=password"
+ "&accountId=12456789"
+ "&terminalId=001"
+ "&amount=2000"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'sale',
'userName'=>'username',
'password'=>'password',
'accountId'=>'12456789',
'terminalId'=>'001',
'amount'=>'2000',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=sale"
+ "&userName=username"
+ "&password=password"
+ "&accountId=12456789"
+ "&terminalId=001"
+ "&amount=2000"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=sale"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=12456789"
postData = postData + "&terminalId=001"
postData = postData + "&amount=2000"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'sale',
'userName'=>'username',
'password'=>'password',
'accountId'=>'12456789',
'terminalId'=>'001',
'amount'=>'2000',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'sale',
'userName':'username',
'password':'password',
'accountId':'12456789',
'terminalId':'001',
'amount':'2000'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'sale',
userName=>'username',
password=>'password',
accountId=>'12456789',
terminalId=>'001',
amount=>'2000'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'sale',
'userName':'username',
'password':'password',
'accountId':'12456789',
'terminalId':'001',
'amount':'2000'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | sale | Indicates the type of response. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
entryModeType | Enum | Defines how payment information is entered. See integration notes for more information. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. If empty no cycle was opened. |
entryMediumType | Enum | entryMediumType used in the transaction. |
holderVerificationModeType | Enum | holderVerificationModeType used in the transaction. |
holderName | String (150) | Name of the card holder or bank account owner. |
amount | Integer (in cents) | Specifies the total authorized amount of the transaction. |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
accountType | Indicates the accountType used in the transaction. If present in the request it will be returned in the response. | |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
accountId | String (12) | Indicates the accountId |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
providerCscResponseCode | String (3) | CSC response code returned by the payment and acquiring networks. Supports legacy systems. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
terminalMessage | String (100) | Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information. |
Terminal Cloud: Capture
The capture
call allows you to capture a previous sale-auth
transaction. When you call capture
, the terminal
screen will indicate the transaction has been capture. You do not need to interact with the terminal as this is just informational. When the capture
is complete the API
response will be delivered to you. Keep track of your transactionId
from your previous sale-auth
call. You will need it to complete the capture.
sale-auth
transactions will be automatically voided after the transaction cut-off
time. If you need to capture transactions after the standard daily cut-off time contact support@zift.io
to make sure your merchant account has been adjusted accordingly.Name | Value or Format | Description |
---|---|---|
requestType | capture | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
transactionId | Long | Required Unique identifier of the transaction within Zift. Returned in the original transaction response. |
receiptMode | Enum | Value identifying how the transaction receipt is delivered to the customer. N = no receipt is printed out E = receipt is sent to a customer via an e-maill T = receipt is printed out via the terminal P = receipt is printed out via a POS |
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
amount | Integer (in cents) | Specifies the total authorized amount of the transaction. |
tipAmount | Integer (in cents) | For restaurant industry only. Amount of tips.
Note: In order to capture a sale-auth transaction with a tipAmount you must run the original transaction with a transactionIndustryType=RS for restaurant. |
tipRecipientCode | String(15) | Unique identifier of a person within your organization that is going to receive tips. |
String (100) | Email associated with a payment card or bank account holder. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=capture" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456798" \
-d "terminalId=001" \
-d "transactionId=987654312" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=capture"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456798"
+ "&terminalId=001"
+ "&transactionId=987654312"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'capture',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456798',
'terminalId'=>'001',
'transactionId'=>'987654312',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=capture"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456798"
+ "&terminalId=001"
+ "&transactionId=987654312"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=capture"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456798"
postData = postData + "&terminalId=001"
postData = postData + "&transactionId=987654312"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'capture',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456798',
'terminalId'=>'001',
'transactionId'=>'987654312',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'capture',
'userName':'username',
'password':'password',
'accountId':'123456798',
'terminalId':'001',
'transactionId':'987654312'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'capture',
userName=>'username',
password=>'password',
accountId=>'123456798',
terminalId=>'001',
transactionId=>'987654312'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'capture',
'userName':'username',
'password':'password',
'accountId':'123456798',
'terminalId':'001',
'transactionId':'987654312'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | capture | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
terminalId | String (32) | terminalId used in the transaction request. |
userCode | String (60) | Identifier of a user supplied by a submitter that initiates the API call. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
remainingAmount | Integer (in cents) | Remaining amount of the original transaction that has not been voided or refunded back. The value of 0 indicates that a full void or refund has been issued on the transaction. |
String (100) | Email associated with a payment card or bank account holder. | |
tipAmount | Integer (in cents) | For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response. |
responseCode | String (5) | Response code returned by the terminal. |
responseMessage | String (255) | Response message returned by the terminal |
Terminal Cloud: Void
The void
call allows you to void a previous transaction. You can run a void against any type of transaction such as
sale
, sale-auth
, credit
,
etc. When you call void
the terminal will indicate the transaction has been voided and will automatically print a receipt if your terminal
is equipped with this feature.
sale
or sale-auth
transaction after the cut-off time, it will automatically be converted to a refund
.Name | Value or Format | Description |
---|---|---|
requestType | void | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
accountId | integer | Required accountId used in the original transaction request. |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
transactionId | Long | Required Unique identifier of the transaction within Zift. Always present in the response. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
receiptMode | Enum | Value identifying how the transaction receipt is delivered to the customer. N = no receipt is printed out E = receipt is sent to a customer via an e-maill T = receipt is printed out via the terminal P = receipt is printed out via a POS |
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
voidReasonCode | Enum | Defines a reason why the void is issued. Click here for possible values. |
String (100) | Email associated with a payment card or bank account holder. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=void" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456789" \
-d "terminalId=001" \
-d "transactionId=987654321" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=void"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&transactionId=987654321"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'void',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'transactionId'=>'987654321',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=void"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&transactionId=987654321"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=void"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456789"
postData = postData + "&terminalId=001"
postData = postData + "&transactionId=987654321"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'void',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'transactionId'=>'987654321',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'void',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'transactionId':'987654321'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'void',
userName=>'username',
password=>'password',
accountId=>'123456789',
terminalId=>'001',
transactionId=>'987654321'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'void',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'transactionId':'987654321'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | void | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
terminalId | String (32) | terminalId used in the transaction request. |
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
remainingAmount | Integer (in cents) | Remaining amount of the original transaction that has not been voided or refunded back. The value of 0 indicates that a full void or refund has been issued on the transaction. |
String (100) | Email associated with a payment card or bank account holder. | |
voidReasonCode | Enum | Defines a reason why the void is issued. Click here for possible values. |
responseCode | String (5) | Response code returned by the terminal. |
responseMessage | String (255) | Response message returned by the terminal |
Terminal Cloud: Refund
The refund
call allows you to refund a specified amount against an existing transaction.
Name | Value or Format | Description |
---|---|---|
requestType | refund | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
transactionId | Long | Required Unique identifier of the transaction within Zift. Always present in the response. |
amount | Integer (in cents) | Required Specifies the total amount of the credit in cents (not dollars) ex: $5.00 = 500¢ |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
receiptMode | Enum | Value identifying how the transaction receipt is delivered to the customer. N = no receipt is printed out E = receipt is sent to a customer via an e-maill T = receipt is printed out via the terminal P = receipt is printed out via a POS |
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
String (100) | Email associated with a payment card or bank account holder. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=refund" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456789" \
-d "terminalId=001" \
-d "transactionId=987654312" \
-d "amount=2000" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=refund"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&transactionId=987654312"
+ "&amount=2000"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'refund',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'transactionId'=>'987654312',
'amount'=>'2000',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=refund"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&transactionId=987654312"
+ "&amount=2000"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=refund"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456789"
postData = postData + "&terminalId=001"
postData = postData + "&transactionId=987654312"
postData = postData + "&amount=2000"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'refund',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'transactionId'=>'987654312',
'amount'=>'2000',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'refund',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'transactionId':'987654312',
'amount':'2000'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'refund',
userName=>'username',
password=>'password',
accountId=>'123456789',
terminalId=>'001',
transactionId=>'987654312',
amount=>'2000'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'refund',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'transactionId':'987654312',
'amount':'2000'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | refund | Indicates the type of response. |
accountId | integer | accountId used in the original transaction request. |
terminalId | String (32) | terminalId used in the transaction request. |
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
remainingAmount | Integer (in cents) | Remaining amount of the original transaction that has not been voided or refunded back. The value of 0 indicates that a full void or refund has been issued on the transaction. |
String (100) | Email associated with a payment card or bank account holder. | |
responseCode | String (5) | Response code returned by the terminal. |
responseMessage | String (255) | Response message returned by the terminal |
Terminal Cloud: Credit
The credit
call is similar to a refund
but does not have an original transaction context. Use this call to credit a specified amount the customer's card.
support@zift.io
if you have questions about this feature.Name | Value or Format | Description |
---|---|---|
requestType | credit | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
amount | Integer (in cents) | Required Specifies the total amount of the credit in cents (not dollars) ex: $5.00 = 500¢ |
taxAmount | Integer | Tax amount charged on the order/transaction. Included in the total amount. See integration notes for more information. |
transactionIndustryType | Enum | Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
receiptMode | Enum | Value identifying how the transaction receipt is delivered to the customer. N = no receipt is printed out E = receipt is sent to a customer via an e-maill T = receipt is printed out via the terminal P = receipt is printed out via a POS |
ticketId | String (12) | Unique identifier of a ticket provided by the terminal. |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
userCode | String (60) | Identifier of a user supplied by the integrator's Point of Sale system. |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
holderName | String (150) | Name of the card holder or bank account owner. |
String (100) | Email associated with a payment card or bank account holder. | |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
holderVerificationModeType | Enum | Defines how a payment card is verified. |
isPartialAuthorization | Boolean; 0 - disabled, 1 - enabled; default = 0 | Indicates whether partial authorization is enabled. See integration notes for more information. |
settlementGroupCode | String(60) | Identifier of a settlement group. |
processingMode | Enum | Defines how the transaction is processed. See integration notes for more information. |
memo | String (255) | Description of the transaction. Returned in the response. |
Name | Value or Format | Description |
---|---|---|
ticketNumber | String (20) | External Cross-Reference. Unique identifier of a ticket from the integrator's Point of Sale system used in the original request. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
laneCode | String(10) | Identifier of a lane associated with the transaction. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=credit" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456789" \
-d "terminalId=001" \
-d "amount=2000" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=credit"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&amount=2000"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'credit',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'amount'=>'2000',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=credit"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456789"
+ "&terminalId=001"
+ "&amount=2000"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=credit"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456789"
postData = postData + "&terminalId=001"
postData = postData + "&amount=2000"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'credit',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456789',
'terminalId'=>'001',
'amount'=>'2000',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'credit',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'amount':'2000'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'credit',
userName=>'username',
password=>'password',
accountId=>'123456789',
terminalId=>'001',
amount=>'2000'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'credit',
'userName':'username',
'password':'password',
'accountId':'123456789',
'terminalId':'001',
'amount':'2000'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | credit | Indicates the type of response. |
approvalCode | String (100) | Authorization number given by a cardholder's bank account. Often shown on a credit card receipt. |
providerTransactionId | String (50) | Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
responseCode | String (5) | Response code returned by the terminal. |
entryModeType | Enum | Defines how payment information is entered. See integration notes for more information. |
cscResponseCode | String (1) | CSC response code if CSC has been provided. |
Terminal Cloud: Download Resource (Signature)
The downlaod-resource
call allows you to download a signature file associated with a specific transaction. This call will only work
with transactions that have been swiped through a signature capable terminal. Transactions run through the standard API or though a non-signature
terminals will return an error indicating the signature is not available.
Note: Unlike all other terminal related calls, this API call does not use the terminal API endpoint. Instead you must use the processing API endpoints
- Production:
https://secure.zift.io/gates/xurl?
- Sandbox:
https://sandbox-secure.zift.io/gates/xurl?
Name | Value or Format | Description |
---|---|---|
requestType | download-resource | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | integer | Required accountId used in the original transaction request. |
transactionId | Long | Required Unique identifier of the transaction that contains the signature. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=download-resource" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456" \
-d "transactionId=98765432" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=download-resource"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&transactionId=98765432"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'download-resource',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'transactionId'=>'98765432',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=download-resource"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&transactionId=98765432"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=download-resource"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456"
postData = postData + "&transactionId=98765432"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'download-resource',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'transactionId'=>'98765432',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'download-resource',
'userName':'username',
'password':'password',
'accountId':'123456',
'transactionId':'98765432'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'download-resource',
userName=>'username',
password=>'password',
accountId=>'123456',
transactionId=>'98765432'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'download-resource',
'userName':'username',
'password':'password',
'accountId':'123456',
'transactionId':'98765432'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | download-resource | Indicates the type of response. |
accountId | integer | accountId used in the original transaction request. |
terminalId | String (12) | Terminal ID associated with the transaction. |
content | String | The content parameter is a base64 encoded text block that represents the signature image. The image format is png. To view the image, base64 decode the text block in the content variable. The result will be the original image in png format.
|
Terminal Cloud: Capture Signature
The capture-signature
call allows you capture a signature form signature capable terminals without running a transaction.
This feature can be used in other work flows such as digitally signing documents at the Point of Sale.
Name | Value or Format | Description |
---|---|---|
requestType | capture-signature | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | integer | Required accountId used in the original transaction request. |
terminalId | String (12) | Required Terminal ID associated with the transaction. |
buttonCancel | String (15) | Label for the terminal cancel button. This allows you to set the button text on terminals such as the Ingenico ISC-250 . Although this parameter will allow for 15 characters, the actual display size will depend on the terminal you are using. |
buttonOk | String (15) | Label for the terminal OK/Confirm button. This allows you to set the button text on terminals such as the Ingenico ISC-250 . Although this parameter will allow for 15 characters,the actual display size will depend on the terminal you are using. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=capture-signature" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456" \
-d "terminalId=001" \
-d "buttonCancel=Decline" \
-d "buttonOk=Accept" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=capture-signature"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&terminalId=001"
+ "&buttonCancel=Decline"
+ "&buttonOk=Accept"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'capture-signature',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'terminalId'=>'001',
'buttonCancel'=>'Decline',
'buttonOk'=>'Accept',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=capture-signature"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&terminalId=001"
+ "&buttonCancel=Decline"
+ "&buttonOk=Accept"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=capture-signature"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456"
postData = postData + "&terminalId=001"
postData = postData + "&buttonCancel=Decline"
postData = postData + "&buttonOk=Accept"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'capture-signature',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'terminalId'=>'001',
'buttonCancel'=>'Decline',
'buttonOk'=>'Accept',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'capture-signature',
'userName':'username',
'password':'password',
'accountId':'123456',
'terminalId':'001',
'buttonCancel':'Decline',
'buttonOk':'Accept'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'capture-signature',
userName=>'username',
password=>'password',
accountId=>'123456',
terminalId=>'001',
buttonCancel=>'Decline',
buttonOk=>'Accept'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'capture-signature',
'userName':'username',
'password':'password',
'accountId':'123456',
'terminalId':'001',
'buttonCancel':'Decline',
'buttonOk':'Accept'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | capture-signature | Indicates the type of response. |
selectedButton | String (1) | Button selected on the terminal
1 = Cancel/Decline (Red) |
accountId | integer | accountId used in the original transaction request. |
terminalId | String (32) | terminalId used in the transaction request. |
image | Image (base64) | Base64 encoded text block representing the signature from the terminal. Base64 decode the text block for the png version of the signature image. |
Terminal Cloud: Show Message
The show-message
call allows you to display a message on the terminal. Your customer can response to those message prompts using
the buttons on the terminal. Responses are returned back to your Point of Sale system via the API response.
Name | Value or Format | Description |
---|---|---|
requestType | show-message | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. When using the terminal API the password is the first 20 characters of your typical API user password . |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (32) | Required Reference to a terminal associated with the API call. |
content | String (255) | Required The content parameter allows you to set a message on the terminal screen. Although this parameter will allow for 255 characters,the actual display size will depend on the terminal you are using. |
button1 | String (15) | Required The button1 parameter allows you to set the button text on confirm button (green). Although this parameter will allow for 15 characters,the actual display size will depend on the terminal you are using. |
button2 | String (15) | The button parameter allows you to set the button text on cancel button (red). Although this parameter will allow for 15 characters,the actual display size will depend on the terminal you are using. |
title | String (64) | The title parameter allows you to set a message on the top of the terminal screen. Although this parameter will allow for 64 characters,the actual display size will depend on the terminal you are using. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/terminals/xurl? \
-d "requestType=show-message" \
-d "userName=username" \
-d "password=password" \
-d "accountId=123456" \
-d "terminalId=001" \
-d "content=Purchase hyperspace bypass permit " \
-d "title=Vogon Inc." \
-d "button1=Yes" \
-d "button2=No" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"&requestType=show-message"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&terminalId=001"
+ "&content=Purchase hyperspace bypass permit "
+ "&title=Vogon Inc."
+ "&button1=Yes"
+ "&button2=No"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/terminals/xurl?';
$data = array(
'requestType'=>'show-message',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'terminalId'=>'001',
'content'=>'Purchase hyperspace bypass permit ',
'title'=>'Vogon Inc.',
'button1'=>'Yes',
'button2'=>'No',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/terminals/xurl?",
"requestType=show-message"
+ "&userName=username"
+ "&password=password"
+ "&accountId=123456"
+ "&terminalId=001"
+ "&content=Purchase hyperspace bypass permit "
+ "&title=Vogon Inc."
+ "&button1=Yes"
+ "&button2=No"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/terminals/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=show-message"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&accountId=123456"
postData = postData + "&terminalId=001"
postData = postData + "&content=Purchase hyperspace bypass permit "
postData = postData + "&title=Vogon Inc."
postData = postData + "&button1=Yes"
postData = postData + "&button2=No"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/terminals/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'show-message',
'userName'=>'username',
'password'=>'password',
'accountId'=>'123456',
'terminalId'=>'001',
'content'=>'Purchase hyperspace bypass permit ',
'title'=>'Vogon Inc.',
'button1'=>'Yes',
'button2'=>'No',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/terminals/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'show-message',
'userName':'username',
'password':'password',
'accountId':'123456',
'terminalId':'001',
'content':'Purchase hyperspace bypass permit ',
'title':'Vogon Inc.',
'button1':'Yes',
'button2':'No'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/terminals/xurl?',
[
requestType=>'show-message',
userName=>'username',
password=>'password',
accountId=>'123456',
terminalId=>'001',
content=>'Purchase hyperspace bypass permit ',
title=>'Vogon Inc.',
button1=>'Yes',
button2=>'No'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/terminals/xurl?'
values = {
'requestType':'show-message',
'userName':'username',
'password':'password',
'accountId':'123456',
'terminalId':'001',
'content':'Purchase hyperspace bypass permit ',
'title':'Vogon Inc.',
'button1':'Yes',
'button2':'No'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | show-message | Indicates the type of response. |
selectedButton | String (1) | Button selected on the terminal
0 = Cancel/Decline (Red) |
accountId | integer | accountId used in the original transaction request. |
terminalId | String (32) | Reference to a terminal associated with the API call. |
responseCode | String (5) | Response code returned by the terminal. |
responseMessage | String (255) | Response message returned by the terminal |
Merchant Creation
The Merchant Creation process allows you to either offload the process to Zift or seamlessly integrate the
process into your own application. We support two methods for Merchant Creation. For both methods the final output is an
accountId
which can be used to configure the merchant in your system for future payment processing.
- Production:
https://manage.zift.io/gates/onboarding?
- Sandbox:
https://sandbox-manage.zift.io/gates/onboarding?
Regardless of which integration method you choose you must take open sign up links into consideration. Open links increase the chances of fraudulent merchant creation attempts. Links to the merchant creation process must be behind an account login or otherwise controlled. Integrators that fail to control the links to their merchant creation process or have an increased percentage of fraudulent merchant creation attempts may have their merchant creation credentials suspended.
Merchant Creation and Enrollment Process Overview
The merchant enrollment and activation process generally has two separate phases. The first phase is the creation phase where the merchants business and beneficial ownership information is collected and submitted to Zift . As part of this phase the merchant will agree to our processing terms and conditions and provide proof of identity if needed. The second phase is an underwriting review phase where we verify the business and identity of the owners and perform other business verification checks to validate the business and ultimately activate it for processing and/or funding.
Hosted Creation
If you choose the hosted method, Zift will display all necessary forms and fields to collect the merchant
enrollment information. At the end of the sequence you can use the redirectURL
to return the user to your
site. There will be a follow-up webhook call to your site to inform you about the results of the merchant creation process
and what the merchants accountId
is. See below for more details.

The pageFormat
parameter determines whether or not you will use the Zift hosted method or the API
merchant creation method. To use the hosted method set the pageFormat
parameter to OBD.
After a successful merchant creation API request, you will receive back an HTML snippet. This snippet should be sent
back to the client's browser. At this point Zift will take over the redirect and display the forms specified
in the pageFormat
parameter.
When the prospective merchant has completed the forms they will be taken to a Thank You/Status page or redirected to a
URL you specify in the redirectURL
parameter. You may optionally choose to be notified of the merchant creation
result by specifying a URL in the notifyURL
parameter. We recommend using the notifyURL
as a
method to know the merchant’s Zift accountId
and status of the merchant creation request.
Understanding the pageFormat Parameter
The pageFormat
parameter is the key to the hosted integration method. If the parameter is absent or blank, the Onboarding API assumes 'API mode'. If there is any valid value in the parameter the Onboarding API assumes 'Hosted mode'.
In Hosted mode, the integrator has the option of choosing which pages to be displayed by Zift. Each letter in the default pageFormat value (OBDA) controls a specific page.
- O = Owner Information Page
- B = Business Information Page
- D = Deposit Information Page
The merchant creation process is highly customizable and consists of a series of pages to collect information from a merchant necessary for us to underwrite and provision a merchant account. You can send prospective merchants to a Zift hosted url to complete the entire application, you can collect all of the information on your site and send it to Zift via the API or you can collect partial data and send the user to a Zift hosted url to finish the rest.
On the Zift hosted application it is possible to hide some fields or make them read-only.
To make a field read-only use @@
as a prefix to the field value; fieldName=@@value
of the field.
- Read-only field example:
owner.firstName=@@John
To hide a field use @!
as a prefix to the field value; fieldName=@!value
of the field.
- Hidden field example:
owner.firstName=@!John
By default, the Zift hosted page will be rendered with a header and a footer. To hide them set the isEmbedded
field to 1
.
The table and examples below show how to create a merchant using our hosted merchant application form.
Name | Value/Format | Description |
---|---|---|
requestType | create | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
portfolioId | Integer | Required Associates the merchant application to a Zift portfolio. |
resellerId | String (10) | Required Identifier of a reseller associated with a merchant being created. |
feeTemplateId | Integer | Required Indicates the fee template to be used when configuring the new merchant. |
isEmbedded | Enum | Indicates if the header and footer of the onboarding form is rendered. Click for a list of possible values and their descriptions. |
pageFormat | String (5) | Required This field controls which pages will display when using our hosted merchant creation form. O - Owner Information (display optional)B - Business Information (display optional)D - Deposit Information (display optional)A - Terms and Conditions (required)Example Usage pageFormat=OBDA (display all pages - default)pageFormat=BDA (suppress owner info page)Note: The onboarding API will validate all fields on a suppressed page. If you do not pass in valid values (for example owner.firstName) the API will return an error when rendering the onboarding form.
|
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/gates/onboarding? \
-d "requestType=create" \
-d "userName={{userName}}" \
-d "password={{password}}" \
-d "profileId=11257624370" \
-d "resellerId=1" \
-d "portfolioId=100" \
-d "feeTemplateId=100026" \
-d "processingConfigurationScript=zift10" \
-d "merchantType=M" \
-d "merchantId=" \
-d "notifyURL=" \
-d "cancelURL=" \
-d "returnURL=" \
-d "returnURLPolicy=page" \
-d "isEmbedded=0" \
-d "pageFormat=OBDA" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"&requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100026"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat=OBDA"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/gates/onboarding?';
$data = array(
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100026',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'OBDA',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100026"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat=OBDA"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/gates/onboarding?")
request.Method = "POST"
Dim postData As String
postData = "requestType=create"
postData = postData + "&userName={{userName}}"
postData = postData + "&password={{password}}"
postData = postData + "&profileId=11257624370"
postData = postData + "&resellerId=1"
postData = postData + "&portfolioId=100"
postData = postData + "&feeTemplateId=100026"
postData = postData + "&processingConfigurationScript=zift10"
postData = postData + "&merchantType=M"
postData = postData + "&merchantId="
postData = postData + "¬ifyURL="
postData = postData + "&cancelURL="
postData = postData + "&returnURL="
postData = postData + "&returnURLPolicy=page"
postData = postData + "&isEmbedded=0"
postData = postData + "&pageFormat=OBDA"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/gates/onboarding?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100026',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'OBDA',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/gates/onboarding?',
method: 'POST',
headers: headers,
form: {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100026',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'OBDA'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/gates/onboarding?',
[
requestType=>'create',
userName=>'{{userName}}',
password=>'{{password}}',
profileId=>'11257624370',
resellerId=>'1',
portfolioId=>'100',
feeTemplateId=>'100026',
processingConfigurationScript=>'zift10',
merchantType=>'M',
merchantId=>'',
notifyURL=>'',
cancelURL=>'',
returnURL=>'',
returnURLPolicy=>'page',
isEmbedded=>'0',
pageFormat=>'OBDA'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/gates/onboarding?'
values = {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100026',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'OBDA'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value/Format | Description |
---|---|---|
responseType | create | Indicates the type of response. |
applicationCode | String (15) | Identifier of a merchant's onboarding application within a submitter's system. When present in the request this field is sent back in the response via the notify URL.
Note: Use this field as a definitive link between new onboarding applications and records in your system. |
applicationId | Long | Unique identifier of the merchant's onboarding application generated by Zift . When present in the request this field is sent back in the response via the notify URL. |
merchantId | Integer | Associates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL. |
accountId | Integer | Represents the accountId of the newly created merchant. This ID is present when the new merchant application is approved or in review (also see merchantCreationPolicy ). This ID is not present for declined or pending merchant applications. |
cardsDescriptor | String (10) | Default descriptor for payment card transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.paymentCardDescriptor ). The value is shown on merchant statements. |
directDebitDescriptor | String (10) | Default descriptor for direct debit transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.directDebitDescriptor ). The value is shown on merchant statements. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
API Creation
If you choose the API method you will need to create all the forms necessary to collect the required merchant creation details on your site. Below are some of the advantages of this integration method:
- Control over the user experience and form flow
- Complete control over ‘look and feel’
- Ability to direct the user to different paths depending on the API response
- Simplified integration into the Zift merchant creation API.

When using the API integration method, the API will validate the inputs and respond with specific information about any
data issues. Once validation has passed, the API will respond with the merchant creation status (approved, declined, hold, etc.)
and merchant accountId
. You may optionally choose to be notified of the result by specifying a URL in
the notifyURL
parameter. We recommend using the notifyURL
as a method to know the merchants
Zift accountId
and status of the merchant creation request. For example, if an application goes
from 'on hold' to 'approved' the notifyURL will be called to let the integrator know of the status change. Here’s an example
of what an API merchant creation could look like: http://demo.zift.io/onboarding/
While Zift's merchant creation process is fast by industry standards, there may be times when you may wish to return to the client immediately while the request is processing. Typically an onboarding request take 30-60 seconds. If you do not want your client to wait that long you can spawn a separate thread to process the merchant creation request or rely on the
notifyURL
to receive the merchant creation response.
The table and examples below show how to create a merchant using your own form or data collection method and passing us the information via the API.
Authentication and Context
Name | Value/Format | Description |
---|---|---|
requestType | create | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
merchantType | Enum | Defines the type of a merchant to be created.
Note: Affiliates do not have the same field requirements as Merchants You can view the affiliate minimum field list here: Required Affiliate Fields. Depending on your integration and business model, Zift may require you to provide additional fields for affiliate creation. |
merchantProfile | Enum | Defines how accounts, tax IDs, descriptors and deposit accounts of a merchant are going to be configured. Click here for a list of possible values and their descriptions. |
merchantCreationPolicy | Enum | Defines what status an onboarding application should obtain before a merchant is created. Click here for a list of possible values and their descriptions. |
profileId | String (20) | Required Indicates the profile used to process the merchant application. |
resellerId | String (10) | Required Identifier of a reseller associated with a merchant being created. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the onboarding request. |
portfolioId | Integer | Required Associates the merchant application to a Zift portfolio. |
merchantId | Integer | Associates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL. |
feeTemplateId | Integer | Required Indicates the fee template to be used when configuring the new merchant. |
distributionSchemaCode | String (20) | Indicates the distribution scheme to be used when configuring the new merchant. |
processingConfigurationScript | String (63) | Required Indicates the processing configuration to used when configuring the new merchant. |
applicationCode | String (15) | Identifier of a merchant's onboarding application within a submitter's system. When present in the request this field is sent back in the response via the notify URL.
Note: Use this field as a definitive link between new onboarding applications and records in your system. |
Appearance and Control
Name | Value/Format | Description |
---|---|---|
isEmbedded | Enum | Indicates if the header and footer of the onboarding form is rendered. Click for a list of possible values and their descriptions. |
pageFormat | String (5) | This field controls which pages will display when using our hosted merchant creation form.O - Owner Information (display optional)B - Business Information (display optional)D - Deposit Information (display optional)A - Terms and Conditions (required)Example Usage pageFormat=OBDA (display all pages - default)pageFormat=BDA (suppress owner info page)Note: The onboarding API will validate all fields on a suppressed page. If you do not pass in valid values (for example owner.firstName) the API will return an error when rendering the onboarding form.
|
notifyURL | String (255) | The value of notifyURL represents a resource or API endpoint on your system. When an application is completed the results will be delivered to your endpoint. If a new merchant application is not immediately approved updates to the merchant application will also be sent to the notifyURL. |
cancelURL | String (255) | URL used when the user cancels the onboarding application |
returnURL | String (255) | Redirect URL used at the end of the onboarding process regardless of application status |
returnURLPolicy | Enum | Indicates the behavior of the returnURLClick for a list of possible values and their descriptions. |
notificationPolicy | Enum | Defines how an email notification with a result of an onboarding process is sent to a merchant. Click for a list of possible values and their descriptions. |
Officer Information
Name | Value/Format | Description |
---|---|---|
officer.title | String (60) | Job title of a company's controlling officer. |
officer.firstName | String (50) | Required First name of a company's controlling officer. |
officer.lastName | String (50) | Required Last name of a company's controlling officer. |
officer.street1 | String (128) | Required Street (line 1) of a mailing address of a company's controlling officer. |
officer.street2 | String (128) | Street (line 2) of a mailing address of a company's controlling officer. |
officer.city | String (50) | Required City of a mailing address of a company's controlling officer. |
officer.state | String (3) | Required State code of a mailing address of a company's controlling officer. |
officer.zipCode | String (15) | Required ZIP/postal code of a mailing address of a company's controlling officer. |
officer.countryCode | String (2) | Required Country code of a mailing address of a company's controlling officer. |
officer.birthDate | Date (yyyyMMdd) | Required Birth date of a company's controlling officer. |
officer.socialSecurity | String (9) | Required Social security number of a company's controlling officer. |
officer.phone | String (15) | Required Phone number of a company's controlling officer for discussing any processing issues. |
officer.email | String (100) | Required Email of a company's controlling officer. |
Owner Information
Name | Value/Format | Description |
---|---|---|
owner.X.title | String (60) | Job title of a company's owner. |
owner.X.firstName | String (50) | Conditional First name of a business owner |
owner.X.lastName | String (50) | Conditional Last name of a business owner. |
owner.X.street1 | String (128) | Conditional Street (line 1) of a business owner's mailing address. |
owner.X.street2 | String (128) | Conditional Street (line 2) of a business owner's mailing address. |
owner.X.city | String (50) | Conditional City of a business owner's mailing address. |
owner.X.state | String (3) | Conditional State code of a business owner's mailing address. Note: This field is used in conjunction with owner.X.countryCode field. To hide either one of these fields the correct value must be set in the API call that rendered the onboarding form. If the value is not set the API will generate an error on the corresponding field. |
owner.X.zipCode | String (15) | Conditional ZIP/postal code of a business owner's mailing address. |
owner.X.countryCode | String (2) | Conditional Country code of a business owner's mailing address. Note: This field is used in conjunction with owner.X.State field. To hide either one of these fields the correct value must be be set in the API call that rendered the onboarding form. If the value is not set the API will generate an error on the corresponding field. |
owner.X.email | String (100) | Conditional Email of a business owner. |
owner.X.birthDate | Date (yyyyMMdd) | Conditional Birth date of a business owner. |
owner.X.socialSecurity | String (9) | Conditional Social security number of a business owner. |
owner.X.phone | String (15) | Conditional Phone number of a business owner for discussing any processing issues. |
owner.X.stakePercentage | Integer | Conditional Stake owned by a business owner. |
Business Information
Name | Value/Format | Description |
---|---|---|
business.businessName | String (50) | Required DBA name of the merchant's company. |
business.legalName | String (50) | Required Legal name of the merchant's company |
business.ownershipStructureType | Enum | Required Ownership structure type of the merchant's company. Click for a list of possible values and their descriptions. Note: Leave all officer fields blank if you are using business.ownershipStructure=LLC |
business.street1 | String (128) | Required Street Address (Street 1) of the merchant's company. Note: Addresses with a P.O. Box are not accepted. |
business.street2 | String (128) | Street Address (Street 2) of the merchant's company. |
business.city | String (50) | Required City of the merchant's company. |
business.state | String (3) | Required State of the merchant's company. |
business.zipCode | String (15) | Required Zip/Postal code of the merchant's company. |
business.countryCode | String (3) | Required Country of the merchant's company. |
business.descriptorPhone | String (10) | Required Customer service phone of the merchant's company that is shown on card/account holder statements |
business.paymentCardDescriptor | String (21) | Required Descriptor assigned to payment card transactions associated with the merchant. Shown on card/account holder statements. Note: When using the hosted onboarding form the contents of this field are automatically derived from the business name and business phone.
Passing in a value via the API will override descriptors generated by the onboarding form. Use the following format when passing the descriptor in directly: 10 chars of business name - phone number Example: Abcdefghij-8015551212 Spaces or punctuation in the business name portion of the descriptor is not allowed. Zift may give you specific requirements for this field depending on your integration. |
business.directDebitDescriptor | String (21) | Required Descriptor assigned to direct debit transactions associated with the merchant. Shown on card/account holder statements Note: When using the hosted onboarding form the contents of this field are automatically derived from the business name and business phone.
Passing in a value via the API will override descriptors generated by the onboarding form. Use the following format when passing the descriptor in directly: 10 chars of business name : phone number Example: Abcdefghij:8015551212 Spaces or punctuation in the business name portion of the descriptor is not allowed. Unlike the payment card descriptor this field uses ':' between the company name and phone number. Zift may give you specific requirements for this field depending on your integration. |
business.taxId | String (9) | Required Federal tax ID or Social Security Number of the merchant. Depending on the type selected in business.ownershipStructureType this value may be the same as owner.socialSecurity but must still be submitted separately. |
business.webSite | String (255) | Required Website of the merchant's company. Only include the domain name. Do not include the http prefix Valid: www.zift.io Invalid: https://www.zift.io |
business.email | String (100) | Required Email of the merchant's business. This is used by Zift and the integrator's system to send status updates on the merchant's onboarding applicatoin. |
business.description | String (255) | Description of the merchant's business. |
business.contactPhone | String (15) | Merchant's contact phone. Used for discussing any processing issues. |
business.merchantCategoryCode | String (4) | Required Merchant category code assigned to a merchant's business. For test integrations to our sandbox environment use value '7399'. In most cases individual merchants will not know their correct MCC code. Integrators will need to work with Zift to establish supported MCC codes and proper integration of this field. |
business.currencyCode | String (3) | Required Currency used for merchant's transactions. Default: USD |
business.driverLicense | String (50) | Driver's License Number of the merchant. |
business.driverLicenseCountryCode | String (3) | Country where the merchant's driver's license was issued. |
business.driverLicenseState | String (3) | State where the merchant's driver's license was issued. |
business.registrationCountryCode | String (3) | Country of the merchant's business registration. |
business.registrationState | String (3) | State of the merchant's business registration. |
business.registrationYear | String (4) (yyyy) | Registration year of the merchant's business. |
business.workHours | String (20) | Work hours of merchant's business. |
business.timeZoneCode | String (20) | Required Merchant's preferred time-zone. Default: MST. |
business.relationshipBeginDate | Date (yyyyMMdd) | Date the relationship began between Zift and the merchant. |
Transaction Estimates
Name | Value/Format | Description |
---|---|---|
estimates.annualDirectDebitVolume | Integer | Required Estimated volume of direct debit transactions expected to be processed during a year. |
estimates.annualCardsVolume | Integer | Required Estimated volume of payment card transactions expected to be processed during a year. |
estimates.avgDirectDebitTransactionAmount | Integer | Required Estimated average amount of direct debit transactions. Amounts must be in whole dollars. |
estimates.avgCardsTransactionAmount | Integer | Required Estimated average amount of payment card transactions. Amounts must be in whole dollars. |
estimates.maxTransactionAmount | Integer | Required Maximum amount of a transaction. |
Deposit Account
Name | Value/Format | Description |
---|---|---|
deposit.bankName | String (80) | Name of a bank associated with a merchant's deposit account. |
deposit.holderName | String (25) | Required Holder name of a merchant's deposit account. |
deposit.routingNumber | String (35) | Required Routing number of a merchant's deposit account. Note: If an invalid routing number is provided the merchant may not receive their funds and may incur additional ACH return charges. |
deposit.accountNumber | String (50) | Required Number of a merchant's deposit account. Note: If an invalid account number is provided the merchant may not receive their funds and may incur additional ACH return charges. |
deposit.accountType | Enum | Type of deposit account. Click for a list of possible values and their descriptions. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/gates/onboarding? \
-d "requestType=create" \
-d "userName={{userName}}" \
-d "password={{password}}" \
-d "profileId=11257624370" \
-d "resellerId=1" \
-d "portfolioId=100" \
-d "feeTemplateId=100028" \
-d "processingConfigurationScript=zift10" \
-d "merchantType=M" \
-d "merchantId=" \
-d "notifyURL=" \
-d "cancelURL=" \
-d "returnURL=" \
-d "returnURLPolicy=page" \
-d "isEmbedded=0" \
-d "pageFormat=" \
-d "officer.firstName=Tony" \
-d "officer.lastName=Stark" \
-d "officer.street1=41 E 300 N" \
-d "officer.street2=" \
-d "officer.city=Spanish Fork" \
-d "officer.state=UT" \
-d "officer.zipCode=84653" \
-d "officer.phone=5555551212" \
-d "officer.email=tony@zift.io" \
-d "officer.birthDate=19670210" \
-d "officer.socialSecurity=123456789" \
-d "officer.countryCode=US" \
-d "officer.stakePercentage=10" \
-d "owner.1.firstName=First" \
-d "owner.1.lastName=Owner" \
-d "owner.1.street1=41 E 300 N" \
-d "owner.1.street2=" \
-d "owner.1.city=Spanish Fork" \
-d "owner.1.state=UT" \
-d "owner.1.zipCode=84653" \
-d "owner.1.phone=5555551212" \
-d "owner.1.email=tony@zift.io" \
-d "owner.1.birthDate=19670210" \
-d "owner.1.socialSecurity=123456789" \
-d "owner.1.countryCode=US" \
-d "owner.1.stakePercentage=200" \
-d "owner.2.firstName=Second" \
-d "owner.2.lastName=Owner" \
-d "owner.2.street1=41 E 300 N" \
-d "owner.2.street2=" \
-d "owner.2.city=Spanish Fork" \
-d "owner.2.state=UT" \
-d "owner.2.zipCode=84653" \
-d "owner.2.phone=5555551212" \
-d "owner.2.email=tony@zift.io" \
-d "owner.2.birthDate=19670210" \
-d "owner.2.socialSecurity=123456789" \
-d "owner.2.countryCode=US" \
-d "owner.2.stakePercentage=10" \
-d "owner.3.firstName=Third" \
-d "owner.3.lastName=Owner" \
-d "owner.3.street1=41 E 300 N" \
-d "owner.3.street2=" \
-d "owner.3.city=Spanish Fork" \
-d "owner.3.state=UT" \
-d "owner.3.zipCode=84653" \
-d "owner.3.phone=5555551212" \
-d "owner.3.email=tony@zift.io" \
-d "owner.3.birthDate=19670210" \
-d "owner.3.socialSecurity=123456789" \
-d "owner.3.countryCode=US" \
-d "owner.3.stakePercentage=10" \
-d "owner.4.firstName=Fourth" \
-d "owner.4.lastName=Owner" \
-d "owner.4.street1=41 E 300 N" \
-d "owner.4.street2=" \
-d "owner.4.city=Spanish Fork" \
-d "owner.4.state=UT" \
-d "owner.4.zipCode=84653" \
-d "owner.4.phone=5555551212" \
-d "owner.4.email=tony@zift.io" \
-d "owner.4.birthDate=19670210" \
-d "owner.4.socialSecurity=123456789" \
-d "owner.4.countryCode=US" \
-d "owner.4.stakePercentage=10" \
-d "owner.5.firstName=Fifth" \
-d "owner.5.lastName=Owner" \
-d "owner.5.street1=41 E 300 N" \
-d "owner.5.street2=" \
-d "owner.5.city=Spanish Fork" \
-d "owner.5.state=UT" \
-d "owner.5.zipCode=84653" \
-d "owner.5.phone=5555551212" \
-d "owner.5.email=tony@zift.io" \
-d "owner.5.birthDate=19670210" \
-d "owner.5.socialSecurity=123456789" \
-d "owner.5.countryCode=US" \
-d "owner.5.stakePercentage=10" \
-d "owner.6.firstName=Sixth" \
-d "owner.6.lastName=Owner" \
-d "owner.6.street1=41 E 300 N" \
-d "owner.6.street2=" \
-d "owner.6.city=Spanish Fork" \
-d "owner.6.state=UT" \
-d "owner.6.zipCode=84653" \
-d "owner.6.phone=5555551212" \
-d "owner.6.email=tony@zift.io" \
-d "owner.6.birthDate=19670210" \
-d "owner.6.socialSecurity=123456789" \
-d "owner.6.countryCode=US" \
-d "owner.6.stakePercentage=10" \
-d "business.businessName=Start Industries" \
-d "business.legalName=Start Industries" \
-d "business.street1=41 E 300 N" \
-d "business.street2=" \
-d "business.city=Anywhere" \
-d "business.state=CT" \
-d "business.zipCode=06000" \
-d "business.timeZoneCode=EST" \
-d "business.descriptorPhone=8604500119" \
-d "business.email=tony@zift.io" \
-d "business.webSite=" \
-d "business.taxId=147852369" \
-d "business.ownershipStructureType=C" \
-d "business.description=Ghostbusting" \
-d "estimates.annualCardsVolume=111111" \
-d "estimates.annualDirectDebitVolume=222222" \
-d "estimates.avgCardsTransactionAmount=2222" \
-d "estimates.avgDirectDebitTransactionAmount=1111" \
-d "estimates.maxTransactionAmount=12123" \
-d "business.countryCode=US" \
-d "business.merchantCategoryCode=7399" \
-d "business.currencyCode=USD" \
-d "deposit.bankName=Stark Bank" \
-d "deposit.holderName=Tony Stark" \
-d "deposit.accountType=C" \
-d "deposit.routingNumber=324377516" \
-d "deposit.accountNumber=123456789" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"&requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100028"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat="
+ "&officer.firstName=Tony"
+ "&officer.lastName=Stark"
+ "&officer.street1=41 E 300 N"
+ "&officer.street2="
+ "&officer.city=Spanish Fork"
+ "&officer.state=UT"
+ "&officer.zipCode=84653"
+ "&officer.phone=5555551212"
+ "&officer.email=tony@zift.io"
+ "&officer.birthDate=19670210"
+ "&officer.socialSecurity=123456789"
+ "&officer.countryCode=US"
+ "&officer.stakePercentage=10"
+ "&owner.1.firstName=First"
+ "&owner.1.lastName=Owner"
+ "&owner.1.street1=41 E 300 N"
+ "&owner.1.street2="
+ "&owner.1.city=Spanish Fork"
+ "&owner.1.state=UT"
+ "&owner.1.zipCode=84653"
+ "&owner.1.phone=5555551212"
+ "&owner.1.email=tony@zift.io"
+ "&owner.1.birthDate=19670210"
+ "&owner.1.socialSecurity=123456789"
+ "&owner.1.countryCode=US"
+ "&owner.1.stakePercentage=200"
+ "&owner.2.firstName=Second"
+ "&owner.2.lastName=Owner"
+ "&owner.2.street1=41 E 300 N"
+ "&owner.2.street2="
+ "&owner.2.city=Spanish Fork"
+ "&owner.2.state=UT"
+ "&owner.2.zipCode=84653"
+ "&owner.2.phone=5555551212"
+ "&owner.2.email=tony@zift.io"
+ "&owner.2.birthDate=19670210"
+ "&owner.2.socialSecurity=123456789"
+ "&owner.2.countryCode=US"
+ "&owner.2.stakePercentage=10"
+ "&owner.3.firstName=Third"
+ "&owner.3.lastName=Owner"
+ "&owner.3.street1=41 E 300 N"
+ "&owner.3.street2="
+ "&owner.3.city=Spanish Fork"
+ "&owner.3.state=UT"
+ "&owner.3.zipCode=84653"
+ "&owner.3.phone=5555551212"
+ "&owner.3.email=tony@zift.io"
+ "&owner.3.birthDate=19670210"
+ "&owner.3.socialSecurity=123456789"
+ "&owner.3.countryCode=US"
+ "&owner.3.stakePercentage=10"
+ "&owner.4.firstName=Fourth"
+ "&owner.4.lastName=Owner"
+ "&owner.4.street1=41 E 300 N"
+ "&owner.4.street2="
+ "&owner.4.city=Spanish Fork"
+ "&owner.4.state=UT"
+ "&owner.4.zipCode=84653"
+ "&owner.4.phone=5555551212"
+ "&owner.4.email=tony@zift.io"
+ "&owner.4.birthDate=19670210"
+ "&owner.4.socialSecurity=123456789"
+ "&owner.4.countryCode=US"
+ "&owner.4.stakePercentage=10"
+ "&owner.5.firstName=Fifth"
+ "&owner.5.lastName=Owner"
+ "&owner.5.street1=41 E 300 N"
+ "&owner.5.street2="
+ "&owner.5.city=Spanish Fork"
+ "&owner.5.state=UT"
+ "&owner.5.zipCode=84653"
+ "&owner.5.phone=5555551212"
+ "&owner.5.email=tony@zift.io"
+ "&owner.5.birthDate=19670210"
+ "&owner.5.socialSecurity=123456789"
+ "&owner.5.countryCode=US"
+ "&owner.5.stakePercentage=10"
+ "&owner.6.firstName=Sixth"
+ "&owner.6.lastName=Owner"
+ "&owner.6.street1=41 E 300 N"
+ "&owner.6.street2="
+ "&owner.6.city=Spanish Fork"
+ "&owner.6.state=UT"
+ "&owner.6.zipCode=84653"
+ "&owner.6.phone=5555551212"
+ "&owner.6.email=tony@zift.io"
+ "&owner.6.birthDate=19670210"
+ "&owner.6.socialSecurity=123456789"
+ "&owner.6.countryCode=US"
+ "&owner.6.stakePercentage=10"
+ "&business.businessName=Start Industries"
+ "&business.legalName=Start Industries"
+ "&business.street1=41 E 300 N"
+ "&business.street2="
+ "&business.city=Anywhere"
+ "&business.state=CT"
+ "&business.zipCode=06000"
+ "&business.timeZoneCode=EST"
+ "&business.descriptorPhone=8604500119"
+ "&business.email=tony@zift.io"
+ "&business.webSite="
+ "&business.taxId=147852369"
+ "&business.ownershipStructureType=C"
+ "&business.description=Ghostbusting"
+ "&estimates.annualCardsVolume=111111"
+ "&estimates.annualDirectDebitVolume=222222"
+ "&estimates.avgCardsTransactionAmount=2222"
+ "&estimates.avgDirectDebitTransactionAmount=1111"
+ "&estimates.maxTransactionAmount=12123"
+ "&business.countryCode=US"
+ "&business.merchantCategoryCode=7399"
+ "&business.currencyCode=USD"
+ "&deposit.bankName=Stark Bank"
+ "&deposit.holderName=Tony Stark"
+ "&deposit.accountType=C"
+ "&deposit.routingNumber=324377516"
+ "&deposit.accountNumber=123456789"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/gates/onboarding?';
$data = array(
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100028',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'',
'officer.firstName'=>'Tony',
'officer.lastName'=>'Stark',
'officer.street1'=>'41 E 300 N',
'officer.street2'=>'',
'officer.city'=>'Spanish Fork',
'officer.state'=>'UT',
'officer.zipCode'=>'84653',
'officer.phone'=>'5555551212',
'officer.email'=>'tony@zift.io',
'officer.birthDate'=>'19670210',
'officer.socialSecurity'=>'123456789',
'officer.countryCode'=>'US',
'officer.stakePercentage'=>'10',
'owner.1.firstName'=>'First',
'owner.1.lastName'=>'Owner',
'owner.1.street1'=>'41 E 300 N',
'owner.1.street2'=>'',
'owner.1.city'=>'Spanish Fork',
'owner.1.state'=>'UT',
'owner.1.zipCode'=>'84653',
'owner.1.phone'=>'5555551212',
'owner.1.email'=>'tony@zift.io',
'owner.1.birthDate'=>'19670210',
'owner.1.socialSecurity'=>'123456789',
'owner.1.countryCode'=>'US',
'owner.1.stakePercentage'=>'200',
'owner.2.firstName'=>'Second',
'owner.2.lastName'=>'Owner',
'owner.2.street1'=>'41 E 300 N',
'owner.2.street2'=>'',
'owner.2.city'=>'Spanish Fork',
'owner.2.state'=>'UT',
'owner.2.zipCode'=>'84653',
'owner.2.phone'=>'5555551212',
'owner.2.email'=>'tony@zift.io',
'owner.2.birthDate'=>'19670210',
'owner.2.socialSecurity'=>'123456789',
'owner.2.countryCode'=>'US',
'owner.2.stakePercentage'=>'10',
'owner.3.firstName'=>'Third',
'owner.3.lastName'=>'Owner',
'owner.3.street1'=>'41 E 300 N',
'owner.3.street2'=>'',
'owner.3.city'=>'Spanish Fork',
'owner.3.state'=>'UT',
'owner.3.zipCode'=>'84653',
'owner.3.phone'=>'5555551212',
'owner.3.email'=>'tony@zift.io',
'owner.3.birthDate'=>'19670210',
'owner.3.socialSecurity'=>'123456789',
'owner.3.countryCode'=>'US',
'owner.3.stakePercentage'=>'10',
'owner.4.firstName'=>'Fourth',
'owner.4.lastName'=>'Owner',
'owner.4.street1'=>'41 E 300 N',
'owner.4.street2'=>'',
'owner.4.city'=>'Spanish Fork',
'owner.4.state'=>'UT',
'owner.4.zipCode'=>'84653',
'owner.4.phone'=>'5555551212',
'owner.4.email'=>'tony@zift.io',
'owner.4.birthDate'=>'19670210',
'owner.4.socialSecurity'=>'123456789',
'owner.4.countryCode'=>'US',
'owner.4.stakePercentage'=>'10',
'owner.5.firstName'=>'Fifth',
'owner.5.lastName'=>'Owner',
'owner.5.street1'=>'41 E 300 N',
'owner.5.street2'=>'',
'owner.5.city'=>'Spanish Fork',
'owner.5.state'=>'UT',
'owner.5.zipCode'=>'84653',
'owner.5.phone'=>'5555551212',
'owner.5.email'=>'tony@zift.io',
'owner.5.birthDate'=>'19670210',
'owner.5.socialSecurity'=>'123456789',
'owner.5.countryCode'=>'US',
'owner.5.stakePercentage'=>'10',
'owner.6.firstName'=>'Sixth',
'owner.6.lastName'=>'Owner',
'owner.6.street1'=>'41 E 300 N',
'owner.6.street2'=>'',
'owner.6.city'=>'Spanish Fork',
'owner.6.state'=>'UT',
'owner.6.zipCode'=>'84653',
'owner.6.phone'=>'5555551212',
'owner.6.email'=>'tony@zift.io',
'owner.6.birthDate'=>'19670210',
'owner.6.socialSecurity'=>'123456789',
'owner.6.countryCode'=>'US',
'owner.6.stakePercentage'=>'10',
'business.businessName'=>'Start Industries',
'business.legalName'=>'Start Industries',
'business.street1'=>'41 E 300 N',
'business.street2'=>'',
'business.city'=>'Anywhere',
'business.state'=>'CT',
'business.zipCode'=>'06000',
'business.timeZoneCode'=>'EST',
'business.descriptorPhone'=>'8604500119',
'business.email'=>'tony@zift.io',
'business.webSite'=>'',
'business.taxId'=>'147852369',
'business.ownershipStructureType'=>'C',
'business.description'=>'Ghostbusting',
'estimates.annualCardsVolume'=>'111111',
'estimates.annualDirectDebitVolume'=>'222222',
'estimates.avgCardsTransactionAmount'=>'2222',
'estimates.avgDirectDebitTransactionAmount'=>'1111',
'estimates.maxTransactionAmount'=>'12123',
'business.countryCode'=>'US',
'business.merchantCategoryCode'=>'7399',
'business.currencyCode'=>'USD',
'deposit.bankName'=>'Stark Bank',
'deposit.holderName'=>'Tony Stark',
'deposit.accountType'=>'C',
'deposit.routingNumber'=>'324377516',
'deposit.accountNumber'=>'123456789',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100028"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat="
+ "&officer.firstName=Tony"
+ "&officer.lastName=Stark"
+ "&officer.street1=41 E 300 N"
+ "&officer.street2="
+ "&officer.city=Spanish Fork"
+ "&officer.state=UT"
+ "&officer.zipCode=84653"
+ "&officer.phone=5555551212"
+ "&officer.email=tony@zift.io"
+ "&officer.birthDate=19670210"
+ "&officer.socialSecurity=123456789"
+ "&officer.countryCode=US"
+ "&officer.stakePercentage=10"
+ "&owner.1.firstName=First"
+ "&owner.1.lastName=Owner"
+ "&owner.1.street1=41 E 300 N"
+ "&owner.1.street2="
+ "&owner.1.city=Spanish Fork"
+ "&owner.1.state=UT"
+ "&owner.1.zipCode=84653"
+ "&owner.1.phone=5555551212"
+ "&owner.1.email=tony@zift.io"
+ "&owner.1.birthDate=19670210"
+ "&owner.1.socialSecurity=123456789"
+ "&owner.1.countryCode=US"
+ "&owner.1.stakePercentage=200"
+ "&owner.2.firstName=Second"
+ "&owner.2.lastName=Owner"
+ "&owner.2.street1=41 E 300 N"
+ "&owner.2.street2="
+ "&owner.2.city=Spanish Fork"
+ "&owner.2.state=UT"
+ "&owner.2.zipCode=84653"
+ "&owner.2.phone=5555551212"
+ "&owner.2.email=tony@zift.io"
+ "&owner.2.birthDate=19670210"
+ "&owner.2.socialSecurity=123456789"
+ "&owner.2.countryCode=US"
+ "&owner.2.stakePercentage=10"
+ "&owner.3.firstName=Third"
+ "&owner.3.lastName=Owner"
+ "&owner.3.street1=41 E 300 N"
+ "&owner.3.street2="
+ "&owner.3.city=Spanish Fork"
+ "&owner.3.state=UT"
+ "&owner.3.zipCode=84653"
+ "&owner.3.phone=5555551212"
+ "&owner.3.email=tony@zift.io"
+ "&owner.3.birthDate=19670210"
+ "&owner.3.socialSecurity=123456789"
+ "&owner.3.countryCode=US"
+ "&owner.3.stakePercentage=10"
+ "&owner.4.firstName=Fourth"
+ "&owner.4.lastName=Owner"
+ "&owner.4.street1=41 E 300 N"
+ "&owner.4.street2="
+ "&owner.4.city=Spanish Fork"
+ "&owner.4.state=UT"
+ "&owner.4.zipCode=84653"
+ "&owner.4.phone=5555551212"
+ "&owner.4.email=tony@zift.io"
+ "&owner.4.birthDate=19670210"
+ "&owner.4.socialSecurity=123456789"
+ "&owner.4.countryCode=US"
+ "&owner.4.stakePercentage=10"
+ "&owner.5.firstName=Fifth"
+ "&owner.5.lastName=Owner"
+ "&owner.5.street1=41 E 300 N"
+ "&owner.5.street2="
+ "&owner.5.city=Spanish Fork"
+ "&owner.5.state=UT"
+ "&owner.5.zipCode=84653"
+ "&owner.5.phone=5555551212"
+ "&owner.5.email=tony@zift.io"
+ "&owner.5.birthDate=19670210"
+ "&owner.5.socialSecurity=123456789"
+ "&owner.5.countryCode=US"
+ "&owner.5.stakePercentage=10"
+ "&owner.6.firstName=Sixth"
+ "&owner.6.lastName=Owner"
+ "&owner.6.street1=41 E 300 N"
+ "&owner.6.street2="
+ "&owner.6.city=Spanish Fork"
+ "&owner.6.state=UT"
+ "&owner.6.zipCode=84653"
+ "&owner.6.phone=5555551212"
+ "&owner.6.email=tony@zift.io"
+ "&owner.6.birthDate=19670210"
+ "&owner.6.socialSecurity=123456789"
+ "&owner.6.countryCode=US"
+ "&owner.6.stakePercentage=10"
+ "&business.businessName=Start Industries"
+ "&business.legalName=Start Industries"
+ "&business.street1=41 E 300 N"
+ "&business.street2="
+ "&business.city=Anywhere"
+ "&business.state=CT"
+ "&business.zipCode=06000"
+ "&business.timeZoneCode=EST"
+ "&business.descriptorPhone=8604500119"
+ "&business.email=tony@zift.io"
+ "&business.webSite="
+ "&business.taxId=147852369"
+ "&business.ownershipStructureType=C"
+ "&business.description=Ghostbusting"
+ "&estimates.annualCardsVolume=111111"
+ "&estimates.annualDirectDebitVolume=222222"
+ "&estimates.avgCardsTransactionAmount=2222"
+ "&estimates.avgDirectDebitTransactionAmount=1111"
+ "&estimates.maxTransactionAmount=12123"
+ "&business.countryCode=US"
+ "&business.merchantCategoryCode=7399"
+ "&business.currencyCode=USD"
+ "&deposit.bankName=Stark Bank"
+ "&deposit.holderName=Tony Stark"
+ "&deposit.accountType=C"
+ "&deposit.routingNumber=324377516"
+ "&deposit.accountNumber=123456789"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/gates/onboarding?")
request.Method = "POST"
Dim postData As String
postData = "requestType=create"
postData = postData + "&userName={{userName}}"
postData = postData + "&password={{password}}"
postData = postData + "&profileId=11257624370"
postData = postData + "&resellerId=1"
postData = postData + "&portfolioId=100"
postData = postData + "&feeTemplateId=100028"
postData = postData + "&processingConfigurationScript=zift10"
postData = postData + "&merchantType=M"
postData = postData + "&merchantId="
postData = postData + "¬ifyURL="
postData = postData + "&cancelURL="
postData = postData + "&returnURL="
postData = postData + "&returnURLPolicy=page"
postData = postData + "&isEmbedded=0"
postData = postData + "&pageFormat="
postData = postData + "&officer.firstName=Tony"
postData = postData + "&officer.lastName=Stark"
postData = postData + "&officer.street1=41 E 300 N"
postData = postData + "&officer.street2="
postData = postData + "&officer.city=Spanish Fork"
postData = postData + "&officer.state=UT"
postData = postData + "&officer.zipCode=84653"
postData = postData + "&officer.phone=5555551212"
postData = postData + "&officer.email=tony@zift.io"
postData = postData + "&officer.birthDate=19670210"
postData = postData + "&officer.socialSecurity=123456789"
postData = postData + "&officer.countryCode=US"
postData = postData + "&officer.stakePercentage=10"
postData = postData + "&owner.1.firstName=First"
postData = postData + "&owner.1.lastName=Owner"
postData = postData + "&owner.1.street1=41 E 300 N"
postData = postData + "&owner.1.street2="
postData = postData + "&owner.1.city=Spanish Fork"
postData = postData + "&owner.1.state=UT"
postData = postData + "&owner.1.zipCode=84653"
postData = postData + "&owner.1.phone=5555551212"
postData = postData + "&owner.1.email=tony@zift.io"
postData = postData + "&owner.1.birthDate=19670210"
postData = postData + "&owner.1.socialSecurity=123456789"
postData = postData + "&owner.1.countryCode=US"
postData = postData + "&owner.1.stakePercentage=200"
postData = postData + "&owner.2.firstName=Second"
postData = postData + "&owner.2.lastName=Owner"
postData = postData + "&owner.2.street1=41 E 300 N"
postData = postData + "&owner.2.street2="
postData = postData + "&owner.2.city=Spanish Fork"
postData = postData + "&owner.2.state=UT"
postData = postData + "&owner.2.zipCode=84653"
postData = postData + "&owner.2.phone=5555551212"
postData = postData + "&owner.2.email=tony@zift.io"
postData = postData + "&owner.2.birthDate=19670210"
postData = postData + "&owner.2.socialSecurity=123456789"
postData = postData + "&owner.2.countryCode=US"
postData = postData + "&owner.2.stakePercentage=10"
postData = postData + "&owner.3.firstName=Third"
postData = postData + "&owner.3.lastName=Owner"
postData = postData + "&owner.3.street1=41 E 300 N"
postData = postData + "&owner.3.street2="
postData = postData + "&owner.3.city=Spanish Fork"
postData = postData + "&owner.3.state=UT"
postData = postData + "&owner.3.zipCode=84653"
postData = postData + "&owner.3.phone=5555551212"
postData = postData + "&owner.3.email=tony@zift.io"
postData = postData + "&owner.3.birthDate=19670210"
postData = postData + "&owner.3.socialSecurity=123456789"
postData = postData + "&owner.3.countryCode=US"
postData = postData + "&owner.3.stakePercentage=10"
postData = postData + "&owner.4.firstName=Fourth"
postData = postData + "&owner.4.lastName=Owner"
postData = postData + "&owner.4.street1=41 E 300 N"
postData = postData + "&owner.4.street2="
postData = postData + "&owner.4.city=Spanish Fork"
postData = postData + "&owner.4.state=UT"
postData = postData + "&owner.4.zipCode=84653"
postData = postData + "&owner.4.phone=5555551212"
postData = postData + "&owner.4.email=tony@zift.io"
postData = postData + "&owner.4.birthDate=19670210"
postData = postData + "&owner.4.socialSecurity=123456789"
postData = postData + "&owner.4.countryCode=US"
postData = postData + "&owner.4.stakePercentage=10"
postData = postData + "&owner.5.firstName=Fifth"
postData = postData + "&owner.5.lastName=Owner"
postData = postData + "&owner.5.street1=41 E 300 N"
postData = postData + "&owner.5.street2="
postData = postData + "&owner.5.city=Spanish Fork"
postData = postData + "&owner.5.state=UT"
postData = postData + "&owner.5.zipCode=84653"
postData = postData + "&owner.5.phone=5555551212"
postData = postData + "&owner.5.email=tony@zift.io"
postData = postData + "&owner.5.birthDate=19670210"
postData = postData + "&owner.5.socialSecurity=123456789"
postData = postData + "&owner.5.countryCode=US"
postData = postData + "&owner.5.stakePercentage=10"
postData = postData + "&owner.6.firstName=Sixth"
postData = postData + "&owner.6.lastName=Owner"
postData = postData + "&owner.6.street1=41 E 300 N"
postData = postData + "&owner.6.street2="
postData = postData + "&owner.6.city=Spanish Fork"
postData = postData + "&owner.6.state=UT"
postData = postData + "&owner.6.zipCode=84653"
postData = postData + "&owner.6.phone=5555551212"
postData = postData + "&owner.6.email=tony@zift.io"
postData = postData + "&owner.6.birthDate=19670210"
postData = postData + "&owner.6.socialSecurity=123456789"
postData = postData + "&owner.6.countryCode=US"
postData = postData + "&owner.6.stakePercentage=10"
postData = postData + "&business.businessName=Start Industries"
postData = postData + "&business.legalName=Start Industries"
postData = postData + "&business.street1=41 E 300 N"
postData = postData + "&business.street2="
postData = postData + "&business.city=Anywhere"
postData = postData + "&business.state=CT"
postData = postData + "&business.zipCode=06000"
postData = postData + "&business.timeZoneCode=EST"
postData = postData + "&business.descriptorPhone=8604500119"
postData = postData + "&business.email=tony@zift.io"
postData = postData + "&business.webSite="
postData = postData + "&business.taxId=147852369"
postData = postData + "&business.ownershipStructureType=C"
postData = postData + "&business.description=Ghostbusting"
postData = postData + "&estimates.annualCardsVolume=111111"
postData = postData + "&estimates.annualDirectDebitVolume=222222"
postData = postData + "&estimates.avgCardsTransactionAmount=2222"
postData = postData + "&estimates.avgDirectDebitTransactionAmount=1111"
postData = postData + "&estimates.maxTransactionAmount=12123"
postData = postData + "&business.countryCode=US"
postData = postData + "&business.merchantCategoryCode=7399"
postData = postData + "&business.currencyCode=USD"
postData = postData + "&deposit.bankName=Stark Bank"
postData = postData + "&deposit.holderName=Tony Stark"
postData = postData + "&deposit.accountType=C"
postData = postData + "&deposit.routingNumber=324377516"
postData = postData + "&deposit.accountNumber=123456789"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/gates/onboarding?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100028',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'',
'officer.firstName'=>'Tony',
'officer.lastName'=>'Stark',
'officer.street1'=>'41 E 300 N',
'officer.street2'=>'',
'officer.city'=>'Spanish Fork',
'officer.state'=>'UT',
'officer.zipCode'=>'84653',
'officer.phone'=>'5555551212',
'officer.email'=>'tony@zift.io',
'officer.birthDate'=>'19670210',
'officer.socialSecurity'=>'123456789',
'officer.countryCode'=>'US',
'officer.stakePercentage'=>'10',
'owner.1.firstName'=>'First',
'owner.1.lastName'=>'Owner',
'owner.1.street1'=>'41 E 300 N',
'owner.1.street2'=>'',
'owner.1.city'=>'Spanish Fork',
'owner.1.state'=>'UT',
'owner.1.zipCode'=>'84653',
'owner.1.phone'=>'5555551212',
'owner.1.email'=>'tony@zift.io',
'owner.1.birthDate'=>'19670210',
'owner.1.socialSecurity'=>'123456789',
'owner.1.countryCode'=>'US',
'owner.1.stakePercentage'=>'200',
'owner.2.firstName'=>'Second',
'owner.2.lastName'=>'Owner',
'owner.2.street1'=>'41 E 300 N',
'owner.2.street2'=>'',
'owner.2.city'=>'Spanish Fork',
'owner.2.state'=>'UT',
'owner.2.zipCode'=>'84653',
'owner.2.phone'=>'5555551212',
'owner.2.email'=>'tony@zift.io',
'owner.2.birthDate'=>'19670210',
'owner.2.socialSecurity'=>'123456789',
'owner.2.countryCode'=>'US',
'owner.2.stakePercentage'=>'10',
'owner.3.firstName'=>'Third',
'owner.3.lastName'=>'Owner',
'owner.3.street1'=>'41 E 300 N',
'owner.3.street2'=>'',
'owner.3.city'=>'Spanish Fork',
'owner.3.state'=>'UT',
'owner.3.zipCode'=>'84653',
'owner.3.phone'=>'5555551212',
'owner.3.email'=>'tony@zift.io',
'owner.3.birthDate'=>'19670210',
'owner.3.socialSecurity'=>'123456789',
'owner.3.countryCode'=>'US',
'owner.3.stakePercentage'=>'10',
'owner.4.firstName'=>'Fourth',
'owner.4.lastName'=>'Owner',
'owner.4.street1'=>'41 E 300 N',
'owner.4.street2'=>'',
'owner.4.city'=>'Spanish Fork',
'owner.4.state'=>'UT',
'owner.4.zipCode'=>'84653',
'owner.4.phone'=>'5555551212',
'owner.4.email'=>'tony@zift.io',
'owner.4.birthDate'=>'19670210',
'owner.4.socialSecurity'=>'123456789',
'owner.4.countryCode'=>'US',
'owner.4.stakePercentage'=>'10',
'owner.5.firstName'=>'Fifth',
'owner.5.lastName'=>'Owner',
'owner.5.street1'=>'41 E 300 N',
'owner.5.street2'=>'',
'owner.5.city'=>'Spanish Fork',
'owner.5.state'=>'UT',
'owner.5.zipCode'=>'84653',
'owner.5.phone'=>'5555551212',
'owner.5.email'=>'tony@zift.io',
'owner.5.birthDate'=>'19670210',
'owner.5.socialSecurity'=>'123456789',
'owner.5.countryCode'=>'US',
'owner.5.stakePercentage'=>'10',
'owner.6.firstName'=>'Sixth',
'owner.6.lastName'=>'Owner',
'owner.6.street1'=>'41 E 300 N',
'owner.6.street2'=>'',
'owner.6.city'=>'Spanish Fork',
'owner.6.state'=>'UT',
'owner.6.zipCode'=>'84653',
'owner.6.phone'=>'5555551212',
'owner.6.email'=>'tony@zift.io',
'owner.6.birthDate'=>'19670210',
'owner.6.socialSecurity'=>'123456789',
'owner.6.countryCode'=>'US',
'owner.6.stakePercentage'=>'10',
'business.businessName'=>'Start Industries',
'business.legalName'=>'Start Industries',
'business.street1'=>'41 E 300 N',
'business.street2'=>'',
'business.city'=>'Anywhere',
'business.state'=>'CT',
'business.zipCode'=>'06000',
'business.timeZoneCode'=>'EST',
'business.descriptorPhone'=>'8604500119',
'business.email'=>'tony@zift.io',
'business.webSite'=>'',
'business.taxId'=>'147852369',
'business.ownershipStructureType'=>'C',
'business.description'=>'Ghostbusting',
'estimates.annualCardsVolume'=>'111111',
'estimates.annualDirectDebitVolume'=>'222222',
'estimates.avgCardsTransactionAmount'=>'2222',
'estimates.avgDirectDebitTransactionAmount'=>'1111',
'estimates.maxTransactionAmount'=>'12123',
'business.countryCode'=>'US',
'business.merchantCategoryCode'=>'7399',
'business.currencyCode'=>'USD',
'deposit.bankName'=>'Stark Bank',
'deposit.holderName'=>'Tony Stark',
'deposit.accountType'=>'C',
'deposit.routingNumber'=>'324377516',
'deposit.accountNumber'=>'123456789',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/gates/onboarding?',
method: 'POST',
headers: headers,
form: {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100028',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'',
'officer.firstName':'Tony',
'officer.lastName':'Stark',
'officer.street1':'41 E 300 N',
'officer.street2':'',
'officer.city':'Spanish Fork',
'officer.state':'UT',
'officer.zipCode':'84653',
'officer.phone':'5555551212',
'officer.email':'tony@zift.io',
'officer.birthDate':'19670210',
'officer.socialSecurity':'123456789',
'officer.countryCode':'US',
'officer.stakePercentage':'10',
'owner.1.firstName':'First',
'owner.1.lastName':'Owner',
'owner.1.street1':'41 E 300 N',
'owner.1.street2':'',
'owner.1.city':'Spanish Fork',
'owner.1.state':'UT',
'owner.1.zipCode':'84653',
'owner.1.phone':'5555551212',
'owner.1.email':'tony@zift.io',
'owner.1.birthDate':'19670210',
'owner.1.socialSecurity':'123456789',
'owner.1.countryCode':'US',
'owner.1.stakePercentage':'200',
'owner.2.firstName':'Second',
'owner.2.lastName':'Owner',
'owner.2.street1':'41 E 300 N',
'owner.2.street2':'',
'owner.2.city':'Spanish Fork',
'owner.2.state':'UT',
'owner.2.zipCode':'84653',
'owner.2.phone':'5555551212',
'owner.2.email':'tony@zift.io',
'owner.2.birthDate':'19670210',
'owner.2.socialSecurity':'123456789',
'owner.2.countryCode':'US',
'owner.2.stakePercentage':'10',
'owner.3.firstName':'Third',
'owner.3.lastName':'Owner',
'owner.3.street1':'41 E 300 N',
'owner.3.street2':'',
'owner.3.city':'Spanish Fork',
'owner.3.state':'UT',
'owner.3.zipCode':'84653',
'owner.3.phone':'5555551212',
'owner.3.email':'tony@zift.io',
'owner.3.birthDate':'19670210',
'owner.3.socialSecurity':'123456789',
'owner.3.countryCode':'US',
'owner.3.stakePercentage':'10',
'owner.4.firstName':'Fourth',
'owner.4.lastName':'Owner',
'owner.4.street1':'41 E 300 N',
'owner.4.street2':'',
'owner.4.city':'Spanish Fork',
'owner.4.state':'UT',
'owner.4.zipCode':'84653',
'owner.4.phone':'5555551212',
'owner.4.email':'tony@zift.io',
'owner.4.birthDate':'19670210',
'owner.4.socialSecurity':'123456789',
'owner.4.countryCode':'US',
'owner.4.stakePercentage':'10',
'owner.5.firstName':'Fifth',
'owner.5.lastName':'Owner',
'owner.5.street1':'41 E 300 N',
'owner.5.street2':'',
'owner.5.city':'Spanish Fork',
'owner.5.state':'UT',
'owner.5.zipCode':'84653',
'owner.5.phone':'5555551212',
'owner.5.email':'tony@zift.io',
'owner.5.birthDate':'19670210',
'owner.5.socialSecurity':'123456789',
'owner.5.countryCode':'US',
'owner.5.stakePercentage':'10',
'owner.6.firstName':'Sixth',
'owner.6.lastName':'Owner',
'owner.6.street1':'41 E 300 N',
'owner.6.street2':'',
'owner.6.city':'Spanish Fork',
'owner.6.state':'UT',
'owner.6.zipCode':'84653',
'owner.6.phone':'5555551212',
'owner.6.email':'tony@zift.io',
'owner.6.birthDate':'19670210',
'owner.6.socialSecurity':'123456789',
'owner.6.countryCode':'US',
'owner.6.stakePercentage':'10',
'business.businessName':'Start Industries',
'business.legalName':'Start Industries',
'business.street1':'41 E 300 N',
'business.street2':'',
'business.city':'Anywhere',
'business.state':'CT',
'business.zipCode':'06000',
'business.timeZoneCode':'EST',
'business.descriptorPhone':'8604500119',
'business.email':'tony@zift.io',
'business.webSite':'',
'business.taxId':'147852369',
'business.ownershipStructureType':'C',
'business.description':'Ghostbusting',
'estimates.annualCardsVolume':'111111',
'estimates.annualDirectDebitVolume':'222222',
'estimates.avgCardsTransactionAmount':'2222',
'estimates.avgDirectDebitTransactionAmount':'1111',
'estimates.maxTransactionAmount':'12123',
'business.countryCode':'US',
'business.merchantCategoryCode':'7399',
'business.currencyCode':'USD',
'deposit.bankName':'Stark Bank',
'deposit.holderName':'Tony Stark',
'deposit.accountType':'C',
'deposit.routingNumber':'324377516',
'deposit.accountNumber':'123456789'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/gates/onboarding?',
[
requestType=>'create',
userName=>'{{userName}}',
password=>'{{password}}',
profileId=>'11257624370',
resellerId=>'1',
portfolioId=>'100',
feeTemplateId=>'100028',
processingConfigurationScript=>'zift10',
merchantType=>'M',
merchantId=>'',
notifyURL=>'',
cancelURL=>'',
returnURL=>'',
returnURLPolicy=>'page',
isEmbedded=>'0',
pageFormat=>'',
officer.firstName=>'Tony',
officer.lastName=>'Stark',
officer.street1=>'41 E 300 N',
officer.street2=>'',
officer.city=>'Spanish Fork',
officer.state=>'UT',
officer.zipCode=>'84653',
officer.phone=>'5555551212',
officer.email=>'tony@zift.io',
officer.birthDate=>'19670210',
officer.socialSecurity=>'123456789',
officer.countryCode=>'US',
officer.stakePercentage=>'10',
owner.1.firstName=>'First',
owner.1.lastName=>'Owner',
owner.1.street1=>'41 E 300 N',
owner.1.street2=>'',
owner.1.city=>'Spanish Fork',
owner.1.state=>'UT',
owner.1.zipCode=>'84653',
owner.1.phone=>'5555551212',
owner.1.email=>'tony@zift.io',
owner.1.birthDate=>'19670210',
owner.1.socialSecurity=>'123456789',
owner.1.countryCode=>'US',
owner.1.stakePercentage=>'200',
owner.2.firstName=>'Second',
owner.2.lastName=>'Owner',
owner.2.street1=>'41 E 300 N',
owner.2.street2=>'',
owner.2.city=>'Spanish Fork',
owner.2.state=>'UT',
owner.2.zipCode=>'84653',
owner.2.phone=>'5555551212',
owner.2.email=>'tony@zift.io',
owner.2.birthDate=>'19670210',
owner.2.socialSecurity=>'123456789',
owner.2.countryCode=>'US',
owner.2.stakePercentage=>'10',
owner.3.firstName=>'Third',
owner.3.lastName=>'Owner',
owner.3.street1=>'41 E 300 N',
owner.3.street2=>'',
owner.3.city=>'Spanish Fork',
owner.3.state=>'UT',
owner.3.zipCode=>'84653',
owner.3.phone=>'5555551212',
owner.3.email=>'tony@zift.io',
owner.3.birthDate=>'19670210',
owner.3.socialSecurity=>'123456789',
owner.3.countryCode=>'US',
owner.3.stakePercentage=>'10',
owner.4.firstName=>'Fourth',
owner.4.lastName=>'Owner',
owner.4.street1=>'41 E 300 N',
owner.4.street2=>'',
owner.4.city=>'Spanish Fork',
owner.4.state=>'UT',
owner.4.zipCode=>'84653',
owner.4.phone=>'5555551212',
owner.4.email=>'tony@zift.io',
owner.4.birthDate=>'19670210',
owner.4.socialSecurity=>'123456789',
owner.4.countryCode=>'US',
owner.4.stakePercentage=>'10',
owner.5.firstName=>'Fifth',
owner.5.lastName=>'Owner',
owner.5.street1=>'41 E 300 N',
owner.5.street2=>'',
owner.5.city=>'Spanish Fork',
owner.5.state=>'UT',
owner.5.zipCode=>'84653',
owner.5.phone=>'5555551212',
owner.5.email=>'tony@zift.io',
owner.5.birthDate=>'19670210',
owner.5.socialSecurity=>'123456789',
owner.5.countryCode=>'US',
owner.5.stakePercentage=>'10',
owner.6.firstName=>'Sixth',
owner.6.lastName=>'Owner',
owner.6.street1=>'41 E 300 N',
owner.6.street2=>'',
owner.6.city=>'Spanish Fork',
owner.6.state=>'UT',
owner.6.zipCode=>'84653',
owner.6.phone=>'5555551212',
owner.6.email=>'tony@zift.io',
owner.6.birthDate=>'19670210',
owner.6.socialSecurity=>'123456789',
owner.6.countryCode=>'US',
owner.6.stakePercentage=>'10',
business.businessName=>'Start Industries',
business.legalName=>'Start Industries',
business.street1=>'41 E 300 N',
business.street2=>'',
business.city=>'Anywhere',
business.state=>'CT',
business.zipCode=>'06000',
business.timeZoneCode=>'EST',
business.descriptorPhone=>'8604500119',
business.email=>'tony@zift.io',
business.webSite=>'',
business.taxId=>'147852369',
business.ownershipStructureType=>'C',
business.description=>'Ghostbusting',
estimates.annualCardsVolume=>'111111',
estimates.annualDirectDebitVolume=>'222222',
estimates.avgCardsTransactionAmount=>'2222',
estimates.avgDirectDebitTransactionAmount=>'1111',
estimates.maxTransactionAmount=>'12123',
business.countryCode=>'US',
business.merchantCategoryCode=>'7399',
business.currencyCode=>'USD',
deposit.bankName=>'Stark Bank',
deposit.holderName=>'Tony Stark',
deposit.accountType=>'C',
deposit.routingNumber=>'324377516',
deposit.accountNumber=>'123456789'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/gates/onboarding?'
values = {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100028',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'',
'officer.firstName':'Tony',
'officer.lastName':'Stark',
'officer.street1':'41 E 300 N',
'officer.street2':'',
'officer.city':'Spanish Fork',
'officer.state':'UT',
'officer.zipCode':'84653',
'officer.phone':'5555551212',
'officer.email':'tony@zift.io',
'officer.birthDate':'19670210',
'officer.socialSecurity':'123456789',
'officer.countryCode':'US',
'officer.stakePercentage':'10',
'owner.1.firstName':'First',
'owner.1.lastName':'Owner',
'owner.1.street1':'41 E 300 N',
'owner.1.street2':'',
'owner.1.city':'Spanish Fork',
'owner.1.state':'UT',
'owner.1.zipCode':'84653',
'owner.1.phone':'5555551212',
'owner.1.email':'tony@zift.io',
'owner.1.birthDate':'19670210',
'owner.1.socialSecurity':'123456789',
'owner.1.countryCode':'US',
'owner.1.stakePercentage':'200',
'owner.2.firstName':'Second',
'owner.2.lastName':'Owner',
'owner.2.street1':'41 E 300 N',
'owner.2.street2':'',
'owner.2.city':'Spanish Fork',
'owner.2.state':'UT',
'owner.2.zipCode':'84653',
'owner.2.phone':'5555551212',
'owner.2.email':'tony@zift.io',
'owner.2.birthDate':'19670210',
'owner.2.socialSecurity':'123456789',
'owner.2.countryCode':'US',
'owner.2.stakePercentage':'10',
'owner.3.firstName':'Third',
'owner.3.lastName':'Owner',
'owner.3.street1':'41 E 300 N',
'owner.3.street2':'',
'owner.3.city':'Spanish Fork',
'owner.3.state':'UT',
'owner.3.zipCode':'84653',
'owner.3.phone':'5555551212',
'owner.3.email':'tony@zift.io',
'owner.3.birthDate':'19670210',
'owner.3.socialSecurity':'123456789',
'owner.3.countryCode':'US',
'owner.3.stakePercentage':'10',
'owner.4.firstName':'Fourth',
'owner.4.lastName':'Owner',
'owner.4.street1':'41 E 300 N',
'owner.4.street2':'',
'owner.4.city':'Spanish Fork',
'owner.4.state':'UT',
'owner.4.zipCode':'84653',
'owner.4.phone':'5555551212',
'owner.4.email':'tony@zift.io',
'owner.4.birthDate':'19670210',
'owner.4.socialSecurity':'123456789',
'owner.4.countryCode':'US',
'owner.4.stakePercentage':'10',
'owner.5.firstName':'Fifth',
'owner.5.lastName':'Owner',
'owner.5.street1':'41 E 300 N',
'owner.5.street2':'',
'owner.5.city':'Spanish Fork',
'owner.5.state':'UT',
'owner.5.zipCode':'84653',
'owner.5.phone':'5555551212',
'owner.5.email':'tony@zift.io',
'owner.5.birthDate':'19670210',
'owner.5.socialSecurity':'123456789',
'owner.5.countryCode':'US',
'owner.5.stakePercentage':'10',
'owner.6.firstName':'Sixth',
'owner.6.lastName':'Owner',
'owner.6.street1':'41 E 300 N',
'owner.6.street2':'',
'owner.6.city':'Spanish Fork',
'owner.6.state':'UT',
'owner.6.zipCode':'84653',
'owner.6.phone':'5555551212',
'owner.6.email':'tony@zift.io',
'owner.6.birthDate':'19670210',
'owner.6.socialSecurity':'123456789',
'owner.6.countryCode':'US',
'owner.6.stakePercentage':'10',
'business.businessName':'Start Industries',
'business.legalName':'Start Industries',
'business.street1':'41 E 300 N',
'business.street2':'',
'business.city':'Anywhere',
'business.state':'CT',
'business.zipCode':'06000',
'business.timeZoneCode':'EST',
'business.descriptorPhone':'8604500119',
'business.email':'tony@zift.io',
'business.webSite':'',
'business.taxId':'147852369',
'business.ownershipStructureType':'C',
'business.description':'Ghostbusting',
'estimates.annualCardsVolume':'111111',
'estimates.annualDirectDebitVolume':'222222',
'estimates.avgCardsTransactionAmount':'2222',
'estimates.avgDirectDebitTransactionAmount':'1111',
'estimates.maxTransactionAmount':'12123',
'business.countryCode':'US',
'business.merchantCategoryCode':'7399',
'business.currencyCode':'USD',
'deposit.bankName':'Stark Bank',
'deposit.holderName':'Tony Stark',
'deposit.accountType':'C',
'deposit.routingNumber':'324377516',
'deposit.accountNumber':'123456789'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value/Format | Description |
---|---|---|
responseType | create | Indicates the type of response. |
applicationCode | String (15) | Identifier of a merchant's onboarding application within a submitter's system. When present in the request this field is sent back in the response via the notify URL.
Note: Use this field as a definitive link between new onboarding applications and records in your system. |
applicationId | Long | Unique identifier of the merchant's onboarding application generated by Zift . When present in the request this field is sent back in the response via the notify URL. |
merchantId | Integer | Associates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL. |
accountId | Integer | Represents the accountId of the newly created merchant. This ID is present when the new merchant application is approved or in review (also see merchantCreationPolicy ). This ID is not present for declined or pending merchant applications. |
cardsDescriptor | String (10) | Default descriptor for payment card transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.paymentCardDescriptor ). The value is shown on merchant statements. |
directDebitDescriptor | String (10) | Default descriptor for direct debit transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.directDebitDescriptor ). The value is shown on merchant statements. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
Get Application Status
The table and examples below show how to retrieve the status of a previously submitted merchant application.
Name | Value/Format | Description |
---|---|---|
requestType | status | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
applicationId | Long | Required Unique identifier of the merchant's onboarding application generated by Zift . When present in the request this field is sent back in the response via the notify URL. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/gates/onboarding? \
-d "requestType=get-status" \
-d "userName=myusername" \
-d "password=mypassword" \
-d "applicationId=123456" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"&requestType=get-status"
+ "&userName=myusername"
+ "&password=mypassword"
+ "&applicationId=123456"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/gates/onboarding?';
$data = array(
'requestType'=>'get-status',
'userName'=>'myusername',
'password'=>'mypassword',
'applicationId'=>'123456',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"requestType=get-status"
+ "&userName=myusername"
+ "&password=mypassword"
+ "&applicationId=123456"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/gates/onboarding?")
request.Method = "POST"
Dim postData As String
postData = "requestType=get-status"
postData = postData + "&userName=myusername"
postData = postData + "&password=mypassword"
postData = postData + "&applicationId=123456"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/gates/onboarding?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'get-status',
'userName'=>'myusername',
'password'=>'mypassword',
'applicationId'=>'123456',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/gates/onboarding?',
method: 'POST',
headers: headers,
form: {
'requestType':'get-status',
'userName':'myusername',
'password':'mypassword',
'applicationId':'123456'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/gates/onboarding?',
[
requestType=>'get-status',
userName=>'myusername',
password=>'mypassword',
applicationId=>'123456'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/gates/onboarding?'
values = {
'requestType':'get-status',
'userName':'myusername',
'password':'mypassword',
'applicationId':'123456'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value/Format | Description |
---|---|---|
responseType | get-status | Indicates the type of response. |
applicationId | Long | Unique identifier of the merchant's onboarding application generated by Zift . When present in the request this field is sent back in the response via the notify URL. |
merchantId | Integer | This is the merchantId of the newly created merchant. This ID is not present for merchant creation request that result in a pending or declined status. |
accountId | Integer | Represents the accountId of the newly created merchant. This ID is present when the new merchant application is approved or in review (also see merchantCreationPolicy ). This ID is not present for declined or pending merchant applications. |
cardsDescriptor | String (10) | Default descriptor for payment card transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.paymentCardDescriptor ). The value is shown on merchant statements. |
directDebitDescriptor | String (10) | Default descriptor for direct debit transactions that is assigned during onboarding. It consists of the combination of business name and customer service phone (also see business.directDebitDescriptor ). The value is shown on merchant statements. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Application status for the specified applicationId . |
Hosted Payment Pages
Zift Hosted Payment Pages allow you redirect customers to a payment page hosted on our system. When the payment has been completed, the customer will be redirected back to your system. HPPs are typically used when integrators are trying to get to market rapidly or looking for a simple way to reduce PCI scope.
Our HPP integration uses the same transaction API endpoint for sale
or sale-auth
transactions. Before continuing with this section, we recommend becoming familiar with the basic transaction processing outlined in Charge a Card.
Step 1 - Building Your HPP Request
The first step when using a hosted payment page is to create a transaction. To create a transaction you will call our transaction API with the desired transaction type. Typical transaction types
are sale
or sale-auth
. For details on how create a transaction API please see Charge a Card.
processingMode
and notifyURL
. If either of these fields are missing
you will not receive the requestId
necessary to perform the redirect to the hosted payment page correctly.The following shows a basic HPP request. All transaction parameters that would be used in a typical API transaction request can be used with your HPP request. For a list of additional parameter see Charge a Card
Authentication Fields
Name | Value or Format | Description |
---|---|---|
requestType | sale | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
processingMode | queue | Required Defines how the transaction is processed. See integration notes for more information. |
transactionIndustryType | Enum | Required Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
notifyURL | String (255) | Required Presence of this parameter in a regular sale request triggers the Hosted Payment Page. The result of the transaction is also sent to this URL if a definite URL is specified within the field. The format of the callback response to this URL will be the same as the sale , sale-auth , and tokenization responses.Note: If the field's value contains special characters (&, ?, =, etc), it must be URL-encoded. |
cancelURL | String (255) | When the cancelURL is used the HPP will have an option (button) for the user to cancel the transaction. By default, if a user clicks on the cancel button, he or she will be redirected to the URL specified within the cancelURL field. Additionally, if the keyword page is specified within the cancelURL field the customer will be redirected to our confirmation page which will indicate the transaction was cancelled. |
returnURL | String (255) | After a transaction is successfully processed the user will be redirected to the URL specified in this field. If the returnURLPolicy is set to page a confirmation page is rendered indicating the transaction was successful with the specified returnURL included. If the returnURLPolicy is set to redirect the user is redirected to the specified returnURL bypassing the confirmation page.Note: If the field's value contains special characters (&, ?, =, etc), it must be URL-encoded. |
returnURLPolicy | Enum | Indicates the behavior of the returnURLClick for a list of possible values and their descriptions. |
postNotifyURL | String (255) | URL which is used in conjunction with the notifyURL . The result of the transaction is also delivered to this URL with the same information sent to the notifyURL . You can use this parameter if you need to receive a callback within two different systems or in two different locations. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=sale" \
-d "userName=username" \
-d "password=password" \
-d "processingMode=queue" \
-d "transactionIndustryType=RE" \
-d "accountType=R" \
-d "accountId=123456" \
-d "amount=100" \
-d "notifyURL=https://your-notify-url.com" \
-d "cancelURL=https://your-cancel-url.com" \
-d "returnURL=https://your-return-url.com" \
-d "postNotifyURL=https://your-post-notify-url.com" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=sale"
+ "&userName=username"
+ "&password=password"
+ "&processingMode=queue"
+ "&transactionIndustryType=RE"
+ "&accountType=R"
+ "&accountId=123456"
+ "&amount=100"
+ "¬ifyURL=https://your-notify-url.com"
+ "&cancelURL=https://your-cancel-url.com"
+ "&returnURL=https://your-return-url.com"
+ "&postNotifyURL=https://your-post-notify-url.com"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'sale',
'userName'=>'username',
'password'=>'password',
'processingMode'=>'queue',
'transactionIndustryType'=>'RE',
'accountType'=>'R',
'accountId'=>'123456',
'amount'=>'100',
'notifyURL'=>'https://your-notify-url.com',
'cancelURL'=>'https://your-cancel-url.com',
'returnURL'=>'https://your-return-url.com',
'postNotifyURL'=>'https://your-post-notify-url.com',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=sale"
+ "&userName=username"
+ "&password=password"
+ "&processingMode=queue"
+ "&transactionIndustryType=RE"
+ "&accountType=R"
+ "&accountId=123456"
+ "&amount=100"
+ "¬ifyURL=https://your-notify-url.com"
+ "&cancelURL=https://your-cancel-url.com"
+ "&returnURL=https://your-return-url.com"
+ "&postNotifyURL=https://your-post-notify-url.com"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=sale"
postData = postData + "&userName=username"
postData = postData + "&password=password"
postData = postData + "&processingMode=queue"
postData = postData + "&transactionIndustryType=RE"
postData = postData + "&accountType=R"
postData = postData + "&accountId=123456"
postData = postData + "&amount=100"
postData = postData + "¬ifyURL=https://your-notify-url.com"
postData = postData + "&cancelURL=https://your-cancel-url.com"
postData = postData + "&returnURL=https://your-return-url.com"
postData = postData + "&postNotifyURL=https://your-post-notify-url.com"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'sale',
'userName'=>'username',
'password'=>'password',
'processingMode'=>'queue',
'transactionIndustryType'=>'RE',
'accountType'=>'R',
'accountId'=>'123456',
'amount'=>'100',
'notifyURL'=>'https://your-notify-url.com',
'cancelURL'=>'https://your-cancel-url.com',
'returnURL'=>'https://your-return-url.com',
'postNotifyURL'=>'https://your-post-notify-url.com',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'sale',
'userName':'username',
'password':'password',
'processingMode':'queue',
'transactionIndustryType':'RE',
'accountType':'R',
'accountId':'123456',
'amount':'100',
'notifyURL':'https://your-notify-url.com',
'cancelURL':'https://your-cancel-url.com',
'returnURL':'https://your-return-url.com',
'postNotifyURL':'https://your-post-notify-url.com'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'sale',
userName=>'username',
password=>'password',
processingMode=>'queue',
transactionIndustryType=>'RE',
accountType=>'R',
accountId=>'123456',
amount=>'100',
notifyURL=>'https://your-notify-url.com',
cancelURL=>'https://your-cancel-url.com',
returnURL=>'https://your-return-url.com',
postNotifyURL=>'https://your-post-notify-url.com'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'sale',
'userName':'username',
'password':'password',
'processingMode':'queue',
'transactionIndustryType':'RE',
'accountType':'R',
'accountId':'123456',
'amount':'100',
'notifyURL':'https://your-notify-url.com',
'cancelURL':'https://your-cancel-url.com',
'returnURL':'https://your-return-url.com',
'postNotifyURL':'https://your-post-notify-url.com'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | sale | Indicates the type of response. |
requestId | String (40) | Identifier of the API request. This value will be used in your subsequent HPP redirect. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
accountId | String (12) | Indicates the accountId |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
Step 2 - Redirect
Now that you have have built your transaction request and received a response it's time to redirect your user to the Hosted Payment Page. To redirect the user
to the HPP page you simply set the location
variable in the http response to your client. The value should be set to the Zift HPP redirect URL.
See example below.
https://sandbox-secure.zift.io/gates/redirects/"requestId" < - This is the requestId from your original transaction response.
Example
https://sandbox-secure.zift.io/gates/redirects/rf44dO124-ecff-4c0c-aqf6-9a3f0aacfb98
At this point Zift will take care of displaying the payment page and processing the payment. The user will either be taken back to your site or see a thank you page depending on how you set the returnURL details.
Batch Operations
Batch File Creation
In addition to our real time API, Zift merchants may also upload transaction batches via our SFTP server. Batch files will be processed and a return file created
letting the merchant know the status of each transaction listed in their batch input file. Typically batch files are processed shortly after upload. However, return
files wil not be generated until the merchants transactions have settled. Batch files can be used to process many types of transactions. See transactionType
in the input file field section for supported transaction types.
All files, uploaded to the FTP, are required to be submitted as a single pipe-delimited text file in CSV format. To reduce the size of the file
and ensure its integrity, the file should be archived by any standard ZIP client with no password protection applied. Additionally each ZIP file
should be PGP encrypted to ensure sensitive data at rest has some level of protection. The resulting PGP file is uploaded to the Zift sftp server
and placed in the merchant /inbox
directory.
After a file is uploaded to the SFTP server, it is processed by the system. After the files have been processed and settlement has completed, the
response file is generated. The response file, which is a ZIP archive with a compressed CSV file inside, can be downloaded from the /outbox
folder. The response has the exact same name as the request file
If the request file is damaged or contains syntax errors, the system generates a Parsing Error File. If the file contains validation errors, the system
generates a Validation Error File. Both files are in CSV format and placed in the /outbox
folder after being generated. Note if an error
file is generated, your request file is considered rejected. As a result transactions are not processed and a response file is not be generated.
Parsing error file is generated when a request file is damaged and cannot be read or processed. For example, the file is generated when it is impossible to extract a ZIP file or read the content of the file. The file contains a message that explains why the file could not be processed. If an error file has been received the request file must be corrected and re-uploaded for re-processing.
Validation ErrorsValidation error files are generated when a request file includes some records that cannot be fully validated. This means the file contains transactions that had data elements that could not be properly verified before processing. If validation errors in a Request File are non-critical a validation file is not generated. In this case, all transactions, except those that received non-critical validation errors, will be processed by a processor.
Critical Validation Errors- Invalid characters – non-numeric symbols are added into numeric fields.
- Invalid date format – date format differs from yyyyMMdd for transactionDate field and from mmYY for the accountAccessory field.
- Invalid token – token does not follow required token structure.
- Invalid account ID – incorrect value for the accountId field.
If a request file contains non-critical validation errors, validation file is not generated. In this case, all transactions, except those that got non-critical validation errors, will be processed by a processor. Non-critical validation errors are the following:
- Incorrect card number – card number is not validated by mod 10 algorithm verification.
- Invalid routing number – routing number is not well-formatted.
- Required fields are missing.
- Processing input file (inbox): monthly_billing_20200101.pgp (CSV file zipped and encrypted)
- Processing output file (outbox): monthly_billing_20200101.zip (CSV file zipped)
- Parse error output file (outbox): monthly_billing_20200101.error.zip (CSV file zipped)
- Validation error output file (outbox): monthly_billing_20200101.validation.zip (CSV file zipped)
Upload Endpoints
- Sandbox: sandbox-sftp.zift.io
- Production: sftp.zift.io
Account Information
Name | Value or Format | Description |
---|---|---|
accountId | String (12) | Required Reference to the account associated with the transaction for the specific record in the input batch file. |
accountType | Enum | Required Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountAccessory | String (10) | Required Card expiration date or bank routing number. |
accountNumber | String (20) | Conditional Credit card or bank account number. This field is required unless you are using a token to represent a credit card or bank account number. If you are using a token then place the value in the token field.
|
token | String (40) | Conditional The token value represent a credit card or bank account number in the Zift system. Tokens are received as part of previoussale or sale-auth requests and can be used in subsequent requests. Tokens can also be generated by using the tokenization API call. This field is required if you are not providing an accountNumber . |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Name of the card holder or bank account owner. |
Transaction Information
Name | Value or Format | Description |
---|---|---|
amount | Integer (in cents) | Required Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢ |
feeAmount | Integer | Amount of service fee included in amount field. |
taxAmount | Integer | Tax amount charged on the order/transaction. Included in the total amount. See integration notes for more information. |
transactionType | Enum | Type of the transaction. |
transactionIndustryType | Enum | Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions. |
rebillAttemptCount | Integer | Number of the attempts made to collect an amount of the transaction. Used when the current transaction is a reattempt of a previously declined transaction (with the same accountNumber). |
memo | String (255) | Description of the transaction. Returned in the response. |
originalNetworkTransactionId | String (30) | Identifier of the first transaction in a sequence of payments. Provided by a payment network. Used for installment and recurring payments only. |
sequenceNumber | Integer | Sequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments onlytransactionCategory= I or R . |
sequenceCount | Integer | Total number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only.transactionCategory= I |
Cross Reference Information
Name | Value or Format | Description |
---|---|---|
originalTransactionId | Long | Identifier of the original sale transaction. Used for refund transactions only. |
transactionCode | String (60) | An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details.
Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
customerAccountCode | String(60) | A merchant defined cross-reference field which can be used to identify a customer within an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. |
customerAccountInternalCode | String (60) | A unique identifier of a customer within an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the customerAccountCode . See the cross reference notes for more details. |
itemCode | String (60) | Identifier of a purchased product or service within your system or platform. |
Billing Information
Name | Value or Format | Description |
---|---|---|
street | String (128) | The street address of the card holder. |
city | String (50) | The city of the card holder. |
state | String (2) | The state of the card holder. |
zipCode | String (15) | The zip code of the card holder. |
phone | String (20) | Phone number associated with a payment card or bank account holder. |
String (100) | Email associated with a payment card or bank account holder. |
Response Codes Information (Response File)
Name | Value or Format | Description |
---|---|---|
warningCode | String (1) | Code warning that non-critical issue with the transaction are present. |
responseCode | String (5) | Response code returned for the transaction. See response codes for more information. |
responseMessage | String (255) | Response message returned for the transaction. See response codes for more information. |
providerResponseCode | String (20) | Response code returned by the payment and acquiring networks. See integration notes for more information. Not always present in the response, supports legacy systems. |
providerResponseMessage | String (255) | Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems. |
avsResponseCode | String (2) | AVS response code if address information has been provided. See response codes for more information. |
providerAvsResponseCode | String (5) | AVS response code returned by an underlying payment network or acquirer. Supports legacy systems. |
Account Information (Response File)
Name | Value or Format | Description |
---|---|---|
accountId | String (12) | Reference to the account associated with the transaction for the specific record in the input batch file. |
accountType | Enum | Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
holderName | String (150) | Name of the card holder or bank account owner. |
Transaction Information (Response File)
Cross Reference Information (Response File)
Name | Value or Format | Description |
---|---|---|
submissionId | Long | Identifier of the batch associated with the transaction request. |
transactionId | Long | Unique identifier of the transaction within Zift. Always present in the response. |
originalTransactionId | Long | Identifier of the original sale transaction. Used for refund transactions only. |
transactionCode | String (60) | An identifier of the transaction from an external system. If present in the request it will be returned in the response. |
originalTransactionCode | String (60) | Value of transactionCode supplied in the original transaction. Used for void only. |
providerTransactionCode | String (25) | Identifier of the transaction from the card networks. |
transactionInternalCode | String (60) | A unique identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. It should only be used as a supplement to the transactionCode . See the cross reference notes for more details. |
Account Update Information (Response File)
Name | Value or Format | Description |
---|---|---|
accountNumberUpdated | String (20) | Updated number of a payment card or bank account. Present if provided by an account updater. |
accountAccessoryUpdated | String (14) | Updated payment card's expiration date or bank account's routing number. Present if provided by an account updater. |
accountTypeUpdated | Enum | Updated type of an account used in the transaction. Present if provided by an account updater. |
holderNameUpdated | String (100) | Updated name of a payment card or bank account holder. Present if provided by an account updater. |
tokenUpdated | String (40) | Updated token generated based on the updated account information, that has been provided by an account updater. |
Click the links below to download example SFTP input a output files
Example Input File: basic-sftp-input-file-example.zip
Example Output File: basic-sftp-output-file-example.zip
Close Cycle
requestType=close-cycle
The close-cycle
operation allows you to close a specific batch and send all transactions within the batch for settlement.
This applies to all transactions in a batch regardless of source (API transaction or batch upload file).
Name | Value or Format | Description |
---|---|---|
requestType | close-cycle | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (32) | Reference to a terminal associated with the API call. |
isSettlementApproved | Boolean | Indicates whether settlement has been approved. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=close-cycle" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=close-cycle"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'close-cycle',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=close-cycle"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=close-cycle"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'close-cycle',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'close-cycle',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'close-cycle',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'close-cycle',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)#
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | close-cycle | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
terminalId | String (12) | Terminal ID associated with the transaction. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. |
totalTransactionCount | Integer | Total transaction count. |
totalTransactionAmount | Integer | Total transaction amount. |
totalSaleCount | Integer | Total count of sale transactions. |
totalSaleAmount | Integer | Total amount of sale transactions. |
totalSaleAuthCount | Integer | Total count of sale-auth transactions. |
totalSaleAuthAmount | Integer | Total amount of sale-auth transactions. |
totalCreditCount | Integer | Total count of credit transactions. |
totalCreditAmount | Integer | Total amount of credit transactions. |
totalCreditAuthCount | Integer | Total count of credit-auth transactions. |
totalCreditAuthAmount | Integer | Total amount of credit-auth transactions. |
totalVoidCount | Integer | Total count of voids. |
voidAmount | Integer (in cents) | Amount of void associated with the transaction. |
totalDeclineCount | Integer | Total count of declines. |
totalDeclineAmount | Integer | Total amount of declines. |
Balance Inquiry Cycle
requestType=balance-inquiry-cycle
An operation that allows you to validate totals within an open batch before initiating a close-cycle
request to close the batch and send for settlement.
Name | Value or Format | Description |
---|---|---|
requestType | balance-inquiry-cycle | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
terminalId | String (32) | Reference to a terminal associated with the API call. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=balance-inquiry-cycle" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=balance-inquiry-cycle"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'balance-inquiry-cycle',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=balance-inquiry-cycle"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=balance-inquiry-cycle"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'balance-inquiry-cycle',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'balance-inquiry-cycle',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'balance-inquiry-cycle',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'balance-inquiry-cycle',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | balance-inquiry-cycle | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
terminalId | String (12) | Terminal ID associated with the transaction. |
cycleCode | Long | Identifier of a retail cycle associated with the transaction. |
totalTransactionCount | Integer | Total transaction count. |
totalTransactionAmount | Integer | Total transaction amount. |
totalSaleCount | Integer | Total count of sale transactions. |
totalSaleAmount | Integer | Total amount of sale transactions. |
totalSaleAuthCount | Integer | Total count of sale-auth transactions. |
totalSaleAuthAmount | Integer | Total amount of sale-auth transactions. |
totalCreditCount | Integer | Total count of credit transactions. |
totalCreditAmount | Integer | Total amount of credit transactions. |
totalCreditAuthCount | Integer | Total count of credit-auth transactions. |
totalCreditAuthAmount | Integer | Total amount of credit-auth transactions. |
totalVoidCount | Integer | Total count of voids. |
voidAmount | Integer (in cents) | Amount of void associated with the transaction. |
totalDeclineCount | Integer | Total count of declines. |
totalDeclineAmount | Integer | Total amount of declines. |
Reporting
Use our reporting API to get detailed information about transactions, transaction history and merchants.
Transaction List
You can specify a specific type of transaction or a combination of transactions you want to receive back in the response with the transactionType
parameter. To load a combination of transaction types, multiple pipe-delimited values should be specified as a Type
value.
You can indicate response format at the end of the API endpoint
Sandbox- https://sandbox-portal.zift.io/reports/transaction-list.data
Pipe Delimited
(recommended) - https://sandbox-portal.zift.io/reports/transaction-list.csv
Comma Separated
- https://portal.zift.io/reports/transaction-list.data
Pipe Delimited
(recommended) - https://portal.zift.io/reports/transaction-list.csv
Comma Separated
Depending on the type of the transaction, transactionDate
and settlementDate
may vary or be the same.
Name | Value or Format | Description |
---|---|---|
requestType | transaction-list | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
fromDate | yyyyMMdd | Required Beginning date of the range for which the report is generated. |
toDate | yyyyMMdd | Required End date of the range for which the report is generated. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
batchId | Long | Identifier of a batch for which the report is generated. |
status | Enum | Status of transactions included in the report. |
type | Enum | The type of transaction or transactions that will be exported. By default all transaction types will be included in the export unless otherwise specified. To load a combination of transaction types, multiple pipe-delimited values should be specified as the transactionType value.
|
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/reports/transaction-list.data? \
-d "userName={userName}" \
-d "password={password}" \
-d "accountId=123456798" \
-d "fromDate=20181201" \
-d "toDate=20181230" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/reports/transaction-list.data?",
"&userName={userName}"
+ "&password={password}"
+ "&accountId=123456798"
+ "&fromDate=20181201"
+ "&toDate=20181230"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/reports/transaction-list.data?';
$data = array(
'userName'=>'{userName}',
'password'=>'{password}',
'accountId'=>'123456798',
'fromDate'=>'20181201',
'toDate'=>'20181230',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/reports/transaction-list.data?",
"userName={userName}"
+ "&password={password}"
+ "&accountId=123456798"
+ "&fromDate=20181201"
+ "&toDate=20181230"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/reports/transaction-list.data?")
request.Method = "POST"
Dim postData As String
postData = "userName={userName}"
postData = postData + "&password={password}"
postData = postData + "&accountId=123456798"
postData = postData + "&fromDate=20181201"
postData = postData + "&toDate=20181230"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/reports/transaction-list.data?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'userName'=>'{userName}',
'password'=>'{password}',
'accountId'=>'123456798',
'fromDate'=>'20181201',
'toDate'=>'20181230',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/reports/transaction-list.data?',
method: 'POST',
headers: headers,
form: {
'userName':'{userName}',
'password':'{password}',
'accountId':'123456798',
'fromDate':'20181201',
'toDate':'20181230'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/reports/transaction-list.data?',
[
userName=>'{userName}',
password=>'{password}',
accountId=>'123456798',
fromDate=>'20181201',
toDate=>'20181230'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/reports/transaction-list.data?'
values = {
'userName':'{userName}',
'password':'{password}',
'accountId':'123456798',
'fromDate':'20181201',
'toDate':'20181230'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
account.id | Integer | Unique identifier of a merchant account. This ID is generated by Zift when the merchant account is created. |
account.name | String (100) | Name of the merchant account. |
transaction.id | Long | Unique identifier of the transaction. Generated by Zift |
transaction.code | String (60) | Identifier of the transaction supplied by a submitter. |
transaction.batchId | Long | Identifier of the batch associated with the transaction. Generated by Zift |
transactionType | Enum | Type of the transaction. |
transaction.activityDate | Date | Date when the transaction was submitted. |
transaction.activityTime | String (6) | Time when the transaction was submitted. |
transaction.captureDate | Date | Date when the transaction was captured. |
transaction.captureTime | String (6) | Time when the transaction was captured. |
transaction.originalAmount | Integer | Total authorized amount of the transaction (without fees, taxes, discounts, etc applied). Amount in cents. |
transaction.netAmount | Integer | Total settled amount. Amount in cents. |
transaction.submissionType | Enum | Submission type of the transaction. |
transaction.accountTypeGroup | Enum | Type of an account associated with the transaction. |
transaction.industryType | Enum | Industry type of the transaction. |
transaction.holderName | String (150) | Name of a payment card or bank account holder. |
transaction.accountType | Enum | Type of an account used in the transaction. |
transaction.accountNumber | String (20) | Masked number of a payment card or bank account associated with the transaction. The first 1 and the last 4 digits of an account number (e.g. 4********1111). |
transaction.accountAccessory | String (14) | Payment card's expiration date or bank account's routing number. |
transaction.token | String (40) | Token associated with a payment card or bank account. Can be used instead of a payment card or bank account number for future transaction processing. |
transaction.status | Enum | Current status of the transaction.. |
transaction.isSettled | Boolean | Indicates whether the transaction has been settled at a processor's side. |
transaction.memo | String (255) | Additional information about the transaction. |
transaction.approvalCode | String (100) | Authorization number given by a cardholder's bank. Often shown on a credit card receipt. |
transaction.responseCode | String (5) | Response code returned by Zift. |
transaction.responseMessage | String (255) | Response message returned by Zift. |
transaction.avsResponseCode | String (5) | AVS response code returned by Zift. (if address information has been provided). See response codes for more information. |
transaction.cscResponseCode | String (3) | CSC response code returned by Zift. |
transaction.processor.transactionId | String (50) | Identifier of the transaction in the upstream processor or bank system. |
transaction.processor.responseCode | String (20) | Response code returned by the upstream processor or bank |
transaction.processor.responseMessage | String (260) | Response message returned by the upstream processor or bank |
transaction.processor.avsResponseCode | String (5) | AVS response code returned by the upstream processor or bank. |
transaction.billingAddress.street | String (128) | Street of a billing address associated with a payment card or bank account holder. |
transaction.billingAddress.city | String (50) | City of a billing address associated with a payment card or bank account holder. |
transaction.billingAddress.state | String (2) | State of a billing address associated with a payment card or bank account holder. |
transaction.billingAddress.zipCode | String (15) | ZIP code of a billing address associated with a payment card or bank account holder. |
transaction.billingAddress.countryCode | String (2) | Country of a billing address associated with a payment card or bank account holder. |
transaction.billingAddress.phone | String (20) | Phone number associated with a payment card or bank account holder. |
transaction.billingAddress.email | String (100) | Email associated with a payment card or bank account holder. |
transaction.terminal.id | Long | Unique identifier of the terminal if a terminal was used to run the transaction. |
transaction.terminal.code | String (60) | Identifier of the terminal supplied by a submitter if a terminal was used to run the transaction. |
transaction.references.transactionInternalCode | String (60) | Unique internal identifier of the transaction supplied by a submitter's system. |
transaction.references.customerAccountCode | String (60) | Identifier of a customer supplied by a submitter's system. |
transaction.references.customerAccountInternalCode | String (60) | Unique internal identifier of a customer supplied by a submitter. |
transaction.references.itemCode | String (60) | Identifier of a purchased product or service supplied by a submitter. |
transaction.references.userCode | String (60) | Identifier of a user supplied by a submitter. |
Find
requestType=find
The find
request allows you to retrieve the original response of a particular transaction using either the transactionId
or transactionCode
associated with the original transaction.
You can pull information about the following transaction types:
sale-auth
sale
credit
refund
sale-info
credit-info
account-verification
balance-inquiry
convenience-fee
capture
Name | Value or Format | Description |
---|---|---|
requestType | find | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
transactionOriginCode | String (35) | Identifier of a location within a merchant's application or integration from which the transaction is originated. For example, you can use this field if you send us transactions from a back end billing system and a front end point of sale.
We assign each integrator their respective code to be included when the transaction is submitted. To indicate different locations, append the location value after the transaction origin code using : as a separator.
|
transactionCode | String (60) | Conditional An identifier of the transaction from an external system. It is stored on the transaction record and returned in the response. See the cross reference notes for more details. Note: This field does not have a unique constraint and can be used several times. To prevent processing transactions associated with the same transactionCode and accountId values please contact support to set the transaction duplicate policy on the account. |
transactionId | Long | Conditional Unique identifier of the transaction within Zift. Always present in the response. |
clientHost | String (60) | IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information. |
Find Request Conditions
transactionCode
is used.
Field | Usage |
---|---|
transactionId | Not used |
transactionCode | Required |
transactionId
is used.
Field | Usage |
---|---|
transactionId | Required |
transactionCode | Not used |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=find" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "transactionId=123456" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=find"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'find',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=find"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&transactionId=123456"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=find"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&transactionId=123456"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'find',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'transactionId'=>'123456',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'find',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'find',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
transactionId=>'123456'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'find',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'transactionId':'123456'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | find | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
terminalId | String (12) | Terminal ID associated with the transaction. |
accountType | Indicates the accountType used in the transaction. If present in the request it will be returned in the response. | |
extendedAccountType | Enum | Brand of a payment card or type of an account used in the transaction. Always present in the response. Click here for a list of possible values and their descriptions. |
accountNumberMasked | String (20) | Masked number of a payment card or bank account associated with the transaction (e.g. 4********5655). The first and last 4 digits of an account number. Always present in the response. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
accountAccessory | String (10) | Card expiration date or bank routing number. |
accountData | String (500) | Track/EMV data of a payment card. See integration notes for more information. |
holderType | P or O | Type of a payment card or bank account holder. Set value to O for level II and level III transactions. P , personal, is the default. |
holderName | String (150) | Name of the card holder or bank account owner. |
token | String (40) | Token associated with the payment card or bank account. Can be used to process future transactions. |
balance | Integer (in cents) | For debit and gift cards only. Balance remaining on a card used for the transaction. |
currencyCode | String (3) | Indicates currency of transaction. If present in the request it will be returned in the response. |
amount | Integer (in cents) | Specifies the total authorized amount of the transaction. |
originalAmount | Integer | Amount provided in the request. Differs from amount value if partial authorization has occurred. |
feeAmount | Integer | Contains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance. Note: Based on merchant configurations, actual processing/interchange fee will be deducted either from the amount remitted to the organization beneficiary or from the service fee amount of the submitter. |
transactionDate | Date (yyyyMMdd) | Date of the transaction. |
transactionType | The type of transaction or transactions that will be exported. By default, all transaction types will be included in the export unless otherwise specified. To load a combination of transaction types, multiple pipe-delimited values should be specified as the transactionType value.
|
Merchant Info
requestType=merchant-info
Allows you to retrieve the business information about a merchant.
See the Response tab below for a list of the fields returned in the response.
Name | Value or Format | Description |
---|---|---|
requestType | merchant-info | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Specifies the merchant account ID you wish to look up. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=merchant-info" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
#
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=merchant-info"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
#
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'merchant-info',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=merchant-info"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=merchant-info"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'merchant-info',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body#
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'merchant-info',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})#
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'merchant-info',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001'
],
);
print $req->content;#
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'merchant-info',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)o##
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | merchant-info | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
merchantName | String (50) | Merchants business name. |
street1 | String (128) | Street of the business address (line 1). |
street2 | String (128) | Street of the business address (line 2). |
zipCode | String (9) | ZIP code of the business address. |
city | String (50) | City of the merchant's business address. |
state | String (3) | State code of the merchant's business address. |
countryCode | String (3) | Country code of the merchant's business address. |
workHours | String (1024) | Work hours when the merchant's business operates. |
customerServicePhone | String (15) | The merchant's business phone number used to assist with customer questions. |
merchantEmail | String (100) | Merchant's email address. |
logo | String (100) | Logo associated with the merchant. Base 64 encoded PNG image. |
Miscellaneous
Ping
requestType=ping
An operation to verify availability of the server and get the current version of the API.
Name | Value or Format | Description |
---|---|---|
requestType | ping | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=ping" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=ping"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'ping',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=ping"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=ping"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'ping',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'ping',
'userName':'myUsername',
'password':'myP%40ssword'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'ping',
userName=>'myUsername',
password=>'myP%40ssword'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'ping',
'userName':'myUsername',
'password':'myP%40ssword'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | ping | Indicates the type of response. |
implementationVersion | String (50) | Current implementation version of the application. |
specificationVersion | String (20) | Current version of the application specification. |
Bank Data
requestType=bank-data
Allows you to extract information about a bank associated with a direct debit including the banks address and phone number.
Name | Value or Format | Description |
---|---|---|
requestType | bank-data | Required Specifies the type of operation to be performed. |
userName | String (50) | Required Name of a user that initiates the API call. |
password | String (32) | Required Password of a user that initiates the API call. |
accountId | String (12) | Required Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId |
accountAccessory | String (10) | Required Bank routing number. |
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.zift.io/gates/xurl? \
-d "requestType=bank-data" \
-d "userName=myUsername" \
-d "password=myP%40ssword" \
-d "accountId=2001" \
-d "terminalId=001" \
-d "accountAccessory=021000021" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"&requestType=bank-data"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&terminalId=001"
+ "&accountAccessory=021000021"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-secure.zift.io/gates/xurl?';
$data = array(
'requestType'=>'bank-data',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'terminalId'=>'001',
'accountAccessory'=>'021000021',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-secure.zift.io/gates/xurl?",
"requestType=bank-data"
+ "&userName=myUsername"
+ "&password=myP%40ssword"
+ "&accountId=2001"
+ "&terminalId=001"
+ "&accountAccessory=021000021"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-secure.zift.io/gates/xurl?")
request.Method = "POST"
Dim postData As String
postData = "requestType=bank-data"
postData = postData + "&userName=myUsername"
postData = postData + "&password=myP%40ssword"
postData = postData + "&accountId=2001"
postData = postData + "&terminalId=001"
postData = postData + "&accountAccessory=021000021"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-secure.zift.io/gates/xurl?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'bank-data',
'userName'=>'myUsername',
'password'=>'myP%40ssword',
'accountId'=>'2001',
'terminalId'=>'001',
'accountAccessory'=>'021000021',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-secure.zift.io/gates/xurl?',
method: 'POST',
headers: headers,
form: {
'requestType':'bank-data',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'terminalId':'001',
'accountAccessory':'021000021'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-secure.zift.io/gates/xurl?',
[
requestType=>'bank-data',
userName=>'myUsername',
password=>'myP%40ssword',
accountId=>'2001',
terminalId=>'001',
accountAccessory=>'021000021'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-secure.zift.io/gates/xurl?'
values = {
'requestType':'bank-data',
'userName':'myUsername',
'password':'myP%40ssword',
'accountId':'2001',
'terminalId':'001',
'accountAccessory':'021000021'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)
List of parameters sent back as part of the API response.
Name | Value or Format | Description |
---|---|---|
responseType | bank-data | Indicates the type of response. |
accountId | String (12) | Indicates the accountId |
routingNumber | String (10) | Bank routing number used in the request. |
bankName | String (100) | Name of the bank. |
servicingFRBNumber | Integer | Servicing routing number of the federal reserve bank's main office. |
countryCode | String (2) | Country of the bank. |
state | String (2) | The state of the bank. |
zipCode | String (15) | The zip code of the bank. |
city | String (50) | The city of the bank. |
street | String (128) | The street address of the bank. |
officeCode | String (1) | Code of the bank's office. |
phoneNumber | String (20) | Phone number of the bank. |
Test Data
Below is all of the information that you will need to test your integration while working in our sandbox environment.
Test Cards
The following accounts will be accepted by the test server's validation mechanism and thus can be used for preliminary testing.
Card Type | Card Number |
---|---|
Visa | 4111111111111111 |
MasterCard | 5499740000000057 |
Discover | 6011000991001201 |
Amex | 371449635392376 |
Visa (Debit) | 4217651111111119 |
MasterCard (Debit) | 5149612222222229 |
Test Bank Accounts
The following accounts will be accepted by the test server's validation mechanism and thus can be used for preliminary testing.
Account Type | Account Number | Routing Number |
---|---|---|
US Checking | 4099999992 | 021000021 |
AU Checking | 7694200031 | 093088 |
CA Checking | 5682100032 | 053133052 |
Test Amount Ranges
As part of your testing the amount ranges specified below can be used to trigger specific response codes from the server. Any valid test account number and any properly formatted billing address can be used for the test.
Works with the sale
and sale-auth
operations.
Amount Range | Response Code | Response Message |
---|---|---|
5.00 – 69.99 | A01 | Approved |
70.00 – 79.99 | D05 | Invalid card number |
80.00 – 89.99 | D10 | Card reported lost/stolen |
90.00 – 99.99 | D30* | Call for Authorization * |
100.00 – 109.99 | D04 | Hold - Pick up card |
110.00 – 119.99 | D08 | CSC is invalid |
120.00 – 129.99 | D03 | Insufficient Funds |
130.00 – 139.99 | E02 | Processing Network Unavailable |
140.00 – 149.99 | E09 | Processing Network Error |
150.00 – 159.99 | A05** | Partially Approved** |
160.00 – 169.99 | D24*** | Chargeback received*** |
30,000 – 150,000 | A01 | Approved |
(*)This range is designated to test voice authorization. sale
and sale-auth
request in the amount between $90.00 – 99.99 will result in D30
decline code, however, if approval code 012345 is specified, then A01
will be received.
(**)This range is designated to test partial authorizations. By setting sale
with this amount range the partially approved transaction will be received. Approved amount will be $10 less than the originally requested amount.
Partially Approved (A05
) response can be received under the condition if isPartialAuthorization
is set to 1 and transactionIndustryType
is set to either Retail or Restaurant, otherwise Insufficient Funds (D03
) response is received.
(***)This range is designated to test chargebacks. The response will be A01
, however after the cycle is closed (batches settled for direct debit), a chargeback will be generated for any transactions in this range.
Amount Range | Response Code | Response Message |
---|---|---|
5.00 – 69.99 | A01 | Approved |
70.00 – 79.99 | R05 | Unauthorized debit to consumer using corporate sec code |
80.00 – 89.99 | R02 | Account closed |
90.00 – 99.99 | R08 | Stop payment or stop on source document |
100.00 – 109.99 | R16 | Account frozen |
110.00 – 119.99 | R03 | Unauthorized debit to consumer using corporate sec code |
120.00 – 129.99 | R01 | Insufficient Funds |
130.00 – 139.99 | E02 | Processing Network Unavailable |
140.00 – 149.99 | E09 | Processing Network Error |
150.00 – 159.99 | A01 | Approved |
160.00 – 169.99 | A01 | Approved |
30,000 – 150,000 | A01 | Approved |
Use the following range to test a credit
transaction.
Amount Range | Response Code | Response Message |
---|---|---|
5.00 – 69.99 | A02 | Credit Posted |
Account Verification
As part of your testing the ZIP codes specified below can be used to trigger specific response codes from the server.
All non-expired expiration dates are valid.
Zip Code | Response Code | Response Message |
---|---|---|
11111 | A01 | Approved |
55555 | D05 | Invalid card number (Invalid Account Number) |
00010 | D10 | Card reported lost/stolen (Lost/Stolen Card) |
00001 | D01 | Denied by customer's bank (Do Not Honor) |
88888 | D08 | CSC is invalid (Decline CSC/CID Fail) |
AVS Verification
As part of your testing the ZIP codes specified below can be used to trigger specific AVS response codes from the server.
Zip Code | AVS Response Code | Response Message |
---|---|---|
11111 | 00 | AVS Error - Retry, System unavailable or Timed out |
22222 | 46 | Street address doesn't match, 5-digit ZIP matches |
33333 | 43 | Street address not available (not verified), ZIP matches |
44444 | 40 | Address failed |
55555 | 4F | Street address and ZIP match |
CSC Verification
As part of your testing the CSC codes specified below can be used to trigger specific CSC response codes from the server.
CSC Code | CSC Response Code | Response Message |
---|---|---|
111 | M | Matches |
222 | N | Not matches |
333 | P | Not processed |
444 | S | Should be present |
555 | U | Issuer is not certified |
Balance Inquiry
As part of your testing the month value of the expiration date can be used to trigger specific response in balance inquiry requests.
Month | Balance Amount (in $) | Balance Amount (in ¢) |
---|---|---|
01 | 100 | 10000 |
02 | 10 | 1000 |
12 | 0 | 0 |
Bank Identifier (BIN)
As part of the testing, the month value of the expiration date can be used to trigger specific information associated with a particular BIN.
Month | Card Type | Issuing Bank Country |
---|---|---|
01 | Credit | US Issued |
02 | Credit | Canada Issues |
03 | Credit | UK Issued |
04 | Regulated Debit | US Issued |
05 | Non-Regulated Debit | US Issued |
06 | Non-Regulated Debit | Canada Issued |
07 | Non-Regulated Debit | UK Issued |
Response Codes
Our API provides various response and error reasons that can help you fine tune your integration and handle all possible API exceptions.
Payment Card Response Codes
Code | Type | User Message | Developer Message/Description |
---|---|---|---|
A01 | Good | Approved: XXXXXX (approval code) | Transaction has been approved. |
A02 | Good | Credit Posted | Credit has been posted on a cardholder’s account. |
A03 | Good | Void Posted (Auth Reversed) | Void has been posted on a cardholder’s account (with authorization reversal). |
A04 | Good | No Update | No updates have been made as a result of account updater operation. |
A05 | Good | Partially Approved | Transaction has been partially approved as a result of split payment. |
A06 | Good | Void Posted (Auth Not Reversed) | Void has been posted on a cardholder’s account (without authorization reversal). |
A07 | Good | Partial Void Posted | Partial void has been posted on a cardholder’s account. |
A08 | Good | Partial Refund Posted | Partial refund has been posted on a cardholder’s account. |
A09 | Good | Incremental Auth Posted | Increment has been posted on a cardholder’s account. |
A10 | Good | Request Accepted | Request has been accepted. |
A11 | Soft | Approval (Reversal failed) | 1) Initial transaction was approved by a processor and a subsequent reversal was rejected (void failed). 2) User set partial authorization logic as disabled while submitting a transaction, a processor sent partial auth as a transaction response and a subsequent reversal was rejected. For both cases, make sure to submit refund API request for the transaction that has received A11 response code. |
A60 | Soft | Terminal Offline Approval - EMV/Chip | EMV card transaction has been approved. |
A61 | Soft | Terminal Offline Approval - Swipe | Magnetic stripe card transaction has been approved. |
A62 | Soft | Terminal Offline Approval - Credit | Credit card transaction has been approved. |
D01 | Soft | Denied by customer's bank | Transaction has been denied by cardholder's bank. |
D02 | Hard | Invalid Expiration Date | Cardholder has entered invalid or malformed expiration date. |
D03 | Soft | Insufficient funds | Specified credit card does not have sufficient funds. |
D04 | Hard | Hold - Pick up card | The cardholder’s bank has declined the transaction and requested cardholder’s credit card to be retained. |
D05 | Hard | Invalid card number | Specified credit card number is invalid or does not exist. |
D06 | Hard | No account | Specified credit card number is associated with account that does not exist. |
D07 | Soft | Incorrect PIN | Entered PIN is incorrect. |
D08 | Soft | CSC is invalid | CSC value is invalid. |
D09 | Soft | Duplicate Transaction | The cardholder’s bank has declined the transaction as this transaction appears to be a duplicate transmission. |
D10 | Hard | Card reported lost/stolen | The cardholder’s bank has declined the transaction and requested the cardholder’s credit card to be retained because the card was reported lost or stolen. |
D11 | Hard | Card reported stolen | The cardholder’s bank has declined the transaction and requested the cardholder’s credit card to be retained because the card was reported stolen. |
D12 | Soft | Service not allowed | Cardholder's credit card or merchant processing account is not configured for the specified type of transaction. |
D13 | Hard | Stop Recurring | Cardholder requested stop of specific recurring payment. |
D14 | Hard | Un-attempted Batch Decline | For internal use only (deprecated). |
D15 | Soft | Maximum transaction limit is exceeded | Maximum transaction limit is exceeded at the moment. Try processing your transaction tomorrow. |
D16 | Hard | Card is Expired | A transaction was processed on an expired card. |
D17 | Soft | Re-enter Transaction | An unknown error occurred during the authorization process. Transaction needs to be re-entered. |
D18 | Soft | Bad Amount | Specified amount value is invalid. Amount must be a positive number. |
D19 | Soft | Unmapped decline | Specified processor's response code is not recognized by the system. The respective request of a received code clarification needs to be addressed to the processor. |
D20 | Soft | Billing profile configuration error | Specified billing profile was configured incorrectly. |
D21 | Soft | Pin Try Exceeded | Cardholder has entered the incorrect PIN more than three times. |
D22 | Hard | Refund was not processed/received | Refund was not processed successfully or has not been received by the cardholder. |
D24 | Hard | Chargeback received | Chargeback has been received. |
D25 | Soft | Refund limit is reached for the day | Specified merchant has reached the refund limit allowed per day on the account. |
D26 | Soft | Settlement Failed | Submitted transaction cannot be settled. Re-check entered account information and try again. |
D27 | Hard | Transaction Error | Submitted transaction has failed. |
D28 | Soft | Cashback limit exceeded/Cashback unavailable | Specified amount exceeds cashback limit or cashback is not available. |
D29 | Soft | Card is restricted | Specified credit card has some restrictions. |
D30 | Soft | Call for Authorization | To proceed with the transaction, call for authorization is needed to confirm the validity of the card. |
D31 | Soft | Declined due to fraud rules | Specified credit card appears to be fraudulent. |
D32 | Soft | Declined due to fraud engine decision | Transaction has been declined because of fraud detected by a fraud engine. |
D33 | Soft | Incorrect merchant setup | Specified merchant is not set up correctly for the submitted transaction. |
D34 | Soft | Merchant profile configuration issue | Specified merchant profile was configured incorrectly. |
D35 | Soft | Card chip decline | Transaction has been declined by the chip (for EMV cards only). |
E02 | Soft | Processing Network Unavailable | Processing network is temporarily unavailable. |
E03 | Soft | Transaction data integrity validation error | Batch transaction data is invalid. |
E04 | Soft | Refund limit is reached for the day | Specified merchant has reached the refund limit allowed per day on the account. |
E06 | Soft | Card is blacklisted | Payment card is blacklisted. |
E07 | Soft | Tokenization not supported | Tokenization is not supported by a processor. |
E08 | Soft | Declined by processor | Direct debit transaction has been declined by a processor. |
E09 | Soft | Processing Network Error | Error occurred during the connection process after the transaction was submitted. |
E10 | Soft | 3D Secure Verification Failed | 3D Secure verification has failed. |
E31 | Soft | Declined due to pre-processing rules | Transaction has been declined due to the pre-processing rules |
X01 | Hard | Processing Cancelled by User | Transaction processing has been cancelled by a cardholder. |
X02 | Soft | Pending processing | Batch transaction is still processed on a processor's side. |
X03 | Soft | 3D Secure Verification Required | 3D Secure verification is required. |
X04 | Soft | Processing cancelled: the request has expired. | Transaction processing has been cancelled due to a user being inactive for a time period specified as a timeout (default: 15 minutes). |
AVS Response Codes
Code | User Message | Developer Message/Description |
---|---|---|
0 | AVS Error - Retry, System unavailable or Timed out | A system error prevented any verification of street address or postal code. |
40 | Address not available (Address not verified) | The card-issuing bank received the address but did not verify whether it was correct. This typically happens if the processor declines an authorization before the bank evaluates the address. |
43 | Street address not available (not verified), ZIP matches | The card-issuing bank received the street address but did not verify whether it was correct. ZIP code matches. |
44 | Address failed | Address verification has failed. |
45 | Street address and ZIP don't match | Both street address and ZIP code provided do not match the information on file with the cardholder's bank. |
46 | Street address doesn't match, 5-digit ZIP matches | Provided street address does not match the information on file with the cardholder's bank, but 5-digit ZIP code matches. |
47 | Street address doesn't match, 9-digit ZIP matches | Provided street address does not match the information on file with the cardholder's bank, but 9-digit ZIP code matches. |
4A | Street address or ZIP doesn't match | Street address or ZIP code provided does not match the information on file with the cardholder's bank. |
4D | Street address matches, ZIP does not | Provided ZIP code does not match the information on file with the cardholder's bank, but street address matches. |
4E | Street address and 5-digit ZIP match | Both street address and 5-digit ZIP code provided match the information on file with the cardholder's bank. |
4F | Street address and ZIP match | Both street address and ZIP code provided match the information on file with the cardholder's bank. |
53 | Account holder name incorrect, billing postal code matches | Provided account holder name does not match the information on file with the cardholder's bank, but billing postal code matches. |
55 | Unrecognized response | Account holder name, billing address and postal code are all incorrect. |
5C | Account holder name incorrect, billing address matches | Provided account holder name does not match the information on file with the cardholder's bank, but billing address matches. |
5F | Account holder name incorrect, billing address and postal code match | Provided account holder name does not match the information on file with the cardholder's bank, but both billing address and postal code matches. |
70 | Account holder name matches | Provided account holder name matches the information on file with the cardholder's bank. |
73 | Account holder name and billing postal code match | Both account holder name and billing postal code provided match the information on file with the cardholder's bank. |
7C | Account holder name and billing address match | Both account holder name and billing address provided match the information on file with the cardholder's bank. |
7F | Account holder name, billing address and postal code match | All of the information provided match the information on file with the cardholder's bank. |
80 | AVS service not supported by issuer - Issuer doesn't participate in AVS | AVS information was provided but the card-issuing bank does not participate in address verification. |
C0 | AVS not performed | AVS verification has not been performed. |
CSC Response Codes
Code | User Message | Developer Message/Description |
---|---|---|
M | Matches | The CSC provided matches the information on file with the cardholder's bank. |
N | Not matches | The CSC provided does not match the information on file with the cardholder's bank. |
P | Not processed | CSC has not been processed. |
S | Should be present | Issuer indicates that CSC data should be present on the card, but the merchant has indicated data is not present on the card. |
U | Issuer is not certified | (1) Unknown issuer; (2) issuer is not certified for CSC; (3) issuer has not provided Visa/MasterCard with the CSC encryption keys. |
X | Unrecognized reason | Error: response is unknown or unrecognized. |
Direct Debit Response Codes
Code | User Message | Developer Message/Description |
---|---|---|
F02 | Operation code/transaction code/invalid file format/validation error | 1) Specified bank operation code is invalid; 2) Specified transaction code is either incorrect or invalid; 3) One of the specified fields is either incorrect or invalid; 4) Transaction data has not been validated by the processor. |
F03 | Indicated data incorrect | One or more required identification fields' values are either incorrect or missing. |
N01 | Insufficient funds | Available balance is not sufficient to cover the amount of the debit entry. |
N02 | Account Closed | Previously active account has been closed by customer or customer's bank. |
N03 | Routing number is incorrect | Either customer's routing number is incorrect or DFI account number is incorrect. |
N04 | Incorrect or invalid account number | Specified account number is either incorrect (i.e. invalid IBAN of the Debtor) or invalid (entry may fail check digit validation or may contain an incorrect number of digits). |
N05 | Account blocked/frozen/deleted/blacklisted/Institution in Default | Specified ACH account is either blocked, frozen, deleted or blacklisted or depository institution is in default. |
N06 | Incorrect account type | Submitted transaction forbidden for this type of account. |
N07 | Instruction canceled/expired/Refer to payer/stop payment | 1) Instruction has been canceled by payer or his bank; 2) Instruction has expired (occurs when a service user attempts to convert a DDI which is shown as expired on the paying bank's database); 3) Refer to payer; 4) Payment has stopped. |
N08 | Transferred | Financial institution receives entry destined for an account at a branch that has been transferred to another financial institution. |
N09 | Instruction re-instated/amended | 1) Paying bank may re-instate a cancelled DDI up to two months from cancellation; 2) Paying bank will advise amendment via ADDACS message. |
N10 | Cannot Trace | Trace number is incorrect. |
N11 | Payer deceased | Account holder is deceased (used in the event of a representative payee, guardian, or trustee). |
N12 | Payment Recalled/Chargeback/Return/No Agreement/No Confirmation | 1) Receiver of a recurring debit transaction has stopped payment on a specific ACH debit. RDFI should verify the receiver's intent when a request for stop payment is made to insure this is not intended to be a revocation of authorization; 2) Chargeback has been received; 3) There is one or more issues associated with return entry; 4) There is one or more issues associated with PAD agreement; 5) The payor has requested the debit to be returned as they have did not receive pre-notification of a change to the PAD date or amount, or they did not receive written confirmation of a PAD Agreement executed by electronic means. |
N13 | Other/Misalignment | Exception is not defined. |
NM01 | Mandate/advance notice | 1) Mandate data is either missing or incorrect; 2) Payer disputes time, amount or frequency of advance notice and has requested single payment to be countermanded. |
Direct Debit Response Codes
Code | Type | User Message | Developer Message/Description |
---|---|---|---|
E03 | Soft | Transaction data integrity validation error | Transaction data has not been validated by the processor. |
E05 | Hard | Bank account is blacklisted | ACH account is blacklisted. |
R01 | Soft | Insufficient Funds | Available balance is not sufficient to cover the dollar amount of the debit entry. |
R02 | Hard | Account Closed | Previously active account has been closed by customer or customer's bank. |
R03 | Hard | No Account/Unable to Locate Account | Account structure is valid and passes editing process, but does not correspond to individual or is not an open account (this can also be because the account type is wrong). |
R04 | Hard | Invalid Account Number | The account number is not valid. The transaction may have failed the digit validation or may contain an incorrect number of digits. |
R05 | Hard | Unauthorized debit to consumer account using corporate SEC Code | A CCD debit entry was transmitted to a consumer account and was not authorized by the consumer. |
R06 | Hard | ODFI Requests Return | ODFI has requested RDFI to return the ACH entry (optional to RDFI). |
R07 | Hard | Revoked Authorization | Consumer, who previously authorized ACH payment, has revoked authorization from originator. Must be returned no later than 60 days from settlement date and customer must sign affidavit. |
R08 | Hard | Stop Payment or Stop on Source Document | Receiver of a recurring debit transaction has stopped payment on a specific ACH debit. RDFI should verify the receiver's intent when a request for stop payment is made to insure this is not intended to be a revocation of authorization. |
R09 | Soft | Uncollected Funds | Sufficient book or ledger balance exist to satisfy dollar value of the transaction in process of collection brings available or cash reserve balance below dollar value of the debit entry. |
R10 | Hard | Advised as Unauthorized | Customer has authorized RDFI that originator of transaction is not authorized to debit account. Must be returned no later than 60 days from settlement date of original entry and customer must sign affidavit. |
R11 | Hard | Check Safekeeping | Used when returning a check safekeeping entry, RDFI should use appropriate field in addenda to specify reason for return (i.e, "exceeds dollar limit," "stale date," etc). |
R12 | Hard | Account at Other Branch | Financial institution receives entry destined for an account at a branch that has been sold to another financial institution. |
R13 | Hard | RDFI not qualified to participate | Financial institution is not qualified to participate in ACH or the routing number is incorrect. |
R14 | Hard | Death of Representative Payee | Account holder is deceased (used in the event of a representative payee, guardian, or trustee). |
R15 | Hard | Death of Beneficiary or Account Holder | (1) The beneficiary is the person entitled to the benefits and is deceased. The beneficiary may or may not be the account holder; (2) the account holder (acting in a non-representative payee capacity) is an owner of the account and is deceased. |
R16 | Hard | Account Frozen | Funds unavailable due to specific action by the RDFI or by legal action. |
R17 | Hard | File Record Edit Criteria (Specify) | Fields not edited by the ACH operator are edited by the RDFI. Fields causing processing error must be identified in the addenda record of return. |
R18 | Hard | Improper Effective Entry Date | The date entered in the ACH transaction record is invalid and the transaction cannot be processed. The effective entry date for a debit entry is more than one banking day after the processing date. |
R19 | Hard | Amount Field Error | The payment was entered for an amount of $0, or a paper-check conversion (ARC or BOC) was entered for over $25,000. |
R20 | Hard | Non-Transaction Account | ACH entry is destined for a non-transaction account (i.e., an account against which transactions are prohibited or limited). |
R21 | Hard | Invalid Company ID | The identification number used in the company identification field is not valid. |
R22 | Hard | Invalid Individual ID Number | In CIE and MTE entries, the individual ID number is used by the receiver to identify the account. The receiver has indicated to the RDFI that the number with which the originator was identified is not correct. |
R23 | Hard | Credit Entry Refused by Receiver | Receiver refuses credit entry because of one of the following conditions:
|
R24 | Hard | Duplicate Entry | RDFI has received what appears to be a duplicate entry (i.e., trace number, date, dollar amount and/or other data matches another transaction). |
R25 | Hard | Addenda Error | Improper formatting of the addenda record information. |
R26 | Hard | Mandatory Field Error | For a TEL or WEB ACH transaction, the name of the account holder was not provided. For a CCD transaction, the name of the company was not provided. |
R27 | Hard | Trace Number Error | Original entry trace number is not valid for return entry or addenda trace numbers do not correspond with entry detail record. |
R28 | Hard | Routing Number Check Digit Error | The bank routing number is invalid. |
R29 | Hard | Corporate Entry Unauthorized | RDFI has been notified by receiver (non-consumer) that entry was not authorized. |
R30 | Hard | RDFI Not Participant in Program | The customers bank does not participate in the ACH network. |
R31 | Hard | ODFI Permits Late Return | RDFI has been notified by ODFI that ODFI agrees to accept a return entry beyond normal return deadline. |
R32 | Hard | RDFI Non-Settlement | The RDFI is not able to settle the entry (customer‰Ûªs bank rejected the transaction). |
R33 | Hard | Return of XCK Entry | RDFI, at its discretion, returns an XCK entry. This return reason code may only be used to return XCK entries. An XCK entry may be returned up to 60 days after its settlement date. |
R34 | Hard | Limited Participation DFI | The RDFI's participation has been limited by a federal or state supervisor. |
R35 | Hard | Return of Improper Debit Entry | ACH charge entries are not permitted on loan accounts. |
R36 | Hard | Return of Improper Credit Entry | ACH refund entries (with the exception of reversals) are not permitted for use with the WEB code. |
R37 | Hard | Source Document Presented for Payment | The source document to which an ARC, BOC, or POP entry relates has been presented for payment. |
R38 | Hard | Stop Payment on Source Document | Stop payment has been placed on a check used for an ARC entry. |
R39 | Hard | Improper Source Document | The RDFI determines that the source document used for an ARC, BOC or POP entry to its receiver‰Ûªs account is improper pursuant to source documents subsections. |
R40 | Hard | Return of ENR Entry by Federal Government Agency | Federal government agency received an ENR believed to be fraudulent and then returned the ENR to the DFI. |
R41 | Hard | Invalid Transaction Code | Transaction code value is invalid. |
R42 | Hard | Routing Number/Check Digit Error | Routing number value is invalid. |
R43 | Hard | Invalid DFI Account Number | Bank account number value is invalid. |
R44 | Hard | Invalid Individual ID Number | Merchant ID value is invalid. |
R45 | Hard | Invalid Individual Name | Individual name value is invalid. |
R46 | Hard | Invalid Representative Payee Indicator | Representative payee indicator value is invalid. |
R47 | Hard | Duplicate Enrollment | The same enrollment flow was initiated more than once. |
R50 | Hard | State Law Affecting RCK Acceptance | RDFI is in one of the states that have not accepted the uniform commercial code and hasn't revised its consumer agreements to allow for electronic presentment, or the RDFI is in a state that requires all canceled checks to be returned in the consumer statement. |
R51 | Hard | Item is Ineligible; Notice not Provided; Signature Not Genuine; Item Altered; Amount of Entry not Accurately Obtained | An RCK entry may be considered to be ineligible; the originator did not provide notice; all signatures on the item to which the RCK entry relates are not authentic or authorized, or the item to which the RCK entry relates has been altered; the amount of the RCK entry was not accurately obtained from the item. |
R52 | Hard | Stop Payment on Item | RDFI determines that a stop payment has been placed on the item to which the RCK entry relates. RDFI has 60 days following settlement to return. |
R53 | Hard | Item and ACH Entry Presented for Payment | In addition to an RCK entry, the item to which the RCK entry relates has also been presented for payment. The Receiver may request immediate credit from the RDFI for an RCK entry for the reason described above. The request must be made in writing within 15 days after the RDFI sends or makes available to the Receiver information relating to that debit entry. The Receiver must also provide the RDFI with a written statement under penalty of perjury, that both the RCK entry and the item to which it relates were presented for payment. |
R61 | Hard | Mis-routed Return | Return entry was sent by RDFI to an incorrect ODFI routing number. |
R62 | Hard | Incorrect Trace Number | Trace number found in positions 07-21 in the addenda record of the return is different from the trace number of the original entry. |
R63 | Hard | Incorrect Dollar Amount | Dollar amount in the entry detail record of the return is different from the dollar amount of the original entry. |
R64 | Hard | Incorrect Individual ID | Individual ID number reflected in the entry detail record of the return is different from the individual ID number used in the original entry. |
R65 | Hard | Incorrect Transaction Code | Transaction code in the entry detail record of the return is not the return equivalent of the transaction code in the original entry. All entries must be returned as received: i.e., credit as credit, debit as debit, demand as demand, savings as savings. |
R66 | Hard | Incorrect Company ID | Company ID number used in the company/batch header record of the return is different from the ID number used in the original entry. |
R67 | Hard | Duplicate Return | ODFI has received more than one return entry for the same original entry. |
R68 | Hard | Untimely Return | Return entry did not meet the return deadline. |
R69 | Hard | Multiple Errors | Two or more fields are incorrect (i.e. original entry trace number, amount, individual ID number, company ID and/or transaction code). |
R70 | Hard | Permissible Return Not Accepted | The ODFI has received a return entry identified by the RDFI as being returned with the permission of, or at the request of, the ODFI, but the ODFI has not agreed to accept the entry or has not requested the return of the entry. |
R71 | Hard | Mis-routed Dishonored Return | ODFI mis-routed the dishonored return entry to the wrong RDFI using an incorrect routing number. |
R72 | Hard | Untimely Dishonored Return | ODFI did not submit the dishonored return entry within the 5 day deadline. |
R73 | Hard | Timely Original Return | RDFI certifies that the original return entry was submitted within the applicable deadline. |
R74 | Hard | Corrected Return | RDFI is correcting a previous return entry that was dishonored using return code R69 because it contained incomplete or incorrect information. |
R75 | Hard | Original Return Not a Duplicate | The original return entry was not a duplicate of an entry previously returned by the ODFI. This code may be used by the RDFI to contest an entry dishonored by the ODFI using return code R67 (Duplicate Return). |
R76 | Hard | No Errors Found | The original return entry did not contain the errors indicated by the ODFI in the dishonored return entry bearing return code R69 (Field Errors). |
R80 | Hard | Cross Border Coding Error | "The IAT entry is being returned due to one or more of the following conditions:
|
R81 | Hard | Non-Participant in Cross Border Program | The IAT entry is being returned because the gateway does not have an agreement with either the ODFI or the gateway‰Ûªs customer to transmit IAT entries. |
R82 | Hard | Invalid Foreign Receiving DFI Identification | The reference used to identify the foreign receiving DFI of an outbound IAT entry is invalid. |
R83 | Hard | Foreign Receiving DFI Unable to Settle | The IAT entry is being returned due to settlement problems in the foreign payment system. |
R84 | Hard | Entry Not Processed by Gateway | "For outbound IAT entries, the entry has not been processed and is being returned at the gateway's discretion because either: the processing of such entry may expose the gateway to excessive risk or the foreign payment system does not support the functions needed to process the transaction." |
R95 | Hard | Merchant profile configuration issue | Specified merchant profile was configured incorrectly. |
R96 | Hard | Incorrect merchant setup | Specified merchant is not set up correctly for the submitted transaction. |
R97 | Hard | Unmapped Returns | Specified processor's response code is not recognized by the system. The respective request of a received code clarification needs to be addressed to the processor. |
R98 | Hard | Non Participating Bank | ACH has been returned by non-participating bank. |
R99 | Hard | Transaction rejected by processor | Submitted transaction has been rejected by the processor. |
X01 | Soft | Processing Cancelled by User | Transaction processing has been cancelled by a customer. |
ACH/eCheck Notification of Change Codes
Code | User Message | Developer Message/Description |
---|---|---|
C01 | Account number is incorrect or is formatted incorrectly | Customer's account number is incorrect or malformed. |
C02 | Due to merger or consolidation, a once valid transit/routing number must be changed | Transit or routing number is not valid anymore and should be changed. |
C03 | Due to a merger or consolidation, the transit/routing number must be changed; and account number structure is no longer valid | Transit or routing number should be changed. Account number structure is invalid. |
C04 | Customer has changed name or ODFI has submitted the name incorrectly | Customer's name is incorrect or malformed. |
C05 | Transaction code is incorrect and is causing entry to be routed to the wrong account application | Transaction code is incorrect. |
C06 | Account number is incorrect and transaction is being routed to the wrong type of account | Bank account number should be changed and transaction code should indicate posting to another account type (demand/savings). |
C07 | Due to a merger or consolidation, a transit/routing number must be changed; account number structure is no longer valid; and, the transaction should be routed to another account type | Transit/routing number, bank account number and transaction code should be changed. |
C08 | Incorrect Foreign Receiving DFI Identification | For IAT entries only which are not allowed to be originated at this time. |
C09 | Individuals ID number is incorrect | Individual’s ID number is incorrect or malformed. |
C10 | Due to Merger or consolidation, the company name carried on the file of the ODFI is no longer valid | Company name is no longer valid and should be changed. |
C11 | Due to merger or consolidation, the company ID is no longer valid and should be changed | Company ID is no longer valid and should be changed. |
C12 | Due to merger or consolidation, the company name and company ID are no longer valid | Both the company name and company ID are no longer valid and should be changed. |
C13 | Entry Detail Record was correct, but information in the addenda record was unclear/formatted incorrectly (i.e., addenda information is not formatted in NSI or NACHA endorsed banking conventions) | Addenda information is malformed. |
C61 | Mis-routed Notification of Change | Notification of change has been refused due to mis-routing. |
C62 | Incorrect Trace Number | Notification of change has been refused due to incorrect trace number. |
C63 | Incorrect Company Identification Number | Notification of change has been refused due to incorrect company ID. |
C64 | Incorrect Individual Identification Number | Notification of change has been refused due to incorrect customer's ID. |
C65 | Incorrectly Formatted Addenda Information | Notification of change has been refused due to malformed addenda information. |
C66 | Incorrect Discretionary Data | Notification of change has been refused due to incorrect discretionary data. |
C67 | Routing Number Not From Original Entry Detail | Notification of change has been refused due to routing number mismatch. |
C68 | DFI Account Number Not from Original Entry Detail Record | Notification of change has been refused due to DFI account number mismatch. |
C69 | Incorrect Transaction Code | Notification of change has been refused due to incorrect transaction code. |
Proxynization API Response Codes
Code | User Message | Developer Message/Description |
---|---|---|
A01 | Successful | Transaction has been approved. |
E02 | Communication error | Network connection error has occurred. |
S01 | Wrong credentials or password has expired | User has entered wrong credentials or user's password has expired. |
S02 | Internal server error | Internal server error. |
V01 | accountNumber is required parameter |
accountNumber field is required and cannot be empty. |
V01 | accountNumber is empty or it contains wrong characters |
accountNumber field is empty or contains wrong characters. |
Configuration Error Codes
Code | User Message | Developer Message/Description |
---|---|---|
021 | ConfigurationName is not configured for the referenced ReferenceName. | A particular configuration, required to complete the action, is not set up within Zift for the referenced entity. If you have access to the indicated configuration, you can set it up, otherwise, reach out to the gateway support to have these settings configured. For example, you are attempting to process a real-time transaction, however, a processor for the merchant you using is not configured. |
022 | The selected action is not allowed by ReferenceName settings. | A particular action cannot be completed because associated referenced entity is configured to not allow the action. If you have access to the settings of the indicated reference entity, you can modify them to be able to complete the action, otherwise, reach out to the gateway support to have these settings modified. For example, you are attempting to send an email to the customer which settings do not allow email sending. |
024 | SettingName is not configured for the referenced ReferenceName. | A particular setting, necessary to complete the action, is not set up within the gateway for the referenced entity. If you have access to the indicated setting, you can set it up, otherwise, reach out to the gateway support to have these settings configured. For example, you are attempting to reset your password, however, an email in your user profile is not set. |
Format Error Codes
Code | User Message | Developer Message/Description |
---|---|---|
F21 | FieldName is missing. | Value of the field, which is required, was not supplied. Make sure that you are supplying the value for the indicated field. Hint 1: One of the conditionally required values was/was not supplied. Verify the usage for field values you are supplying and try again. Hint 2: At least one of the field sections must be filled out. Make sure that you have supplied the required field values and try again. |
F22 | FieldName is not well-formatted. | Value of the field, which requires specific formatting, does not adhere to the formatting requirements. Verify what are the formatting requirements for this field and make sure you follow them. Hint 1: Password must be different from the current or previous three passwords, as well as must contain at least one digit, one lowercase and one uppercase character. |
F26 | FieldName length must be RelationName LengthNumber characters. | Value of the field, which is required to have a particular length, does not correspond to the requirements. Verify what is the required length range and make sure that the value you are supplying falls into this range. |
F27 | field: FieldName, relation: RelationName, limit: RangeNumber, value: FieldValue | Value of the field, which is required to be in a particular range, does not correspond to the requirements. Verify what is the required value range and make sure that the value you are supplying falls into this range. Hint 1: For sole proprietorship, stake percentage of the officer must equal 100%. For all private ownership structure types (except government agency and tax-exempt organization) stake percentage of the officer must be greater than 0%. |
F28 | FieldName must contain at most SubrecordNumber subrecords. Invalid value: FieldValue. | Value of the field, which has a List type, exceeds an allowable number of subrecords. Verify what is the maximum number of subrecords and make sure that the value you are supplying does not exceed this number. |
F29 | The total of FieldName fields of ReferenceName records must be within a range from RangeFrom to RangeTo. | Values of the fields, the total of which is required to be in a specific range, is out of range. Verify what is the required value range and make sure that the values you are supplying fall into this range. |
Validation Error Codes
Code | User Message | Developer Message/Description |
---|---|---|
v21 | FieldName is invalid. | The supplied value, while being properly formatted, is actually invalid. Verify what value verification procedures are done and make sure that the value you are supplying satisfies these verification procedures. For example, if you are submitting a routing number, which is subsequently validated against a specific list, make sure that the value that you supplied is validated against that list as well. Hint 1: Both conditionally required and conditionally not used field values were supplied. Verify the usage for field values you are supplying and try again. Hint 2: An invalid report name was supplied. Verify what reports are available within the Reporting API specification and make sure you are supplying a correct value. Hint 3: The value that you are submitting is not supported when the specified API operation is used. Hint 4: The root, admin and administrator values cannot be indicated as a user's name. Enter another value and try again. |
V22 | FieldName is not among allowed values. | The supplied value has not been found within the list of allowed values for the indicated field. Verify what values are available within the list and make sure that the value you are supplying is allowed. Hint 1: An invalid content type was supplied. Verify what types are available for the selected report within the Reporting API specification and make sure you are supplying a correct value (PDF, CSV or data). Hint 2: A list of the values allowed for a field may be limited by the value of another field. For example, a list of ownership structure types differs from country to country. |
v23 | Field FieldName is required because more than one ReferenceName is available to the user. | Reference entity, which is required to be submitted since the user has access to two or more reference entities, was not supplied. Make sure that you are supplying the value for the indicated reference entity. For example, if you are submitting onboarding API request while having access to two portfolios, make sure that portfolio ID is supplied. |
v24 | Referenced ReferenceName is not found within the LevelName or not accessible to the current user. | The referenced entity is not accessible to your user account or does not exist within the specified scope: it is possible that there is no such reseller at all, or it exists under a different portfolio. Verify that you are referencing to an existing entity and have proper access to the entity you are referencing. For example, you are referencing the reseller, however, there is no such reseller within the portfolio you have access to. |
v26 | Referenced ReferenceName is not active. | The referenced entity is not active and cannot be used. Verify that the entity you are referencing is active within the system. For example, you are referencing a merchant that is no longer active. |
v27 | Merchant profile settings do not allow ReferenceName creation. | The entity that you trying to create cannot be set up under the referenced merchant because of merchant profile settings. Verify that merchant profile settings reflect business needs of that merchant. See Merchant Configuration guide for more information. Hint 1: The number of terminals in the request must be equal to one for the processor you are onboarding merchant with. |
V28 | field: AmountName, relation: RelationName, relatedField: AmountName, value: FieldValue | The supplied amount value is less or greater than the amount associated with the transaction. Verify the original transaction amount and make sure you do not go beyond the minimum/maximum amount value.
For example, the amount value you are supplying within the void API request is greater than an authorization amount of the original transaction. Hint 1: The transaction or cashback amount submitted in the API request does not correspond to the amounts in the EMV data associated with the card. |
V29 | The transaction you are trying to process is a duplicate of a recently processed transaction | The submitted transaction is a duplicate of a transaction you have submitted earlier. Make sure the transactionCode and accountId values of the transaction you are submitting and previously processed transaction do not match. |
v31 | Cannot complete ActionName action. Referenced ReferenceName is in use. | A particular action cannot be completed for the entity you are referencing because active references to the entity exist within the system. Make sure that referenced entity is not in use. For example, you are attempting to delete a provider profile through which transactions are being processed. |
V32 | ObjectName is already StateName. | The submitted transaction or ticket cannot be processed due to the incorrect current state. Verify the status of the transaction you are trying to process. For example, you are attempting to void/capture a transaction that has already been voided/captured. |
V33 | FieldName is a FieldType field. | The supplied field is either read-only or create-only and cannot be modified. Verify the type of the field you are trying to submit. |
V35 | Identifier of the referenced ReferenceName is not unique. | One or more reference entities with the specified identifier exist within a level you can access. Make sure you are supplying a unique value for the entity identifier. |
V37 | Account ID specified at the splits field level must be different from account ID specified at the transaction level. | The same values of the accountId fields have been submitted at the splits field and the transaction level. Make sure you are supplying the different values for these fields. |
V38 | Split rules can be submitted at either the items field level or the transaction level. | Split rules have been submitted via two fields in the transaction - the items field and the splitSchemaId/splits fields. Make sure you are supplying split rules via only one of these fields. |
V39 | Split rules can be submitted via either the splits field or the splitSchemaId field. | Split rules have been submitted via two fields in the transaction - the splitSchemaId field and the splits field. Make sure you are supplying split rules via only one of these fields. |