Introduction

We utilize 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.

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.

Processing API Endpoints:

  • Production: https://secure.ziftpay.com/gates/xurl?
  • Sandbox: https://sandbox-secure.ziftpay.com/gates/xurl?

Merchant Creation API Endpoints:

  • Production: https://manage.ziftpay.com/gates/onboarding?
  • Sandbox: https://sandbox-manage.ziftpay.com/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

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

Proxynization.js

Traditionally to reduce an applications PCI scope hosted payment pages have been used. However, there are cases when use of the payment pages is not desirable (for example, if the application, which needs to accept credit cards, uses AJAX-based interface or wants to utilize its own payment form, or wants to maintain and control the look and feel of the user experience). For such cases our Proxynization.js solution can be used to reduce PCI scope while maintaining control of the user experience.

Our proxynization API is a JavaScript library that can be embedded into an existing, locally hosted payment page; proper proxynization.js usage keeps the payment page and its underlying application out of PCI scope.

Follow the steps below to implement proxyinzation.js into your application:

  • Download the api.proxynization.js script and include it in your HTML page;
  • Use the authentication request to receive a temporary password which will be valid for 10 minutes;
  • 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 subsequent sale, credit and tokenization requests.

See the workflow section below for more information.

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, no JavaScript call can be used to invoke an operation within Zift (such as the sale or tokenization request) because it is impossible to properly authenticate the entity making the API call.

To keep an application out of scope JavaScript is used to generate a temporary token (proxy) which functions as a replacement for the actual card holder or bank account holder's account number. The proxy can subsequently be used in the server-side request to Zift utilizing appropriate credentials which are secured because everything happens on the server-side.

In order to secure the script a temporary password key can be generated using a server-side call and should then be assigned to the proxynization API object to enable processing.

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 is going to 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) should be included in the callback function.

    The function must declare three parameters: responseCode, responseMessage and proxyNumber:

    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 an authentication request, using your credentials:

    https://sandbox-secure.ziftpay.com/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';) 
                   
  • 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 retrieve the proxy number of the card. This proxy number is valid for 10 minutes and can be used subsequently for sale, credit and tokenization requests and should be submitted within the accountNumber field.

Charge A Card

requestType=sale

The table below lists the parameters to build a basic sale request to authorize and capture a credit card payment.

Authentication Fields
Name Value or Format Description
requestTypesaleRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
Charge A Card Account Fields
Name Value or Format Description
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Required
Credit card or bank account number.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
cscString(4)Card security code (three digits on the back of a payment card).
tokenString (40)Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Required
Name of the card holder or bank account owner.
holderBirthdateDate (yyyyMMdd)Birthdate of a payment card or bank account holder.
back to top
Charge A Card Transaction Fields
Name Value or Format Description
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionCategoryType EnumRepresents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions.
transactionModeTypeP or NMode of the transaction.

P for card present.
N for card not present.

memoString (255)Description of the transaction. Returned in the response.
isPartialAuthorizationBoolean; 0 - disabled, 1 - enabled; default = 0Indicates whether partial authorization is enabled. See integration notes for more information.
back to top
Charge A Card Billing Address Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
countryCodeString (2)The country of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
Charge A Card Cross-Reference Fields
Name Value or Format Description
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionInternalCodeString (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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
itemCodeString (60)Identifier of a purchased product or service within your system or platform.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
back to top
Charge A Card Extended Logic
Name Value or Format Description
sequenceNumberIntegerSequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments only; transactionCategory=I or R.
sequenceCountIntegerTotal number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only; transactionCategory=I
settlementDelayIntegerPeriod for which transaction settlement is delayed.
settlementGroupCodeString(60)Identifier of a settlement group. Used when it is needed to void a group of transactions if at least one transaction from the group is voided at the moment when settlement is done. See integration notes for more information.
subscriptionCodeLongCode of a subscription to a processing bank. See integration notes for more information.
formatEnumDefines what resource is going to be received within an offline callback. See integration notes for more information.
splitsListDesignates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
splitSchemaIdReferenceReference to a split schema associated with the transaction. Please refer to the Split Schema documentation to generate the splitSchemaId.
itemsListList 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

back to top
Charge A Card Shipping Address Fields
Name Value or Format Description
shippingDateDateDate of a purchase (current date or any date in the past).
shippingNameString(100)Name of an order recipient.
shippingStreetString(128)Street of a shipping address associated with an order recipient.
shippingCityString(50)City of a shipping address associated with an order recipient.
shippingCountryCodeString(2)Country code of a shipping address associated with an order recipient.
shippingStateString(2)State of a shipping address associated with an order recipient.
shippingZipCodeString(15)ZIP code of a shipping address associated with an order recipient.
back to top
Charge A Card Level II Transaction Fields
Name Value or Format Description
orderCodeString(17)Unique identifier of an order within a submitter's system. See integration notes for more information.
shippingAmountIntegerAmount of shipping and handling fees charged for an order delivery. See integration notes for more information.
dutyAmountIntegerAmount of a duty (import tax) charged on the order/transaction. See integration notes for more information.
taxAmountIntegerTax amount charged on the order/transaction. Included in the total amount. See integration notes for more information.
taxRateIntegerTax rate charged on the order/transaction. See integration notes for more information. implied 2 decimal places (e.g. 150 = 1.5%; 1000 = 10%)
taxIndicatorEnumDefines how taxes are handled for the transaction. See integration notes for more information.
customerAccountTaxIdString(13)Tax ID of a customer associated with the order/transaction. See integration notes for more information.
back to top
Charge A Card Level III Transaction Fields
Name Value or Format Description
shippingOriginZipCodeString(10)ZIP-code associated with an address from which an order is shipped. See integration notes for more information.
discountAmountIntegerDiscount amount applied to the order/transaction. See integration notes for more information.
taxInvoiceCodeString(15)Tax invoice number associated with the order/transaction. See integration notes for more information.
localTaxAmountIntegerAmount of a local (city, country, etc) tax charged on the order/transaction. See integration notes for more information.
localTaxIndicatorEnumDefines how a local tax is handled. See integration notes for more information.
nationalTaxAmountIntegerAmount of a national/federal tax charged on the order/transaction. See integration notes for more information.
nationalTaxIndicatorEnumDefines how a national/federal tax is handled. See integration notes for more information.
orderDateDateDate of an order placement. See integration notes for more information.
commodityCodeString(4)Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information.
itemsListList 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

back to top
https://sandbox-secure.ziftpay.com/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
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypeEnumIndicates the type of response.
accountIdString (12)Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumSpecifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
holderNameString (150)Name of the card holder or bank account owner.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
feeAmountIntegerContains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance.

tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Returned in the sale-auth response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsList 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 Card

requestType=sale-auth

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
requestTypesale-authRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
Authorize A Card Account Fields
Name Value or Format Description
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Required
Credit card or bank account number.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
cscString(4)Card security code (three digits on the back of a payment card).
tokenString (40)Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Required
Name of the card holder or bank account owner.
holderBirthdateDate (yyyyMMdd)Birthdate of a payment card or bank account holder.
back to top
Authorize A Card Transaction Fields
Name Value or Format Description
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionCategoryType EnumRepresents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions.
transactionModeTypeP or NMode of the transaction.

P for card present.
N for card not present.

memoString (255)Description of the transaction. Returned in the response.
isPartialAuthorizationBoolean; 0 - disabled, 1 - enabled; default = 0Indicates whether partial authorization is enabled. See integration notes for more information.
back to top
Authorize A Card Customer Billing Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
Authorize A Card Cross-Reference Fields
Name Value or Format Description
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionInternalCodeString (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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
itemCodeString (60)Identifier of a purchased product or service within your system or platform.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
back to top
Authorize A Card Extended Logic
Name Value or Format Description
sequenceNumberIntegerSequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments only; transactionCategory=I or R.
sequenceCountIntegerTotal number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only; transactionCategory=I
settlementDelayIntegerPeriod for which transaction settlement is delayed.
settlementGroupCodeString(60)Identifier of a settlement group. Used when it is needed to void a group of transactions if at least one transaction from the group is voided at the moment when settlement is done. See integration notes for more information.
subscriptionCodeLongCode of a subscription to a processing bank. See integration notes for more information.
formatEnumDefines what resource is going to be received within an offline callback. See integration notes for more information.
splitsListDesignates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
splitSchemaIdReferenceReference to a split schema associated with the transaction. Please refer to the Split Schema documentation to generate the splitSchemaId.
itemsListList 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

back to top
Authorize A Card Level II Parameters
Name Value or Format Description
orderCodeString(17)Unique identifier of an order within a submitter's system. See integration notes for more information.
shippingAmountIntegerAmount of shipping and handling fees charged for an order delivery. See integration notes for more information.
dutyAmountIntegerAmount of a duty (import tax) charged on the order/transaction. See integration notes for more information.
taxAmountIntegerTax amount charged on the order/transaction. Included in the total amount. See integration notes for more information.
taxRateIntegerTax rate charged on the order/transaction. See integration notes for more information. implied 2 decimal places (e.g. 150 = 1.5%; 1000 = 10%)
taxIndicatorEnumDefines how taxes are handled for the transaction. See integration notes for more information.
customerAccountTaxIdString(13)Tax ID of a customer associated with the order/transaction. See integration notes for more information.
back to top
Authorize A Card Level III Parameters
Name Value or Format Description
shippingOriginZipCodeString(10)ZIP-code associated with an address from which an order is shipped. See integration notes for more information.
discountAmountIntegerDiscount amount applied to the order/transaction. See integration notes for more information.
taxInvoiceCodeString(15)Tax invoice number associated with the order/transaction. See integration notes for more information.
localTaxAmountIntegerAmount of a local (city, country, etc) tax charged on the order/transaction. See integration notes for more information.
localTaxIndicatorEnumDefines how a local tax is handled. See integration notes for more information.
nationalTaxAmountIntegerAmount of a national/federal tax charged on the order/transaction. See integration notes for more information.
nationalTaxIndicatorEnumDefines how a national/federal tax is handled. See integration notes for more information.
orderDateDateDate of an order placement. See integration notes for more information.
commodityCodeString(4)Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information.
itemsListList 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

back to top
https://sandbox-secure.ziftpay.com/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
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypesale-authIndicates the type of response.
accountIdString (12)Indicates the accountId
accountType Indicates the accountType used in the transaction. If present in the request it will be returned in the response.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
holderNameString (150)Name of the card holder or bank account owner.
tokenString (40)Token associated with the payment card or bank account. Can be used to process future transactions.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
amountInteger (in cents)Specifies the total authorized amount. Always returned in the response.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
taxAmountInteger (in cents) Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response.
tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction. If empty no cycle was opened.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsListList of items included in the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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

requestType=capture

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
requestTypecaptureRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
Capture Transaction Fields
Name Value or Format Description
transactionIdLongRequired
Unique identifier of the transaction within Zift. Returned in the sale-auth response.
amountInteger (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.
transactionCodeString (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.

settlementDelayIntegerPeriod for which transaction settlement is delayed.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
back to top
Capture Shipping Address Fields
Name Value or Format Description
shippingDateDateDate of a purchase (current date or any date in the past).
shippingNameString(100)Name of an order recipient.
shippingStreetString(128)Street of a shipping address associated with an order recipient.
shippingCityString(50)City of a shipping address associated with an order recipient.
shippingCountryCodeString(2)Country code of a shipping address associated with an order recipient.
shippingStateString(2)State of a shipping address associated with an order recipient.
shippingZipCodeString(15)ZIP code of a shipping address associated with an order recipient.
back to top
Capture Level II Information
Name Value or Format Description
orderCodeString(17)Unique identifier of an order within a submitter's system. See integration notes for more information.
shippingAmountIntegerAmount of shipping and handling fees charged for an order delivery. See integration notes for more information.
dutyAmountIntegerAmount of a duty (import tax) charged on the order/transaction. See integration notes for more information.
taxAmountIntegerTax amount charged on the order/transaction. Included in the total amount. See integration notes for more information.
taxRateIntegerTax rate charged on the order/transaction. See integration notes for more information. implied 2 decimal places (e.g. 150 = 1.5%; 1000 = 10%)
taxIndicatorEnumDefines how taxes are handled for the transaction. See integration notes for more information.
customerAccountTaxIdString(13)Tax ID of a customer associated with the order/transaction. See integration notes for more information.
back to top
Capture Level III Information
Name Value or Format Description
shippingOriginZipCodeString(10)ZIP-code associated with an address from which an order is shipped. See integration notes for more information.
discountAmountIntegerDiscount amount applied to the order/transaction. See integration notes for more information.
taxInvoiceCodeString(15)Tax invoice number associated with the order/transaction. See integration notes for more information.
localTaxAmountIntegerAmount of a local (city, country, etc) tax charged on the order/transaction. See integration notes for more information.
localTaxIndicatorEnumDefines how a local tax is handled. See integration notes for more information.
nationalTaxAmountIntegerAmount of a national/federal tax charged on the order/transaction. See integration notes for more information.
nationalTaxIndicatorEnumDefines how a national/federal tax is handled. See integration notes for more information.
orderDateDateDate of an order placement. See integration notes for more information.
commodityCodeString(4)Acquirer designated standardized identifier of a group of items associated with the order/transaction. See integration notes for more information.
itemsListList 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

back to top
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=capture&userName=myUsername&password=myP%40ssword&accountId=2001&transactionId=123456
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypecaptureIndicates the type of response.
accountIdString (12)Indicates the accountId
remainingAmountInteger (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.
taxAmountInteger (in cents) Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response.
tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
originalTransactionCodeString(60)originalTransactionCode used in the transaction. If present in the request it will be returned in the response.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
cycleCodeLongIdentifier of a retail cycle associated with the transaction. If empty no cycle was opened.
responseCodeString (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.
terminalMessageString (100)Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information.

Refund/Void a Transaction

requestType=refund requestType=void

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
requestTypevoid or refundRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
transactionIdLongRequired
Unique identifier of the transaction within Zift. Always present in the response.
amountInteger (in cents)For partial voids/refunds only. Amount of the transaction that is going to be voided or refunded.
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

originalTransactionCodeString (60)Value of transactionCode supplied in the original transaction. Used for void only.
voidReasonCodeEnum Defines a reason why the void is issued. Click here for possible values.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=refund&userName=myUsername&password=myP%40ssword&accountId=2001&transactionId=123456
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypevoid or refundIndicates the type of response.
accountIdString (12)Indicates the accountId
remainingAmountInteger (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.
voidAmountInteger (in cents)Amount of void associated with the transaction.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
originalTransactionCodeString (60)Value of transactionCode supplied in the original transaction. Used for void only.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
cycleCodeLongIdentifier of a retail cycle associated with the transaction. If empty no cycle was opened.
responseCodeString (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.

Charge a Bank Account (ACH)

requestType=sale

Processing an ACH transaction is almost identical to processing a credit card transaction.

For an ACH transaction you will need to pay attention to the following parameters and set their values accordingly:

  • accountType Set the value to C to debit a checking account or S to debit a savings account.
  • accountNumber For ACH transactions this field contains the checking or savings account number.
  • accountAccessory For ACH transactions this field contains the routing number.
Authorization Fields
Name Value or Format Description
requestTypesaleRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
ACH Account Fields
Name Value or Format Description
accountType C or SSpecifies the payment method to be used with this transaction, For ACH transactions you can indicate a checking account (C) or savings account (S).
accountNumberString (20)Required
Bank account number.
accountAccessoryString (10)Required
Bank routing number.
tokenString (40)Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Required
Name of the card holder or bank account owner.
holderBirthdateDate (yyyyMMdd)Birthdate of a payment card or bank account holder.
back to top
ACH Transaction Fields
Name Value or Format Description
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionCategoryType EnumRepresents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions.
transactionModeTypeP or NMode of the transaction.

P for card present.
N for card not present.

memoString (255)Description of the transaction. Returned in the response.
isPartialAuthorizationBoolean; 0 - disabled, 1 - enabled; default = 0Indicates whether partial authorization is enabled. See integration notes for more information.
back to top
ACH Billing Address Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
ACH Cross-Reference Fields
Name Value or Format Description
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionInternalCodeString (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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
itemCodeString (60)Identifier of a purchased product or service within your system or platform.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
back to top
ACH Extended Logic
Name Value or Format Description
sequenceNumberIntegerSequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments only; transactionCategory=I or R.
sequenceCountIntegerTotal number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only; transactionCategory=I
settlementDelayIntegerPeriod for which transaction settlement is delayed.
settlementGroupCodeString(60)Identifier of a settlement group. Used when it is needed to void a group of transactions if at least one transaction from the group is voided at the moment when settlement is done. See integration notes for more information.
subscriptionCodeLongCode of a subscription to a processing bank. See integration notes for more information.
formatEnumDefines what resource is going to be received within an offline callback. See integration notes for more information.
splitsListDesignates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
splitSchemaIdReferenceReference to a split schema associated with the transaction. Please refer to the Split Schema documentation to generate the splitSchemaId.
itemsListList 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

back to top
ACH Shipping Address Fields
Name Value or Format Description
shippingDateDateDate of a purchase (current date or any date in the past).
shippingNameString(100)Name of an order recipient.
shippingStreetString(128)Street of a shipping address associated with an order recipient.
shippingCityString(50)City of a shipping address associated with an order recipient.
shippingCountryCodeString(2)Country code of a shipping address associated with an order recipient.
shippingStateString(2)State of a shipping address associated with an order recipient.
shippingZipCodeString(15)ZIP code of a shipping address associated with an order recipient.
back to top
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=sale&userName=myUsername&password=myP%40ssword&accountId=2001&amount=5000&accountType=C&transactionIndustryType=RE&holderType=P&holderName=John+Smith&accountNumber=1234567&accountAccessory=324377516&street=12+Main+St&city=Denver&state=CO&zipCode=30301&customerAccountCode=0000000001&transactionCode=0000000001
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "requestType=sale"  \
	-d "userName=myUsername"  \
	-d "password=myP%40ssword"  \
	-d "accountId=2001"  \
	-d "amount=5000"  \
	-d "accountType=C"  \
	-d "transactionIndustryType=RE"  \
	-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.ziftpay.com/gates/xurl?", 
 			 "&requestType=sale"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&amount=5000"
			+ "&accountType=C"
			+ "&transactionIndustryType=RE"
			+ "&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.ziftpay.com/gates/xurl?';
    $data = array(
			'requestType'=>'sale',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'amount'=>'5000',
			'accountType'=>'C',
			'transactionIndustryType'=>'RE',
			'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.ziftpay.com/gates/xurl?",

			 "requestType=sale"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&amount=5000"
			+ "&accountType=C"
			+ "&transactionIndustryType=RE"
			+ "&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.ziftpay.com/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=C"
			 postData =  postData + "&transactionIndustryType=RE"
			 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.ziftpay.com/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'=>'C',
			'transactionIndustryType'=>'RE',
			'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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'sale',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'amount':'5000',
			'accountType':'C',
			'transactionIndustryType':'RE',
			'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.ziftpay.com/gates/xurl?',
       [
			requestType=>'sale',
			userName=>'myUsername',
			password=>'myP%40ssword',
			accountId=>'2001',
			amount=>'5000',
			accountType=>'C',
			transactionIndustryType=>'RE',
			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.ziftpay.com/gates/xurl?'
	    values = {
			'requestType':'sale',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'amount':'5000',
			'accountType':'C',
			'transactionIndustryType':'RE',
			'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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypeEnumIndicates the type of response.
accountIdString (12)Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumSpecifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
holderNameString (150)Name of the card holder or bank account owner.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
feeAmountIntegerContains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance.

tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Returned in the sale-auth response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsList List of items included in the transaction. ex:

(code=001;itemId=I123;splits=(accountId=20011;trans
actionId=S10001)(accountId=20012;transacti
onId=S10002))

Credit a Bank Account (ACH)

requestType=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
requestTypecreditRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
ACH Credit Account Information
Name Value or Format Description
accountType C or SSpecifies the payment method to be used with this transaction, For ACH transactions you can indicate a checking account (C) or savings account (S).
accountNumberString (20)Required
Bank account number.
accountAccessoryString (10)Required
Bank routing number.
tokenString (40)Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Required
Name of the card holder or bank account owner.
holderBirthdateDate (yyyyMMdd)Birthdate of a payment card or bank account holder.
back to top
ACH Credit Transaction Fields
Name Value or Format Description
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionCategoryType EnumRepresents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions.
transactionModeTypeP or NMode of the transaction.

P for card present.
N for card not present.

memoString (255)Description of the transaction. Returned in the response.
isPartialAuthorizationBoolean; 0 - disabled, 1 - enabled; default = 0Indicates whether partial authorization is enabled. See integration notes for more information.
back to top
ACH Credit Billing Address Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
ACH Credit Cross-References Fields
Name Value or Format Description
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionInternalCodeString (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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
itemCodeString (60)Identifier of a purchased product or service within your system or platform.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
back to top
ACH Credit Extended Logic
Name Value or Format Description
sequenceNumberIntegerSequential number of the payment (e.g. 2nd of 12 payments). Used for installment and recurring payments only; transactionCategory=I or R.
sequenceCountIntegerTotal number of payments in an installment sequence (e.g. 12 payments). Used for installment payments only; transactionCategory=I
settlementDelayIntegerPeriod for which transaction settlement is delayed.
settlementGroupCodeString(60)Identifier of a settlement group. Used when it is needed to void a group of transactions if at least one transaction from the group is voided at the moment when settlement is done. See integration notes for more information.
subscriptionCodeLongCode of a subscription to a processing bank. See integration notes for more information.
formatEnumDefines what resource is going to be received within an offline callback. See integration notes for more information.
splitsListDesignates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
splitSchemaIdReferenceReference to a split schema associated with the transaction. Please refer to the Split Schema documentation to generate the splitSchemaId.
itemsListList 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

back to top
https://sandbox-secure.ziftpay.com/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
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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)
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypecreditIndicates the type of response.
accountIdString (12)Indicates the accountId
accountType Indicates the accountType used in the transaction. If present in the request it will be returned in the response.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
holderNameString (150)Name of the card holder or bank account owner.
tokenString (40)Token associated with the payment card or bank account. Can be used to process future transactions.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
amountInteger (in cents)Specifies the total authorized amount of the transaction.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
taxAmountInteger (in cents) Tax amount charged on the order/transaction. Included in the total amount. Optional in the request, not always present in the response.
tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
cycleCodeLongIdentifier of a retail cycle associated with the transaction. If empty no cycle was opened.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsListList of items included in the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.

Hosted Payment Page (HPP)

requestType=sale

HPPs are hosted on our site and allow you to process credit card or ACH transactions without having to handle sensitive account data within your environment or implement more complex integrations, reducing your overall PCI scope. When an HPP is used all sensitive data is collected through our hosted page and processed on our levle 1 PCI compliant servers. The data is also converted into a token that you can safely use for future processing.

We use the same API calls for our HPPs as we do for a typical sale API call. The first thing to do is become familiar with how the transaction API request works.

Hosted Payment Pages utilize additional parameters as part of the sale, sale-auth, and tokenization requests to render the pages, return users to a URL of your choosing and send the transaction response to a URL you provide.

HPP Request Parameters

Parameter Description
notifyURL 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.

cancelURL 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 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.

returnURLPolicy Defines how the returnURL is used when a transaction is completed. Possible values are redirect and page.
postNotifyURL 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.

HPP Customization

HPP's can be configured to reflect the look and feel of your site or application. There are five resources available for customization: paypage_card.html, tokenization_card.html, paypage_account.html, tokenization_account.html, result.html. Pages with _card are used for card processing and pages with _account are used for processing direct debit (ACH) transactions.

  • paypage_card.html - form used for sale, sale-auth, and tokenization credit card transactions.
  • tokenization_card.html - form used to tokenize a credit card through our hosted payment page.
  • paypage_account.html - form used for sale, sale-auth, and tokenization ACH transactions.
  • tokenization_account.html - form used to tokenize a bank account through our hosted payment page.
  • result.html - confirmation page shown to a user once an operation successfully completes.

Building Your HPP Request

Authentication Fields
Name Value or Format Description
requestTypesaleRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
HPP Specific Fields
Name Value or Format Description
notifyURLString (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.

cancelURLString (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.
returnURLString (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.

returnURLPolicyEnumIndicates the behavior of the returnURLClick for a list of possible values and their descriptions.
postNotifyURLString (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.
back to top
HPP Account Fields
Name Value or Format Description
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Required
Credit card or bank account number.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
cscString(4)Card security code (three digits on the back of a payment card).
tokenString (40)Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Required
Name of the card holder or bank account owner.
holderBirthdateDate (yyyyMMdd)Birthdate of a payment card or bank account holder.
back to top
HPP Transaction Information
Name Value or Format Description
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionCategoryType EnumRepresents the category type of the transaction. Can be used to represent Bill payment, Recurring, Installment or Healthcare based transactions.
transactionModeTypeP or NMode of the transaction.

P for card present.
N for card not present.

memoString (255)Description of the transaction. Returned in the response.
isPartialAuthorizationBoolean; 0 - disabled, 1 - enabled; default = 0Indicates whether partial authorization is enabled. See integration notes for more information.
back to top
HPP Billing Address Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
HPP Cross-Reference Fields
Name Value or Format Description
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionInternalCodeString (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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
itemCodeString (60)Identifier of a purchased product or service within your system or platform.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
back to top
https://sandbox-secure.ziftpay.com/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&notifyURL=https://mydomainname.com/mynotifyURL&cancelURL=https://mydomainname.com/mycancelURL&returnURL=https://mydomainname.com/myreturnURL&returnURLPolicy=redirect&postNotifyURL=https://mydomainname.com/mypostnotifylURL
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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"  \
	-d "notifyURL=https://mydomainname.com/mynotifyURL"  \
	-d "cancelURL=https://mydomainname.com/mycancelURL"  \
	-d "returnURL=https://mydomainname.com/myreturnURL"  \
	-d "returnURLPolicy=redirect"  \
	-d "postNotifyURL=https://mydomainname.com/mypostnotifylURL"  \

 
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.ziftpay.com/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"
			+ "¬ifyURL=https://mydomainname.com/mynotifyURL"
			+ "&cancelURL=https://mydomainname.com/mycancelURL"
			+ "&returnURL=https://mydomainname.com/myreturnURL"
			+ "&returnURLPolicy=redirect"
			+ "&postNotifyURL=https://mydomainname.com/mypostnotifylURL"
       
        ));
 
    }              
    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.ziftpay.com/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',
			'notifyURL'=>'https://mydomainname.com/mynotifyURL',
			'cancelURL'=>'https://mydomainname.com/mycancelURL',
			'returnURL'=>'https://mydomainname.com/myreturnURL',
			'returnURLPolicy'=>'redirect',
			'postNotifyURL'=>'https://mydomainname.com/mypostnotifylURL',

        );
 
    $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.ziftpay.com/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"
			+ "¬ifyURL=https://mydomainname.com/mynotifyURL"
			+ "&cancelURL=https://mydomainname.com/mycancelURL"
			+ "&returnURL=https://mydomainname.com/myreturnURL"
			+ "&returnURLPolicy=redirect"
			+ "&postNotifyURL=https://mydomainname.com/mypostnotifylURL"

                ));
        }

	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.ziftpay.com/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"
			 postData =  postData + "¬ifyURL=https://mydomainname.com/mynotifyURL"
			 postData =  postData + "&cancelURL=https://mydomainname.com/mycancelURL"
			 postData =  postData + "&returnURL=https://mydomainname.com/myreturnURL"
			 postData =  postData + "&returnURLPolicy=redirect"
			 postData =  postData + "&postNotifyURL=https://mydomainname.com/mypostnotifylURL"


         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.ziftpay.com/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',
			'notifyURL'=>'https://mydomainname.com/mynotifyURL',
			'cancelURL'=>'https://mydomainname.com/mycancelURL',
			'returnURL'=>'https://mydomainname.com/myreturnURL',
			'returnURLPolicy'=>'redirect',
			'postNotifyURL'=>'https://mydomainname.com/mypostnotifylURL',


	              }
    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.ziftpay.com/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',
			'notifyURL':'https://mydomainname.com/mynotifyURL',
			'cancelURL':'https://mydomainname.com/mycancelURL',
			'returnURL':'https://mydomainname.com/myreturnURL',
			'returnURLPolicy':'redirect',
			'postNotifyURL':'https://mydomainname.com/mypostnotifylURL'


         }
    }

    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.ziftpay.com/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',
			notifyURL=>'https://mydomainname.com/mynotifyURL',
			cancelURL=>'https://mydomainname.com/mycancelURL',
			returnURL=>'https://mydomainname.com/myreturnURL',
			returnURLPolicy=>'redirect',
			postNotifyURL=>'https://mydomainname.com/mypostnotifylURL'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/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',
			'notifyURL':'https://mydomainname.com/mynotifyURL',
			'cancelURL':'https://mydomainname.com/mycancelURL',
			'returnURL':'https://mydomainname.com/myreturnURL',
			'returnURLPolicy':'redirect',
			'postNotifyURL':'https://mydomainname.com/mypostnotifylURL'


      }

    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
responseTypeEnumIndicates the type of response.
accountIdString (12)Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumSpecifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
holderNameString (150)Name of the card holder or bank account owner.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
feeAmountIntegerContains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance.

tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Returned in the sale-auth response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsList List of items included in the transaction. ex:

(code=001;itemId=I123;splits=(accountId=20011;trans
actionId=S10001)(accountId=20012;transacti
onId=S10002))

Split Transactions

requestType=sale

Zift split payment functionality allows sellers to split a fixed amount or percentage of the payments they receive from products or services they sell to a third party associated with the transaction. It is possible to split the transaction between 9 different third parties, 10 if you include the original seller.

Sellers who sell multiple items in a single transaction may either apply the split scenario to the overall transaction or a unique split scenario to each of the items within the transaction.

Terminology

Split In

From the receiver of the funds perspective split-in indicates funds the receiver has been sent and from whom they were sent.

Split Out

From the sender of the funds perspective split-out indicates funds the merchant owes to a third party and which the system has sent to that third party.

Process Split Transactions

There are 2 possible methods to create a split payment on a transaction. You can either create predefined rules called a split-schema or you can embed the rules directly into the transaction via the splits parameter.

When the split rules are embedded (via the splits parameter) into the transaction you can only process real-time API transactions.

When the split rules are set as a predefined split schema they are available for both real-time and batch transactions.

A predefined split schema is a split rules template with a set of predefined split payouts. The template can only be created via the API and is primarily used in situations when the same split rules are repeatedly used or batch processing is required.

Directly embedding the split rules within a transaction allows the split payouts to be customized for each payment at both the total transaction or specific items within a transaction level. In order to create a split transaction the splits parameter should be included in the sale transaction API call. The splits field is formatted as follows:

splits=(accountId=;amount=100)

Information about the receiver and the amount to be transferred is contained within the parenthesis and uses our subrecord formatting.

The accountId is the Zift ID of the merchant or receiver of funds.

The amount field designates the amount to be split and can either be a fixed amount or a percentage.

To specify that the submitted value is a fixed amount, it should be preceded by the prefix A. The amount is submitted as an integer value in cents. If you omit the prefix, the system will assume that the value is a fixed amount by default. For example, $10 is submitted as amount=A1000 or amount=1000

To specify the submitted value as a percentage (rate), it should be preceded by the prefix R. The rate is submitted as an integer value multiplied by 10,000 or with four decimal places (10%=100000, 1%=10000, 0.25%=2500). For example, 10% of a total amount is submitted as amount=R100000.

A Practical Example

If a seller makes a sale for $100.00 and needs to split 20% of it to affiliate A and another 30% to affiliate B the breakdown would be as follows (excluding processing fees):

  • Seller would see a successful transaction for $100.00.
  • Seller would see a ‘split-out’ of $20.00 to affiliate A and a ‘split-out’ of $30.00 to affiliate B.
  • Resulting net amount to seller for the transaction would be $50.00
  • Affiliate A would receive a ‘split-in’ of $20.00 from the seller and affiliate B would receive a ‘split-in’ of $30.00 from the seller.

The split portion of the transaction request would be formatted as follows:

splits=(accountId=affiliateA-ID;amount=R200000)(accountId=affiliateB-ID;amount=R300000)

Refunds and Voids

Refunds on split transactions are processed the same way a regular refund is processed. It is only possible to create a split refund for the original transaction. In the case of a refund the total amount of the transaction will be debited from the seller to refund the customer.

The system will subsequently pull funds from any positive balance the affiliate may have accrued in their Zift account to reimburse the seller for the affiliates portion of the refund.

In the event the system is unable to capture funds from the affiliate a negative balance will be recorded against the affiliates account. The next time the affiliate receives a positive split-in the balance will be offset and the refund amount owed to the seller will be returned to the seller.

If we are unable to recover the refund amount from the affiliate via a positive balance in their Zift account the balance amount will be written off and it will be the seller’s responsibility to collect the refund amount from the affiliate.

For example, if the seller from above needs to refund the $100.00 transaction the seller would see a refund for $100.00. The seller would also see a pull-in for $20.00 from affiliate A and a pull-in for $30.00 from affiliate B to cover their portions of the refund. The affiliates would see a pull-out for $20.00 and $30.00 respectively, following our example from above.

Voids, chargebacks and ACH returns function the same way as refunds.

Building a Split Transaction

Include the parameter below in your Charge a Card or Charge a Bank Account sale operation to create the split transaction.

Specific Split Parameters
Name Value or Format Description
splitsListDesignates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
itemsList List of items included in the transaction. The items parameter follows our subrecord format explained here.
Splits Subrecord Format

A subrecord is an entry within a primary record. Usually, the primary record has a list of subrecords.

The following formatting rules are applied to the fileds with subrecords:

  1. Each subrecord must be enclosed by brackets
  2. An equal sign (=) is used to separate a field's name and value and a semicolon (;) is used to separate fields.
  3. To submit multiple subrecords list them one after another.

For example, if the following split information needs to be submitted on the same transaction:

Split 1:
  • accountId=550005
  • amount=20%
Split 2:
  • accountId=520002
  • amount=30%

The splits field value must be formatted as shown below:

splits=(accountId=550005;amount=R200000)(accountId=520002;amount=R300000);

You can also use splits within the items field which allows you to split specific items that make up 1 transaction. If amounts of the items listed below should be split between two or more recipients within a split parameter, the items field value must be formatted as follows:

items=(code=001;description=t-shirt;quantity=1;totalAmount=50000;splits=(accountId=2011;amount=7000)(accountId=2012;amount=2000))(code=002;description=jeans;quantity=1;totalAmount=80000;splits=(accountId=2011;amount=9000)(accountId=2012;amount=2000)(accountId=2013;amount=3000))

Item 1:
  • code=001
  • quantity=1
  • description=t-shirt
  • totalAmount=50000
Item 2:
  • code=002
  • quantity=1
  • description=jeans
  • totalAmount=70000
https://sandbox-secure.ziftpay.com/gates/xurl?userName=API-zift-reseller&password=l1Qn77ccQv84eURuEUFaNTupk6H8onF9&merchantAccountCode=789486&requestType=sale&amount=50000&accountType=R&transactionIndustryType=RE&holderType=&customerAccountCode=&transactionCode=&holderName=Tony+Stark&accountNumber=5499740000000057&accountAccessory=0420&street=123+My+Street&city=My+City&state=UT&zipCode=87653&splits=(accountId=741852;amount=10000)(accountId=369258;amount=10000)
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "userName=API-zift-reseller"  \
	-d "password=l1Qn77ccQv84eURuEUFaNTupk6H8onF9"  \
	-d "merchantAccountCode=789486"  \
	-d "requestType=sale"  \
	-d "amount=50000"  \
	-d "accountType=R"  \
	-d "transactionIndustryType=RE"  \
	-d "holderType="  \
	-d "customerAccountCode="  \
	-d "transactionCode="  \
	-d "holderName=Tony+Stark"  \
	-d "accountNumber=5499740000000057"  \
	-d "accountAccessory=0420"  \
	-d "street=123+My+Street"  \
	-d "city=My+City"  \
	-d "state=UT"  \
	-d "zipCode=87653"  \
	-d "splits=(accountId=741852;amount=10000)(accountId=369258;amount=10000)"  \

 
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.ziftpay.com/gates/xurl?", 
 			 "&userName=API-zift-reseller"
			+ "&password=l1Qn77ccQv84eURuEUFaNTupk6H8onF9"
			+ "&merchantAccountCode=789486"
			+ "&requestType=sale"
			+ "&amount=50000"
			+ "&accountType=R"
			+ "&transactionIndustryType=RE"
			+ "&holderType="
			+ "&customerAccountCode="
			+ "&transactionCode="
			+ "&holderName=Tony+Stark"
			+ "&accountNumber=5499740000000057"
			+ "&accountAccessory=0420"
			+ "&street=123+My+Street"
			+ "&city=My+City"
			+ "&state=UT"
			+ "&zipCode=87653"
			+ "&splits=(accountId=741852;amount=10000)(accountId=369258;amount=10000)"
       
        ));
 
    }              
    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.ziftpay.com/gates/xurl?';
    $data = array(
			'userName'=>'API-zift-reseller',
			'password'=>'l1Qn77ccQv84eURuEUFaNTupk6H8onF9',
			'merchantAccountCode'=>'789486',
			'requestType'=>'sale',
			'amount'=>'50000',
			'accountType'=>'R',
			'transactionIndustryType'=>'RE',
			'holderType'=>'',
			'customerAccountCode'=>'',
			'transactionCode'=>'',
			'holderName'=>'Tony+Stark',
			'accountNumber'=>'5499740000000057',
			'accountAccessory'=>'0420',
			'street'=>'123+My+Street',
			'city'=>'My+City',
			'state'=>'UT',
			'zipCode'=>'87653',
			'splits'=>'(accountId=741852;amount=10000)(accountId=369258;amount=10000)',

        );
 
    $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.ziftpay.com/gates/xurl?",

			 "userName=API-zift-reseller"
			+ "&password=l1Qn77ccQv84eURuEUFaNTupk6H8onF9"
			+ "&merchantAccountCode=789486"
			+ "&requestType=sale"
			+ "&amount=50000"
			+ "&accountType=R"
			+ "&transactionIndustryType=RE"
			+ "&holderType="
			+ "&customerAccountCode="
			+ "&transactionCode="
			+ "&holderName=Tony+Stark"
			+ "&accountNumber=5499740000000057"
			+ "&accountAccessory=0420"
			+ "&street=123+My+Street"
			+ "&city=My+City"
			+ "&state=UT"
			+ "&zipCode=87653"
			+ "&splits=(accountId=741852;amount=10000)(accountId=369258;amount=10000)"

                ));
        }

	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.ziftpay.com/gates/xurl?")
         request.Method = "POST"
         Dim postData As String
			 postData = "userName=API-zift-reseller"
			 postData =  postData + "&password=l1Qn77ccQv84eURuEUFaNTupk6H8onF9"
			 postData =  postData + "&merchantAccountCode=789486"
			 postData =  postData + "&requestType=sale"
			 postData =  postData + "&amount=50000"
			 postData =  postData + "&accountType=R"
			 postData =  postData + "&transactionIndustryType=RE"
			 postData =  postData + "&holderType="
			 postData =  postData + "&customerAccountCode="
			 postData =  postData + "&transactionCode="
			 postData =  postData + "&holderName=Tony+Stark"
			 postData =  postData + "&accountNumber=5499740000000057"
			 postData =  postData + "&accountAccessory=0420"
			 postData =  postData + "&street=123+My+Street"
			 postData =  postData + "&city=My+City"
			 postData =  postData + "&state=UT"
			 postData =  postData + "&zipCode=87653"
			 postData =  postData + "&splits=(accountId=741852;amount=10000)(accountId=369258;amount=10000)"


         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.ziftpay.com/gates/xurl?")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    post_params = {
			'userName'=>'API-zift-reseller',
			'password'=>'l1Qn77ccQv84eURuEUFaNTupk6H8onF9',
			'merchantAccountCode'=>'789486',
			'requestType'=>'sale',
			'amount'=>'50000',
			'accountType'=>'R',
			'transactionIndustryType'=>'RE',
			'holderType'=>'',
			'customerAccountCode'=>'',
			'transactionCode'=>'',
			'holderName'=>'Tony+Stark',
			'accountNumber'=>'5499740000000057',
			'accountAccessory'=>'0420',
			'street'=>'123+My+Street',
			'city'=>'My+City',
			'state'=>'UT',
			'zipCode'=>'87653',
			'splits'=>'(accountId=741852;amount=10000)(accountId=369258;amount=10000)',


	              }
    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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'userName':'API-zift-reseller',
			'password':'l1Qn77ccQv84eURuEUFaNTupk6H8onF9',
			'merchantAccountCode':'789486',
			'requestType':'sale',
			'amount':'50000',
			'accountType':'R',
			'transactionIndustryType':'RE',
			'holderType':'',
			'customerAccountCode':'',
			'transactionCode':'',
			'holderName':'Tony+Stark',
			'accountNumber':'5499740000000057',
			'accountAccessory':'0420',
			'street':'123+My+Street',
			'city':'My+City',
			'state':'UT',
			'zipCode':'87653',
			'splits':'(accountId=741852;amount=10000)(accountId=369258;amount=10000)'


         }
    }

    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.ziftpay.com/gates/xurl?',
       [
			userName=>'API-zift-reseller',
			password=>'l1Qn77ccQv84eURuEUFaNTupk6H8onF9',
			merchantAccountCode=>'789486',
			requestType=>'sale',
			amount=>'50000',
			accountType=>'R',
			transactionIndustryType=>'RE',
			holderType=>'',
			customerAccountCode=>'',
			transactionCode=>'',
			holderName=>'Tony+Stark',
			accountNumber=>'5499740000000057',
			accountAccessory=>'0420',
			street=>'123+My+Street',
			city=>'My+City',
			state=>'UT',
			zipCode=>'87653',
			splits=>'(accountId=741852;amount=10000)(accountId=369258;amount=10000)'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/gates/xurl?'
	    values = {
			'userName':'API-zift-reseller',
			'password':'l1Qn77ccQv84eURuEUFaNTupk6H8onF9',
			'merchantAccountCode':'789486',
			'requestType':'sale',
			'amount':'50000',
			'accountType':'R',
			'transactionIndustryType':'RE',
			'holderType':'',
			'customerAccountCode':'',
			'transactionCode':'',
			'holderName':'Tony+Stark',
			'accountNumber':'5499740000000057',
			'accountAccessory':'0420',
			'street':'123+My+Street',
			'city':'My+City',
			'state':'UT',
			'zipCode':'87653',
			'splits':'(accountId=741852;amount=10000)(accountId=369258;amount=10000)'


      }

    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)
                    

Split transactions are processed via the Charge a Card or Charge a Bank Account sale requests. If splits are included in the request the following split related parameters will be included in the response.

Name Value or Format Description
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsList List of items included in the transaction. ex:

(code=001;itemId=I123;splits=(accountId=20011;trans
actionId=S10001)(accountId=20012;transacti
onId=S10002))

Split Schema

requestType=split-schema

Split-schema allows you to create a preset split arrangement. This reduces the overall API call complexity in situations where split information is static and repeatedly used.

In the response we will return a splitSchemaId which references a specific split arrangement you pass in the request. The splitSchemaId field with corresponding value can then be used in a standard Charge a Card or Charge a Bank Account request to process the split transaction.

For example, if you have a merchant or affiliate (Receiver 1) that always receives 10% of the transactions run by Merchant A you can create a schema that always splits 10% of the transaction to Receiver 1. You may also set a specific amount such as $5 but you must be sure the total transaction amount covers the split and processing fees. The API will return an error if your total split amounts exceed the total transaction amount.

Name Value or Format Description
requestTypesplit-schemaRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
descriptionString(60)Description of a split schema.
splitSchemaCodeString (60)Identifier of a split schema within your system. This allows you to set a an ID in your system and attach it to the split schema within Zift.
splitsListRequired
Designates the list of split payment scenarios included in the transaction. The splits parameter value follows our subrecord format explained here.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=split-schema&userName=myUsername&password=myP%40ssword&accountId=2001&description=first+split+schema&splitSchemaCode=s01&splits=(accountId
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "requestType=split-schema"  \
	-d "userName=myUsername"  \
	-d "password=myP%40ssword"  \
	-d "accountId=2001"  \
	-d "description=first+split+schema"  \
	-d "splitSchemaCode=s01"  \
	-d "splits=(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)"  \

 
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.ziftpay.com/gates/xurl?", 
 			 "&requestType=split-schema"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&description=first+split+schema"
			+ "&splitSchemaCode=s01"
			+ "&splits=(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)"
       
        ));
 
    }              
    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.ziftpay.com/gates/xurl?';
    $data = array(
			'requestType'=>'split-schema',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'description'=>'first+split+schema',
			'splitSchemaCode'=>'s01',
			'splits'=>'(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)',

        );
 
    $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.ziftpay.com/gates/xurl?",

			 "requestType=split-schema"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&description=first+split+schema"
			+ "&splitSchemaCode=s01"
			+ "&splits=(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)"

                ));
        }

	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.ziftpay.com/gates/xurl?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=split-schema"
			 postData =  postData + "&userName=myUsername"
			 postData =  postData + "&password=myP%40ssword"
			 postData =  postData + "&accountId=2001"
			 postData =  postData + "&description=first+split+schema"
			 postData =  postData + "&splitSchemaCode=s01"
			 postData =  postData + "&splits=(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)"


         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.ziftpay.com/gates/xurl?")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    post_params = {
			'requestType'=>'split-schema',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'description'=>'first+split+schema',
			'splitSchemaCode'=>'s01',
			'splits'=>'(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)',


	              }
    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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'split-schema',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'description':'first+split+schema',
			'splitSchemaCode':'s01',
			'splits':'(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)
'


         }
    }

    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.ziftpay.com/gates/xurl?',
       [
			requestType=>'split-schema',
			userName=>'myUsername',
			password=>'myP%40ssword',
			accountId=>'2001',
			description=>'first+split+schema',
			splitSchemaCode=>'s01',
			splits=>'(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/gates/xurl?'
	    values = {
			'requestType':'split-schema',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'description':'first+split+schema',
			'splitSchemaCode':'s01',
			'splits':'(accountId=2011;amount=7000)(accountId=147258;amount=2000)(accountId=963258;amount=1000)'


      }

    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
responseTypesplit-schemaIndicates the type of response.
splitSchemaIdReferenceSplit schema ID generated by the Zift system.

Account Verification

requestType=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 unneccsary and costly ACH returns.

Authentication Fields
Name Value or Format Description
requestTypeaccount-verificationRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
back to top
Account Fields
Name Value or Format Description
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Conditional
Credit card or bank account number.
accountAccessoryString (10)Conditional
Card expiration date or bank routing number.
holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Conditional
Name of the card holder or bank account owner.
cscString(4)Card security code (three digits on the back of a payment card).
back to top
Transaction Fields
Name Value or Format Description
tokenString (40)Conditional
Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionDateDate (yyyyMMdd)Date of the transaction.
transactionCodeString (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.

customerAccountCodeString(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.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
back to top
Billing Address Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
back to top
Account Verification Conditions
If token is used.

Field Usage
accountNumber Not used
accountAccessory Required
holderName Required
token Required
csc Optional

https://sandbox-secure.ziftpay.com/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
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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##
                    

List of parameters sent back as part of the API response.

Name Value or Format Description
responseTypeaccount-verificationIndicates the type of response.
accountIdString (12)Indicates the accountId
transactionDateDate (yyyyMMdd)Date of the transaction.
terminalIdString (32)Terminal ID associated with the transaction.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
tokenString (40)Token associated with the payment card or bank account. Can be used to process future transactions.
accountAccessoryString (10)Card expiration date or bank routing number.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction. If empty no cycle was opened.
terminalMessageString (100)Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information.
responseCodeString (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.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.

Convenience Fee

requestType=convenience-fee

An operation used to calculate a surcharge to the cardholder to cover the cost of the credit card processing.

Quite often, companies that process transactions on behalf of other organizations may require to explicitly indicate that the payment amount includes a certain part that constitutes service fees. For example, when $105 sale is processed, $5 represent service fees that the company submitter wants to withhold when deposits will get remitted to the organization on behalf of which the transaction was done (e.g. organization gets $100 and submitter keeps $5 service fee).

In order to accommodate these needs, Sale operation provides feeAmount field, which should contain the amount of the processing fee that the submitter wants to withhold 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.

For cases, when elaborate convenience fee calculation logic is involved, it's possible to call convenience-fee operation to get the amount of convenience fee to include in a subsequent sale / sale-auth call.

If you wish to maintain complete control over the conveneience fee calculation formula at the time of transaction we recommend you use Splits with your transaction instead of convenience-fee.

Name Value or Format Description
requestTypeconvenience-feeRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Required
Credit card or bank account number.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Conditional
Name of the card holder or bank account owner.
amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
transactionDateDate (yyyyMMdd)Date of the transaction.
transactionCodeString (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.

customerAccountCodeString(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.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
stateString (2)The state of the card holder.
zipY - yes, N - no; default - YIndicates whether an export response file is returned as an archived ZIP file or a .csv file.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=convenience-fee&userName=myUsername&password=myP%40ssword&accountId=2001&transactionIndustryType=RE&accountType=R&accountNumber=5499740000000057&accountAccessory=0422&amount=5000&transactionCode=0000000001&customerAccountCode=0000000001&holderType=&holderName=&street=12+Main+St&city=Denver&state=CO&zipCode=30301
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "requestType=convenience-fee"  \
	-d "userName=myUsername"  \
	-d "password=myP%40ssword"  \
	-d "accountId=2001"  \
	-d "transactionIndustryType=RE"  \
	-d "accountType=R"  \
	-d "accountNumber=5499740000000057"  \
	-d "accountAccessory=0422"  \
	-d "amount=5000"  \
	-d "transactionCode=0000000001"  \
	-d "customerAccountCode=0000000001"  \
	-d "holderType="  \
	-d "holderName="  \
	-d "street=12+Main+St"  \
	-d "city=Denver"  \
	-d "state=CO"  \
	-d "zipCode=30301"  \

 
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.ziftpay.com/gates/xurl?", 
 			 "&requestType=convenience-fee"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&transactionIndustryType=RE"
			+ "&accountType=R"
			+ "&accountNumber=5499740000000057"
			+ "&accountAccessory=0422"
			+ "&amount=5000"
			+ "&transactionCode=0000000001"
			+ "&customerAccountCode=0000000001"
			+ "&holderType="
			+ "&holderName="
			+ "&street=12+Main+St"
			+ "&city=Denver"
			+ "&state=CO"
			+ "&zipCode=30301"
       
        ));
 
    }              
    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.ziftpay.com/gates/xurl?';
    $data = array(
			'requestType'=>'convenience-fee',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'transactionIndustryType'=>'RE',
			'accountType'=>'R',
			'accountNumber'=>'5499740000000057',
			'accountAccessory'=>'0422',
			'amount'=>'5000',
			'transactionCode'=>'0000000001',
			'customerAccountCode'=>'0000000001',
			'holderType'=>'',
			'holderName'=>'',
			'street'=>'12+Main+St',
			'city'=>'Denver',
			'state'=>'CO',
			'zipCode'=>'30301',

        );
 
    $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.ziftpay.com/gates/xurl?",

			 "requestType=convenience-fee"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&transactionIndustryType=RE"
			+ "&accountType=R"
			+ "&accountNumber=5499740000000057"
			+ "&accountAccessory=0422"
			+ "&amount=5000"
			+ "&transactionCode=0000000001"
			+ "&customerAccountCode=0000000001"
			+ "&holderType="
			+ "&holderName="
			+ "&street=12+Main+St"
			+ "&city=Denver"
			+ "&state=CO"
			+ "&zipCode=30301"

                ));
        }

	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.ziftpay.com/gates/xurl?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=convenience-fee"
			 postData =  postData + "&userName=myUsername"
			 postData =  postData + "&password=myP%40ssword"
			 postData =  postData + "&accountId=2001"
			 postData =  postData + "&transactionIndustryType=RE"
			 postData =  postData + "&accountType=R"
			 postData =  postData + "&accountNumber=5499740000000057"
			 postData =  postData + "&accountAccessory=0422"
			 postData =  postData + "&amount=5000"
			 postData =  postData + "&transactionCode=0000000001"
			 postData =  postData + "&customerAccountCode=0000000001"
			 postData =  postData + "&holderType="
			 postData =  postData + "&holderName="
			 postData =  postData + "&street=12+Main+St"
			 postData =  postData + "&city=Denver"
			 postData =  postData + "&state=CO"
			 postData =  postData + "&zipCode=30301"


         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.ziftpay.com/gates/xurl?")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    post_params = {
			'requestType'=>'convenience-fee',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'transactionIndustryType'=>'RE',
			'accountType'=>'R',
			'accountNumber'=>'5499740000000057',
			'accountAccessory'=>'0422',
			'amount'=>'5000',
			'transactionCode'=>'0000000001',
			'customerAccountCode'=>'0000000001',
			'holderType'=>'',
			'holderName'=>'',
			'street'=>'12+Main+St',
			'city'=>'Denver',
			'state'=>'CO',
			'zipCode'=>'30301',


	              }
    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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'convenience-fee',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'transactionIndustryType':'RE',
			'accountType':'R',
			'accountNumber':'5499740000000057',
			'accountAccessory':'0422',
			'amount':'5000',
			'transactionCode':'0000000001',
			'customerAccountCode':'0000000001',
			'holderType':'',
			'holderName':'',
			'street':'12+Main+St',
			'city':'Denver',
			'state':'CO',
			'zipCode':'30301'


         }
    }

    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.ziftpay.com/gates/xurl?',
       [
			requestType=>'convenience-fee',
			userName=>'myUsername',
			password=>'myP%40ssword',
			accountId=>'2001',
			transactionIndustryType=>'RE',
			accountType=>'R',
			accountNumber=>'5499740000000057',
			accountAccessory=>'0422',
			amount=>'5000',
			transactionCode=>'0000000001',
			customerAccountCode=>'0000000001',
			holderType=>'',
			holderName=>'',
			street=>'12+Main+St',
			city=>'Denver',
			state=>'CO',
			zipCode=>'30301'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/gates/xurl?'
	    values = {
			'requestType':'convenience-fee',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'transactionIndustryType':'RE',
			'accountType':'R',
			'accountNumber':'5499740000000057',
			'accountAccessory':'0422',
			'amount':'5000',
			'transactionCode':'0000000001',
			'customerAccountCode':'0000000001',
			'holderType':'',
			'holderName':'',
			'street':'12+Main+St',
			'city':'Denver',
			'state':'CO',
			'zipCode':'30301'


      }

    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
responseTypeconvenience-feeIndicates the type of response.
accountIdString (12)Indicates the accountId
responseCodeString (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.
feeAmountIntegerAmount of service fee included in amount field.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.

Authentication

Authentication is used to generate a temporary password to be used in requests associated with hosted payment pages (HPP) and merchant creation.

The use of a temporary password is of particular importance when dealing with HPPs. In order for an HPP-based transaction to complete, the transaction request needs to contain authentication information.

Because HPP's are rendered in a user’s browser, the authentication information can be cached by the browser. To prevent this, authentication is used to generate a temporary password that is active for 15 minutes from the moment of creation, and can only be used once during this period. This temporary password can safely be serviced to customers using HPP's even if caching is potentially possible.

Name Value or Format Description
requestTypeauthenticationSpecifies the type of operation to be performed.
userNameString (50)Name of a user that initiates the API call.
passwordString (32)Password of a user that initiates the API call.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
contextTypeapi or
proxynization
Defines what API a temporary password will be used for.

Allowed Values
api indicates standard processing API - default
proxynization indicates proxynization API
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=authentication&userName=myUsername&password=myP%40ssword
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypeauthenticationIndicates the type of response.
responseCodeString (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.
passwordExpirationDateDate (yyyyMMddHHmmSS)The date and time this the temporary password will expire.
temporaryPasswordString (20)The system generated temporary password.

Close Cycle

requestType=close-cycle

An operation that allows you to close an open retail batch for an account, send all captured transactions within the batch for settlement, see totals within the batch and reverse any void transactions.

Name Value or Format Description
requestTypeclose-cycleRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
terminalIdString (32)Reference to a terminal associated with the API call. See integration notes for more information.Note: If the field's value contains special characters (&, ?, =, etc), it must be URL-encoded.
isSettlementApprovedBooleanIndicates whether settlement has been approved.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=close-cycle&userName=myUsername&password=myP%40ssword&accountId=2001
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypeclose-cycleIndicates the type of response.
accountIdString (12)Indicates the accountId
terminalIdString (32)Terminal ID associated with the transaction.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
totalTransactionCountIntegerTotal transaction count.
totalTransactionAmountIntegerTotal transaction amount.
totalSaleCountIntegerTotal count of sale transactions.
totalSaleAmountIntegerTotal amount of sale transactions.
totalSaleAuthCountIntegerTotal count of sale-auth transactions.
totalSaleAuthAmountIntegerTotal amount of sale-auth transactions.
totalCreditCountIntegerTotal count of credit transactions.
totalCreditAmountIntegerTotal amount of credit transactions.
totalCreditAuthCountIntegerTotal count of credit-auth transactions.
totalCreditAuthAmountIntegerTotal amount of credit-auth transactions.
totalVoidCountIntegerTotal count of voids.
voidAmountInteger (in cents)Amount of void associated with the transaction.
totalDeclineCountIntegerTotal count of declines.
totalDeclineAmountIntegerTotal 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
requestTypebalance-inquiry-cycleRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
terminalIdString (32)Reference to a terminal associated with the API call. See integration notes for more information.Note: If the field's value contains special characters (&, ?, =, etc), it must be URL-encoded.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=balance-inquiry-cycle&userName=myUsername&password=myP%40ssword&accountId=2001
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypebalance-inquiry-cycleIndicates the type of response.
accountIdString (12)Indicates the accountId
terminalIdString (32)Terminal ID associated with the transaction.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
totalTransactionCountIntegerTotal transaction count.
totalTransactionAmountIntegerTotal transaction amount.
totalSaleCountIntegerTotal count of sale transactions.
totalSaleAmountIntegerTotal amount of sale transactions.
totalSaleAuthCountIntegerTotal count of sale-auth transactions.
totalSaleAuthAmountIntegerTotal amount of sale-auth transactions.
totalCreditCountIntegerTotal count of credit transactions.
totalCreditAmountIntegerTotal amount of credit transactions.
totalCreditAuthCountIntegerTotal count of credit-auth transactions.
totalCreditAuthAmountIntegerTotal amount of credit-auth transactions.
totalVoidCountIntegerTotal count of voids.
voidAmountInteger (in cents)Amount of void associated with the transaction.
totalDeclineCountIntegerTotal count of declines.
totalDeclineAmountIntegerTotal amount of declines.

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, reducing your overall PCI scope.

Create a Token

requestType=tokenization

The tokenization request allows you to submit a card number or bank account for storage on our servers. We will return a token which can be used to reference the card or bank account for future processing.

By default we tokenize every card and bank account on sale requests which can allow you to easily save payment methods for your customers. The tokenization request can be used as a standalone operation for tokenization only. It is often used to store customers payment method on file within your system.

Name Value or Format Description
requestTypetokenizationRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountNumberString (20)Required
Credit card or bank account number.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Name of the card holder or bank account owner.
transactionCodeString (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.

verificationModeEnumDefines 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.
clientHostString (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
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=tokenization&userName=myUsername&password=myP%40ssword&accountId=2001&accountType=R&accountNumber=5499740000000057&accountAccessory=0422&transactionCode=0000000001&holderName=Tony+Stark
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypetokenizationIndicates the type of response.
accountIdString (12)Indicates the accountId
accountType Indicates the accountType used in the transaction. If present in the request it will be returned in the response.
extendedAccountTypeEnum 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.
accountAccessoryString (10)Card expiration date or bank routing number.
tokenString (40)Token associated with the payment card or bank account. Can be used to process future transactions.
holderNameString (150)Name of the card holder or bank account owner.
requestIdString (40)Identifier of the API request.
transactionCodeString (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.

transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
terminalMessageString (100)Internal field for exchange of control messages between TMS system and the terminal. See integration notes for more information.

Charge Using a Token

requestType=sale

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
requestTypesale, sale-authRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumRequired
Specifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountAccessoryString (10)Required
Card expiration date or bank routing number.
tokenString (40)Required
Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

amountInteger (in cents)Required
Specifies the total amount of the transaction in cents (not dollars) ex: $5.00 = 500¢
transactionIndustryTypeEnumRequired
Indicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
holderNameString (150)Required
Name of the card holder or bank account owner.
Charge Using a Token - Customer Billing Fields
Name Value or Format Description
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
countryCodeString (2)The country of the card holder.
stateString (2)The state of the card holder.
zipCodeString (15)The zip code of the card holder.
phoneString (20)Phone number associated with a payment card or bank account holder.
emailString (100)Email associated with a payment card or bank account holder.
https://sandbox-secure.ziftpay.com/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 
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypeEnumIndicates the type of response.
accountIdString (12)Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountType EnumSpecifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
holderNameString (150)Name of the card holder or bank account owner.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
cashbackAmountInteger (in cents)cashbackAmount used in the transaction.
feeAmountIntegerContains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance.

tipAmountInteger (in cents)For restaurant industry only. tipAmount used in the transaction. Optional in the request, not always present in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
providerTransactionCodeString (25)Identifier of the transaction from the card networks.
transactionIdLongUnique identifier of the transaction within Zift. Returned in the sale-auth response.
providerTransactionIdString (50)Identifier of the transaction from the processing networks. Provided by the networks. Not always present in the response.
requestIdString (40)Identifier of the API request.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
cycleCodeLongIdentifier of a retail cycle associated with the transaction.
warningCodeString (1)Code warning that non-criticial issue with the transaction are present.
responseCodeString (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.
providerResponseCodeString (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.
providerResponseMessageString (260)Response message returned by the payment and acquiring networks. Not always present in the response. Supports legacy systems.
avsResponseCodeString (2)AVS response code if address information has been provided. See response codes for more information.
providerAvsResponseCodeString (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.
providerCscResponseCodeString (3)CSC response code returned by the payment and acquiring networks. Supports legacy systems.
splitsListList of split payment scenarios included in the transaction. ex:

(accountId=20011;transactionId=S10001)
(accountId=20012;transactionId=S10002)
(accountId=20013;transactionId=S10003)
itemsList List of items included in the transaction. ex:

(code=001;itemId=I123;splits=(accountId=20011;trans
actionId=S10001)(accountId=20012;transacti
onId=S10002))

Get 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.

Name Value or Format Description
requestTypeget-profileRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
tokenString (40)Required
Token associated with a payment card or bank account. Value returned in the sale, sale-auth and tokenization response. Can be used instead of a payment card or bank account number (accountNumber) in further transaction processing.

https://sandbox-secure.ziftpay.com/gates/xurl?requestType=get-profile&userName=myUsername&password=myP%40ssword&accountId=2001&token=XVC01P0000000084632147254611114111001111
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypeget-profileIndicates the type of response.
accountType EnumSpecifies the payment method to be used with this transaction. Click here for a list of possible values and their descriptions.
accountAccessoryString (10)Card expiration date or bank routing number.
accountNumberMaskedString (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.
holderNameString (150)Name of the card holder or bank account owner.
holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
streetString (128)The street address of the card holder.
cityString (50)The city of the card holder.
stateString (2)The state of the card holder.
zipY - yes, N - no; default - YIndicates whether an export response file is returned as an archived ZIP file or a .csv file.

Reporting

Use our reporting API to get detailed information about transactions, transaction history and merchants.

Export

requestType=export

The export request loads transaction history over a specified time period within the last 90 days or less. The response is returned in the form of a .csv file or an archived Zip file.

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 transactionType value.

From the point of view of their origin, transactions in the system can be of two types:

  • Transactions that come from the merchant and their respective responses - sale-auth, sale, credit, refund, decline, blacklist, void;
  • Transactions that come from Zift – reversal, chargeback, return, notice.

Depending on the type of the transaction, transactionDate and settlementDate may vary or be the same.

For transactions which come from the merchant, transactionDate is the date when the transaction was processed (authorized) and settlementDate is the date when the transaction was settled, if it was successfully settled. For direct debit transactions, transactionDate and settlementDate will always be the same.

For transactions which come from Zift, transactionDate and settlementDate are the same, and they represent the date when the transaction was loaded into the system.

Name Value or Format Description
requestTypeexportRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
transactionTypeEnumThe 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.
customerAccountCodeString(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.
customerAccountInternalCodeString (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.
submissionTypeEnumThe submission type of the transactions to be exported. By default all submission types will be returned in the export. To load a combination of submission types, multiple pipe-delimited values should be specified as a submissionType value.
zipY - yes, N - no; default - YIndicates whether an export response file is returned as an archived ZIP file or a .csv file.
fromRequestDateyyyyMMddConditional
Lower limit of the request date range. Dates below this value are not included in the range.
toRequestDateyyyyMMddConditional
Upper limit of the request date range. Dates above this value are not included in the range.
fromResponseDateyyyyMMddConditional
Lower limit of the response date range. Dates below this value are not included in the range.
toResponseDateyyyyMMddConditional
Lower limit of the response date range. Dates below this value are not included in the range.
Export Request Conditions

Field Usage
fromRequestDate Required
toRequestDate Required
fromResponseDate Not used
toResponseDate Not used

Field Usage
fromRequestDate Not used
toRequestDate Not used
fromResponseDate Required
toResponseDate Required

Field Usage
fromRequestDate Required
toRequestDate Required
fromResponseDate Optional
toResponseDate Optional

https://sandbox-secure.ziftpay.com/gates/xurl?requestType=export&userName=myUsername&password=myP%40ssword&zip=Y&accountId=2001&transactionType=sale&fromRequestDate=20170401&toRequestDate=20170430
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "requestType=export"  \
	-d "userName=myUsername"  \
	-d "password=myP%40ssword"  \
	-d "zip=Y"  \
	-d "accountId=2001"  \
	-d "transactionType=sale"  \
	-d "fromRequestDate=20170401"  \
	-d "toRequestDate=20170430"  \

 
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.ziftpay.com/gates/xurl?", 
 			 "&requestType=export"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&zip=Y"
			+ "&accountId=2001"
			+ "&transactionType=sale"
			+ "&fromRequestDate=20170401"
			+ "&toRequestDate=20170430"
       
        ));
 
    }              
    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.ziftpay.com/gates/xurl?';
    $data = array(
			'requestType'=>'export',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'zip'=>'Y',
			'accountId'=>'2001',
			'transactionType'=>'sale',
			'fromRequestDate'=>'20170401',
			'toRequestDate'=>'20170430',

        );
 
    $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.ziftpay.com/gates/xurl?",

			 "requestType=export"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&zip=Y"
			+ "&accountId=2001"
			+ "&transactionType=sale"
			+ "&fromRequestDate=20170401"
			+ "&toRequestDate=20170430"

                ));
        }

	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.ziftpay.com/gates/xurl?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=export"
			 postData =  postData + "&userName=myUsername"
			 postData =  postData + "&password=myP%40ssword"
			 postData =  postData + "&zip=Y"
			 postData =  postData + "&accountId=2001"
			 postData =  postData + "&transactionType=sale"
			 postData =  postData + "&fromRequestDate=20170401"
			 postData =  postData + "&toRequestDate=20170430"


         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.ziftpay.com/gates/xurl?")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    post_params = {
			'requestType'=>'export',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'zip'=>'Y',
			'accountId'=>'2001',
			'transactionType'=>'sale',
			'fromRequestDate'=>'20170401',
			'toRequestDate'=>'20170430',


	              }
    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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'export',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'zip':'Y',
			'accountId':'2001',
			'transactionType':'sale',
			'fromRequestDate':'20170401',
			'toRequestDate':'20170430'


         }
    }

    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.ziftpay.com/gates/xurl?',
       [
			requestType=>'export',
			userName=>'myUsername',
			password=>'myP%40ssword',
			zip=>'Y',
			accountId=>'2001',
			transactionType=>'sale',
			fromRequestDate=>'20170401',
			toRequestDate=>'20170430'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/gates/xurl?'
	    values = {
			'requestType':'export',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'zip':'Y',
			'accountId':'2001',
			'transactionType':'sale',
			'fromRequestDate':'20170401',
			'toRequestDate':'20170430'


      }

    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
transactionTypeEnumThe 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.
submissionTypeEnumThe submission type of the transactions to be exported. By default all submission types will be returned in the export. To load a combination of submission types, multiple pipe-delimited values should be specified as a submissionType value.
accountIdString (12)Indicates the accountId
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
transactionDateDate (yyyyMMdd)Date of the transaction.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
responseCodeString (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.
originalTransactionIdLongtransactionId of the original transaction that this transaction adjusts.
required for: reversal, chargeback, return, decline
batchCodeLongIdentifier of the batch that this transaction belongs to.
approvalCodeString (100)Authorization number given by a cardholder's bank account. Often shown on a credit card receipt.
settlementDateyyyyMMdd Date, when the transaction was settled/loaded into the system.
accountType Indicates the accountType used in the transaction. If present in the request it will be returned in the response.
transactionIndustryTypeEnumIndicates the industry related to this merchant and specific transaction. Click here for a list of possible values and their descriptions.
holderNameString (150)Name of the card holder or bank account owner.
customerAccountCodeString(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.
transactionStatusEnumStatus of the transaction.
amountInteger (in cents)Specifies the total authorized amount of the transaction.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
transactionInternalCodeString (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.
customerAccountInternalCodeString (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.
interchangeRateNameString (80)Name of interchange rate.
interchangePercentageFeeIntegerPercentage of interchange fee included in amount field.
interchangeFlatFeeIntegerAmount of fixed fee included in amount field.
interchangeFeeAmountIntegerAmount of interchange fee included in amount field.
assessmentsFeeAmountInteger in basis pointsOther fixed fees of the transaction included in amount field.
processorFeeAmountInteger in basis pointsAmount of processor service fee included in amount field.
processingFeeAmountInteger in basis pointsAmount of processing service fee included in amount field.
flatFeeAmountInteger in basis pointsAmount of flat fee included in amount field.

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
requestTypefindRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
transactionOriginCodeString (35)Identifier of a location within a merchants 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.
transactionCodeString (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.

transactionIdLongConditional
Unique identifier of the transaction within Zift. Always present in the response.
clientHostString (60)IP-address or a host associated with a submitter that originated the transaction. See integration notes for more information.
Find Request Conditions

Field Usage
transactionId Not used
transactionCode Required

Field Usage
transactionId Required
transactionCode Not used

https://sandbox-secure.ziftpay.com/gates/xurl?requestType=find&userName=myUsername&password=myP%40ssword&accountId=2001&transactionId=123456
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypefindIndicates the type of response.
accountIdString (12)Indicates the accountId
terminalIdString (32)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.
extendedAccountTypeEnum 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.
accountNumberMaskedString (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.
accountAccessoryString (10)Card expiration date or bank routing number.
accountAccessoryString (10)Card expiration date or bank routing number.
accountDataString (500)Track/EMV data of a payment card. See integration notes for more information.
holderTypeP or OType of a payment card or bank account holder. Set value to O for level II and level III transactions. P, personal, is the default.
holderNameString (150)Name of the card holder or bank account owner.
tokenString (40)Token associated with the payment card or bank account. Can be used to process future transactions.
balanceInteger (in cents)For debit and gift cards only. Balance remaining on a card used for the transaction.
currencyCodeString (3)Indicates currency of transaction. If present in the request it will be returned in the response.
amountInteger (in cents)Specifies the total authorized amount of the transaction.
originalAmountIntegerAmount provided in the request. Differs from amount value if partial authorization has occurred.
feeAmountIntegerContains the amount of the transaction a software system or platform charges as a service fee or processing fee that will be withheld from remittance.

transactionDateDate (yyyyMMdd)Date of the transaction.
transactionTypeEnumThe 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
requestTypemerchant-infoRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Specifies the merchant account ID you wish to look up.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=merchant-info&userName=myUsername&password=myP%40ssword&accountId=2001#
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypemerchant-infoIndicates the type of response.
accountIdString (12)Indicates the accountId
merchantNameString (50)Merchants business name.
street1String (128)Street of the business address (line 1).
street2String (128)Street of the business address (line 2).
zipCodeString (9)ZIP code of the business address.
cityString (50)City of the merchants business address.
stateString (3)State code of the merchants business address.
countryCodeString (3)Country code of the merchants business address.
workHoursString (1024)Work hours when the merchants business operates.
customerServicePhoneString (15)The merchants business phone number used to assist with customer questions.
merchantEmailString (100)Merchants email address.
logoString (100)Logo associated with the merchant. Base 64 encoded PNG image.

Merchant Creation

Our Merchant Creation API allows you to easily onboard and create merchant accounts.

API Endpoints for Merchant Creation:
  • Production: https://manage.ziftpay.com/gates/onboarding?
  • Sandbox: https://sandbox-manage.ziftpay.com/gates/onboarding?

The main goal of the merchant creation process is to obtain an accountID for the user signing up for the merchant account. The accountID is used in conjunction with your processing credentials (username and password) to perform actions on behalf of the merchant through your platform, like process a sale transaction or query a list of the merchants most recent transactions.

As a platform or software integrator you have a couple options on how to onboard and create the merchants.

  • Pass us all of the merchant details via the API.
  • Refer the merchant to our hosted merchant application form.

Our hosted form consists of four pages the merchant will step through during the merchant creation and application process.

  • Owner Information
  • Busines Information
  • Deposit Information
  • Terms and Conditions

The following parameters with their associated values must always be present in the onboarding request for both the Hosted Creation and API Creation methods. These values are specific to your integrator account in our sandbox or production environment. Please contact us if you need us to provide you with your specific values.

  • username
  • password
  • resellerId
  • profileId
  • portfolioId
  • feeTemplateId
  • processingConfigurationScript

Once the onboarding application has been received by our system the applicant will be shown a thank you page or can be redirected back to your site. This is determined by the returnURL and returnURLPolicy parameters in the merchant creation request.

At the same time we will notify your system of the application status via the notifyURL. If you use a notifyURL it must be over HTTPS. HTTP is not supported for notifyURL. Application status is indicated in the callback by the responseCode parameter and will have a value of A for approved, D for declined or R for under review.

The following is an example of the information you will receive from the callback to your notifyURL:

Name Description
responseType For onboarding requests responseType will always return a value of create
applicationCode The Zift application code.
applicationId The unique Zift ID to reference the application within our system.
merchantId The merchants Zift ID.
accountId The merchants Zift Account ID.
cardsDescriptor The description cardholders will see on their statement for credit card transactions to identify the merchant.
directDebitDescriptor The description customers will see on their bank statement for ACH transactions to identify the merchant.
responseCode The response code identifying the status of the application. Possible values are A for Approved, D for Declined and R for In Review.
responseMessage The response message indicating the status of the application. Possible values are Approved, Declined, and In Review

Appearance (Field and Page Controls)

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 pageFormat field allows you to completely hide a page and pass us the information through the API. The possible values for the pageFormat field are O, B, D and A and correspond to the 4 pages of the onboarding form:

  • Page 1. Merchants personal details: O
  • Page 2. Business details: B
  • Page 3. Banking details: D
  • Page 4. Agreement to our terms and conditions: A

If the pageFormat value letter (O, B, D or A) is present in the request the page is rendered. To hide page 1 and page 2, for example, the value for pageFormat should be pageFormat=DA.

To collect all the merchant information on your own form you will need to hide all the pages and just send the user to our terms and conditions page using pageFormat=A.

If you want the user to fill out all their information on our site then the value should be pageFormat=OBDA. The minimum fields required to just render the form for full user input are:

  • requestType
  • userName
  • password
  • profileId
  • resellerId
  • portfolioId
  • feeTemplateId
  • isEmbedded
  • pageFormat
  • merchantProfile
  • processingConfigurationScript

Hosted Creation

The table and examples below show how to create a merchant using our hosted merchant application form.

Name Value/Format Description
requestTypecreateRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
portfolioIdIntegerRequired
Associates the merchant application to a Zift portfolio.
resellerIdString (10)Required
Identifier of a reseller associated with a merchant being created.
feeTemplateIdIntegerRequired
Indicates the fee template to be used when configuring the new merchant.
isEmbeddedEnumIndicates if the header and footer of the onboarding form is rendered. Click for a list of possible values and their descriptions.
pageFormatString (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)

https://sandbox-manage.ziftpay.com/gates/onboarding?requestType=create&userName=myapiuser&password=myapipassword&profileId=254558741&resellerId=216&portfolioId=101&feeTemplateId=254785&isEmbedded=1&pageFormat=OBDA&merchantProfile=SSSSM&processingConfigurationScript=sandbox
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-manage.ziftpay.com/gates/onboarding? \
	-d "requestType=create"  \
	-d "userName=myapiuser"  \
	-d "password=myapipassword"  \
	-d "profileId=254558741"  \
	-d "resellerId=216"  \
	-d "portfolioId=101"  \
	-d "feeTemplateId=254785"  \
	-d "isEmbedded=1"  \
	-d "pageFormat=OBDA"  \
	-d "merchantProfile=SSSSM"  \
	-d "processingConfigurationScript=sandbox"  \

 
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-manage.ziftpay.com/gates/onboarding?", 
 			 "&requestType=create"
			+ "&userName=myapiuser"
			+ "&password=myapipassword"
			+ "&profileId=254558741"
			+ "&resellerId=216"
			+ "&portfolioId=101"
			+ "&feeTemplateId=254785"
			+ "&isEmbedded=1"
			+ "&pageFormat=OBDA"
			+ "&merchantProfile=SSSSM"
			+ "&processingConfigurationScript=sandbox"
       
        ));
 
    }              
    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-manage.ziftpay.com/gates/onboarding?';
    $data = array(
			'requestType'=>'create',
			'userName'=>'myapiuser',
			'password'=>'myapipassword',
			'profileId'=>'254558741',
			'resellerId'=>'216',
			'portfolioId'=>'101',
			'feeTemplateId'=>'254785',
			'isEmbedded'=>'1',
			'pageFormat'=>'OBDA',
			'merchantProfile'=>'SSSSM',
			'processingConfigurationScript'=>'sandbox',

        );
 
    $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-manage.ziftpay.com/gates/onboarding?",

			 "requestType=create"
			+ "&userName=myapiuser"
			+ "&password=myapipassword"
			+ "&profileId=254558741"
			+ "&resellerId=216"
			+ "&portfolioId=101"
			+ "&feeTemplateId=254785"
			+ "&isEmbedded=1"
			+ "&pageFormat=OBDA"
			+ "&merchantProfile=SSSSM"
			+ "&processingConfigurationScript=sandbox"

                ));
        }

	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-manage.ziftpay.com/gates/onboarding?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=create"
			 postData =  postData + "&userName=myapiuser"
			 postData =  postData + "&password=myapipassword"
			 postData =  postData + "&profileId=254558741"
			 postData =  postData + "&resellerId=216"
			 postData =  postData + "&portfolioId=101"
			 postData =  postData + "&feeTemplateId=254785"
			 postData =  postData + "&isEmbedded=1"
			 postData =  postData + "&pageFormat=OBDA"
			 postData =  postData + "&merchantProfile=SSSSM"
			 postData =  postData + "&processingConfigurationScript=sandbox"


         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-manage.ziftpay.com/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'=>'myapiuser',
			'password'=>'myapipassword',
			'profileId'=>'254558741',
			'resellerId'=>'216',
			'portfolioId'=>'101',
			'feeTemplateId'=>'254785',
			'isEmbedded'=>'1',
			'pageFormat'=>'OBDA',
			'merchantProfile'=>'SSSSM',
			'processingConfigurationScript'=>'sandbox',


	              }
    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-manage.ziftpay.com/gates/onboarding?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'create',
			'userName':'myapiuser',
			'password':'myapipassword',
			'profileId':'254558741',
			'resellerId':'216',
			'portfolioId':'101',
			'feeTemplateId':'254785',
			'isEmbedded':'1',
			'pageFormat':'OBDA',
			'merchantProfile':'SSSSM',
			'processingConfigurationScript':'sandbox'


         }
    }

    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-manage.ziftpay.com/gates/onboarding?',
       [
			requestType=>'create',
			userName=>'myapiuser',
			password=>'myapipassword',
			profileId=>'254558741',
			resellerId=>'216',
			portfolioId=>'101',
			feeTemplateId=>'254785',
			isEmbedded=>'1',
			pageFormat=>'OBDA',
			merchantProfile=>'SSSSM',
			processingConfigurationScript=>'sandbox'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-manage.ziftpay.com/gates/onboarding?'
	    values = {
			'requestType':'create',
			'userName':'myapiuser',
			'password':'myapipassword',
			'profileId':'254558741',
			'resellerId':'216',
			'portfolioId':'101',
			'feeTemplateId':'254785',
			'isEmbedded':'1',
			'pageFormat':'OBDA',
			'merchantProfile':'SSSSM',
			'processingConfigurationScript':'sandbox'


      }

    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
responseTypecreateIndicates the type of response.
applicationCodeString (20)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.
applicationIdLongUnique 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.
merchantIdIntegerAssociates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL.
accountIdIntegerRepresents 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.
cardsDescriptorString (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.
directDebitDescriptorString (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.
responseCodeString (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

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
requestTypecreateRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
merchantTypeEnumDefines the type of a merchant to be created. Click here for a list of possible values and their descriptions.
merchantProfileEnumDefines 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.
merchantCreationPolicyEnumDefines what status an onboarding application should obtain before a merchant is created. Click here for a list of possible values and their descriptions.
profileIdString (20)Required
Indicates the profile used to process the merchant application.
resellerIdString (10)Required
Identifier of a reseller associated with a merchant being created.
clientHostString (60)IP-address or a host associated with a submitter that originated the onboarding rquest.
portfolioIdIntegerRequired
Associates the merchant application to a Zift portfolio.
merchantIdIntegerAssociates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL.
feeTemplateIdIntegerRequired
Indicates the fee template to be used when configuring the new merchant.
distributionSchemaCodeString (20)Indicates the distribution scheme to be used when configuring the new merchant.
processingConfigurationScriptString (63)Required
Indicates the processing configuration to used when configuring the new merchant.
applicationCodeString (20)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.
Appearance and Control
Name Value/Format Description
isEmbeddedEnumIndicates if the header and footer of the onboarding form is rendered. Click for a list of possible values and their descriptions.
pageFormatString (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)

notifyURLString (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.
cancelURLString (255)URL used when the user cancels the onboarding application
returnURLString (255)Redirect URL used at the end of the onboarding process regardless of application status
returnURLPolicyEnumIndicates the behavior of the returnURLClick for a list of possible values and their descriptions.
notificationPolicyEnumDefines 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.
Onwer Information
Name Value/Format Description
owner.firstNameString (50)Required
First name of the primary business owner.
owner.lastNameString (50)Required
Last name of the primary business owner.
owner.emailString (100)Required
Email address of the primary business owner.
owner.street1String (128)Required
Street (line 1) address of the primary business owner.
owner.street2String (128)Street (line 2) address of the primary business owner.
owner.cityString (50)Required
City of the primary business owner.
owner.stateString (3)Required
State of the primary business owner.
owner.zipCodeString (15)Required
Zip/Postal code of the primary business owner.
owner.countryCodeString (2)Required
State of the primary business owner.
owner.birthDateDate (yyyyMMdd)Required
Birth date of the primary business owner.
owner.socialSecurityString (9)Required
Social Security Number of the primary business owner.
owner.phoneString (15)Required
Phone Number of the primary business owner.
Business Information
Name Value/Format Description
business.businessNameString (50)Required
DBA name of the merchant's company.
business.legalNameString (50)Required
Legal name of the merchant's company
business.ownershipStructureTypeEnumRequired
Ownership structure type of the merchant's company. Click for a list of possible values and their descriptions.
business.street1String (128)Required
Street Address (Street 1) of the merchant's company.
business.street2String (128)Street Address (Street 2) of the merchant's company.
business.cityString (50)Required
City of the merchant's company.
business.stateString (3)Required
State of the merchant's company.
business.zipCodeString (15)Required
Zip/Postal code of the merchant's company.
business.countryCodeString (3)Required
Country of the merchant's company.
business.descriptorPhoneString (10)Required
Customer service phone of the merchant's company that is shown on card/account holder statements
business.paymentCardDescriptorString (21)Required
Descriptor assigned to payment card transactions associated with the merchant. Shown on card/account holder statements.
business.directDebitDescriptorString (21)Required
Descriptor assigned to direct debit transactions associated with the merchant. Shown on card/account holder statements
business.taxIdString (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.webSiteString (255)Required
Website of the merchant's company.
business.emailString (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.descriptionString (255)Description of the merchant's business.
business.contactPhoneString (15)Merchant's contact phone. Used for discussing any processing issues.
business.merchantCategoryCodeString (4)Required
Merchant category code assigned to a merchant's business. For test integrations to our sandbox environment use value '7399'.
business.currencyCodeString (3)Required
Currency used for merchant's transactions. Default: USD
business.driverLicenseString (50)Driver's License Number of the merchant.
business.driverLicenseCountryCodeString (3)Country where the merchant's driver's license was issued.
business.driverLicenseStateString (3)State where the merchant's driver's license was issued.
business.registrationCountryCodeString (3)Country of the merchant's business registration.
business.registrationStateString (3)State of the merchant's business registration.
business.registrationYearString (4) (yyyy)Registration year of the merchant's business.
business.workHoursString (20)Work hours of merchant's business.
business.timeZoneCodeString (20)Merchant's perferred time-zone. Default: MDT.
business.relationshipBeginDateDate (yyyyMMdd)Date the relationship began between Zift and the merchant.
Transaction Estimates
Name Value/Format Description
estimates.annualDirectDebitVolumeIntegerRequired
Estimated volume of direct debit transactions expected to be processed during a year.
estimates.annualCardsVolumeIntegerRequired
Estimated volume of payment card transactions expected to be processed during a year.
estimates.avgDirectDebitTransactionAmountIntegerRequired
Estimated average amount of direct debit transactions. Amounts must be in whole dollars.
estimates.avgCardsTransactionAmountIntegerRequired
Estimated average amount of payment card transactions. Amounts must be in whole dollars.
Deposit Account
Name Value/Format Description
deposit.bankNameString (80)Name of a bank associated with a merchant's deposit account.
deposit.holderNameString (56)Required
Holder name of a merchant's deposit account.
deposit.routingNumber String (35)Required
Routing number of a merchant's deposit account.
deposit.accountNumber String (50)Required
Number of a merchant's deposit account.
deposit.accountTypeEnumType of deposit account. Click for a list of possible values and their descriptions.

https://sandbox-manage.ziftpay.com/gates/onboarding?requestType=create&userName=myapiuser&password=myapipassword&merchantType=M&merchantProfile=SSSSM&merchantCreationPolicy=A&profileId=254558741&resellerId=216&clientHost=4.4.4.4&portfolioId=101&merchantId=&feeTemplateId=254785&distributionSchemaCode=&processingConfigurationScript=sandbox&applicationCode=100001&isEmbedded=1&pageFormat=OBDA&notifyURL=https://myNotifyURL.com&cancelURL=http://myCancelURL.com&returnURL=http://myReturnURL.com&returnURLPolicy=page&notificationPolicy=X&owner.firstName=Tony&owner.lastName=Stark&owner.email=tony@ziftpay.com&owner.street1=10880 Malibu Point&owner.street2=&owner.city=Los Angeles&owner.state=CA&owner.zipCode=95660&owner.countryCode=US&owner.birthDate=19670210&owner.socialSecurity=369258741&owner.phone=5551234567&business.businessName=Stark Labs&business.legalName=Stark Industries&business.ownershipStructureType=C&business.street1=34th Street Stark Tower&business.street2=&business.city=New York&business.state=NY&business.zipCode=10025&business.countryCode=US&business.descriptorPhone=5551234567&business.paymentCardDescriptor=starkind-1234567890&business.directDebitDescriptor=starkind:1234567890&business.taxId=741852369&business.webSite=http://stark.ziftpay.com&business.email=tony@ziftpay.com&business.description=Aerospace things and really cool stuff&business.merchantCategoryCode=7399&business.currencyCode=USD&business.contactPhone=1234567890&business.driverLicense=&business.driverLicenseCountryCode=&business.driverLicenseState=&business.registrationCountryCode=&business.registrationState=&business.registrationYear=&business.workHours=&business.timeZoneCode=&business.relationshipBeginDate=&estimates.annualDirectDebitVolume=1000000&estimates.annualCardsVolume=1000000&estimates.avgDirectDebitTransactionAmount=400000&estimates.avgCardsTransactionAmount=600000&estimates.maxTransactionAmount=500000&deposit.bankName=Stark Bank&deposit.holderName=Tony Stark&deposit.routingNumber=324377516&deposit.accountNumber=1234567980&deposit.accountType=C
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST 
https://sandbox-manage.ziftpay.com/gates/onboarding? \
	-d "requestType=create"  \
	-d "userName=myapiuser"  \
	-d "password=myapipassword"  \
	-d "merchantType=M"  \
	-d "merchantProfile=SSSSM"  \
	-d "merchantCreationPolicy=A"  \
	-d "profileId=254558741"  \
	-d "resellerId=216"  \
	-d "clientHost=4.4.4.4"  \
	-d "portfolioId=101"  \
	-d "merchantId="  \
	-d "feeTemplateId=254785"  \
	-d "distributionSchemaCode="  \
	-d "processingConfigurationScript=sandbox"  \
	-d "applicationCode=100001"  \
	-d "isEmbedded=1"  \
	-d "pageFormat=OBDA"  \
	-d "notifyURL=https://myNotifyURL.com"  \
	-d "cancelURL=http://myCancelURL.com"  \
	-d "returnURL=http://myReturnURL.com"  \
	-d "returnURLPolicy=page"  \
	-d "notificationPolicy=X"  \
	-d "owner.firstName=Tony"  \
	-d "owner.lastName=Stark"  \
	-d "owner.email=tony@ziftpay.com"  \
	-d "owner.street1=10880 Malibu Point"  \
	-d "owner.street2="  \
	-d "owner.city=Los Angeles"  \
	-d "owner.state=CA"  \
	-d "owner.zipCode=95660"  \
	-d "owner.countryCode=US"  \
	-d "owner.birthDate=19670210"  \
	-d "owner.socialSecurity=369258741"  \
	-d "owner.phone=5551234567"  \
	-d "business.businessName=Stark Labs"  \
	-d "business.legalName=Stark Industries"  \
	-d "business.ownershipStructureType=C"  \
	-d "business.street1=34th Street Stark Tower"  \
	-d "business.street2="  \
	-d "business.city=New York"  \
	-d "business.state=NY"  \
	-d "business.zipCode=10025"  \
	-d "business.countryCode=US"  \
	-d "business.descriptorPhone=5551234567"  \
	-d "business.paymentCardDescriptor=starkind-1234567890"  \
	-d "business.directDebitDescriptor=starkind:1234567890"  \
	-d "business.taxId=741852369"  \
	-d "business.webSite=http://stark.ziftpay.com"  \
	-d "business.email=tony@ziftpay.com"  \
	-d "business.description=Aerospace things and really cool stuff"  \
	-d "business.merchantCategoryCode=7399"  \
	-d "business.currencyCode=USD"  \
	-d "business.contactPhone=1234567890"  \
	-d "business.driverLicense="  \
	-d "business.driverLicenseCountryCode="  \
	-d "business.driverLicenseState="  \
	-d "business.registrationCountryCode="  \
	-d "business.registrationState="  \
	-d "business.registrationYear="  \
	-d "business.workHours="  \
	-d "business.timeZoneCode="  \
	-d "business.relationshipBeginDate="  \
	-d "estimates.annualDirectDebitVolume=1000000"  \
	-d "estimates.annualCardsVolume=1000000"  \
	-d "estimates.avgDirectDebitTransactionAmount=400000"  \
	-d "estimates.avgCardsTransactionAmount=600000"  \
	-d "estimates.maxTransactionAmount=500000"  \
	-d "deposit.bankName=Stark Bank"  \
	-d "deposit.holderName=Tony Stark"  \
	-d "deposit.routingNumber=324377516"  \
	-d "deposit.accountNumber=1234567980"  \
	-d "deposit.accountType=C"  \

 
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-manage.ziftpay.com/gates/onboarding?", 
 			 "&requestType=create"
			+ "&userName=myapiuser"
			+ "&password=myapipassword"
			+ "&merchantType=M"
			+ "&merchantProfile=SSSSM"
			+ "&merchantCreationPolicy=A"
			+ "&profileId=254558741"
			+ "&resellerId=216"
			+ "&clientHost=4.4.4.4"
			+ "&portfolioId=101"
			+ "&merchantId="
			+ "&feeTemplateId=254785"
			+ "&distributionSchemaCode="
			+ "&processingConfigurationScript=sandbox"
			+ "&applicationCode=100001"
			+ "&isEmbedded=1"
			+ "&pageFormat=OBDA"
			+ "¬ifyURL=https://myNotifyURL.com"
			+ "&cancelURL=http://myCancelURL.com"
			+ "&returnURL=http://myReturnURL.com"
			+ "&returnURLPolicy=page"
			+ "¬ificationPolicy=X"
			+ "&owner.firstName=Tony"
			+ "&owner.lastName=Stark"
			+ "&owner.email=tony@ziftpay.com"
			+ "&owner.street1=10880 Malibu Point"
			+ "&owner.street2="
			+ "&owner.city=Los Angeles"
			+ "&owner.state=CA"
			+ "&owner.zipCode=95660"
			+ "&owner.countryCode=US"
			+ "&owner.birthDate=19670210"
			+ "&owner.socialSecurity=369258741"
			+ "&owner.phone=5551234567"
			+ "&business.businessName=Stark Labs"
			+ "&business.legalName=Stark Industries"
			+ "&business.ownershipStructureType=C"
			+ "&business.street1=34th Street Stark Tower"
			+ "&business.street2="
			+ "&business.city=New York"
			+ "&business.state=NY"
			+ "&business.zipCode=10025"
			+ "&business.countryCode=US"
			+ "&business.descriptorPhone=5551234567"
			+ "&business.paymentCardDescriptor=starkind-1234567890"
			+ "&business.directDebitDescriptor=starkind:1234567890"
			+ "&business.taxId=741852369"
			+ "&business.webSite=http://stark.ziftpay.com"
			+ "&business.email=tony@ziftpay.com"
			+ "&business.description=Aerospace things and really cool stuff"
			+ "&business.merchantCategoryCode=7399"
			+ "&business.currencyCode=USD"
			+ "&business.contactPhone=1234567890"
			+ "&business.driverLicense="
			+ "&business.driverLicenseCountryCode="
			+ "&business.driverLicenseState="
			+ "&business.registrationCountryCode="
			+ "&business.registrationState="
			+ "&business.registrationYear="
			+ "&business.workHours="
			+ "&business.timeZoneCode="
			+ "&business.relationshipBeginDate="
			+ "&estimates.annualDirectDebitVolume=1000000"
			+ "&estimates.annualCardsVolume=1000000"
			+ "&estimates.avgDirectDebitTransactionAmount=400000"
			+ "&estimates.avgCardsTransactionAmount=600000"
			+ "&estimates.maxTransactionAmount=500000"
			+ "&deposit.bankName=Stark Bank"
			+ "&deposit.holderName=Tony Stark"
			+ "&deposit.routingNumber=324377516"
			+ "&deposit.accountNumber=1234567980"
			+ "&deposit.accountType=C"
       
        ));
 
    }              
    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-manage.ziftpay.com/gates/onboarding?';
    $data = array(
			'requestType'=>'create',
			'userName'=>'myapiuser',
			'password'=>'myapipassword',
			'merchantType'=>'M',
			'merchantProfile'=>'SSSSM',
			'merchantCreationPolicy'=>'A',
			'profileId'=>'254558741',
			'resellerId'=>'216',
			'clientHost'=>'4.4.4.4',
			'portfolioId'=>'101',
			'merchantId'=>'',
			'feeTemplateId'=>'254785',
			'distributionSchemaCode'=>'',
			'processingConfigurationScript'=>'sandbox',
			'applicationCode'=>'100001',
			'isEmbedded'=>'1',
			'pageFormat'=>'OBDA',
			'notifyURL'=>'https://myNotifyURL.com',
			'cancelURL'=>'http://myCancelURL.com',
			'returnURL'=>'http://myReturnURL.com',
			'returnURLPolicy'=>'page',
			'notificationPolicy'=>'X',
			'owner.firstName'=>'Tony',
			'owner.lastName'=>'Stark',
			'owner.email'=>'tony@ziftpay.com',
			'owner.street1'=>'10880 Malibu Point',
			'owner.street2'=>'',
			'owner.city'=>'Los Angeles',
			'owner.state'=>'CA',
			'owner.zipCode'=>'95660',
			'owner.countryCode'=>'US',
			'owner.birthDate'=>'19670210',
			'owner.socialSecurity'=>'369258741',
			'owner.phone'=>'5551234567',
			'business.businessName'=>'Stark Labs',
			'business.legalName'=>'Stark Industries',
			'business.ownershipStructureType'=>'C',
			'business.street1'=>'34th Street Stark Tower',
			'business.street2'=>'',
			'business.city'=>'New York',
			'business.state'=>'NY',
			'business.zipCode'=>'10025',
			'business.countryCode'=>'US',
			'business.descriptorPhone'=>'5551234567',
			'business.paymentCardDescriptor'=>'starkind-1234567890',
			'business.directDebitDescriptor'=>'starkind:1234567890',
			'business.taxId'=>'741852369',
			'business.webSite'=>'http://stark.ziftpay.com',
			'business.email'=>'tony@ziftpay.com',
			'business.description'=>'Aerospace things and really cool stuff',
			'business.merchantCategoryCode'=>'7399',
			'business.currencyCode'=>'USD',
			'business.contactPhone'=>'1234567890',
			'business.driverLicense'=>'',
			'business.driverLicenseCountryCode'=>'',
			'business.driverLicenseState'=>'',
			'business.registrationCountryCode'=>'',
			'business.registrationState'=>'',
			'business.registrationYear'=>'',
			'business.workHours'=>'',
			'business.timeZoneCode'=>'',
			'business.relationshipBeginDate'=>'',
			'estimates.annualDirectDebitVolume'=>'1000000',
			'estimates.annualCardsVolume'=>'1000000',
			'estimates.avgDirectDebitTransactionAmount'=>'400000',
			'estimates.avgCardsTransactionAmount'=>'600000',
			'estimates.maxTransactionAmount'=>'500000',
			'deposit.bankName'=>'Stark Bank',
			'deposit.holderName'=>'Tony Stark',
			'deposit.routingNumber'=>'324377516',
			'deposit.accountNumber'=>'1234567980',
			'deposit.accountType'=>'C',

        );
 
    $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-manage.ziftpay.com/gates/onboarding?",

			 "requestType=create"
			+ "&userName=myapiuser"
			+ "&password=myapipassword"
			+ "&merchantType=M"
			+ "&merchantProfile=SSSSM"
			+ "&merchantCreationPolicy=A"
			+ "&profileId=254558741"
			+ "&resellerId=216"
			+ "&clientHost=4.4.4.4"
			+ "&portfolioId=101"
			+ "&merchantId="
			+ "&feeTemplateId=254785"
			+ "&distributionSchemaCode="
			+ "&processingConfigurationScript=sandbox"
			+ "&applicationCode=100001"
			+ "&isEmbedded=1"
			+ "&pageFormat=OBDA"
			+ "¬ifyURL=https://myNotifyURL.com"
			+ "&cancelURL=http://myCancelURL.com"
			+ "&returnURL=http://myReturnURL.com"
			+ "&returnURLPolicy=page"
			+ "¬ificationPolicy=X"
			+ "&owner.firstName=Tony"
			+ "&owner.lastName=Stark"
			+ "&owner.email=tony@ziftpay.com"
			+ "&owner.street1=10880 Malibu Point"
			+ "&owner.street2="
			+ "&owner.city=Los Angeles"
			+ "&owner.state=CA"
			+ "&owner.zipCode=95660"
			+ "&owner.countryCode=US"
			+ "&owner.birthDate=19670210"
			+ "&owner.socialSecurity=369258741"
			+ "&owner.phone=5551234567"
			+ "&business.businessName=Stark Labs"
			+ "&business.legalName=Stark Industries"
			+ "&business.ownershipStructureType=C"
			+ "&business.street1=34th Street Stark Tower"
			+ "&business.street2="
			+ "&business.city=New York"
			+ "&business.state=NY"
			+ "&business.zipCode=10025"
			+ "&business.countryCode=US"
			+ "&business.descriptorPhone=5551234567"
			+ "&business.paymentCardDescriptor=starkind-1234567890"
			+ "&business.directDebitDescriptor=starkind:1234567890"
			+ "&business.taxId=741852369"
			+ "&business.webSite=http://stark.ziftpay.com"
			+ "&business.email=tony@ziftpay.com"
			+ "&business.description=Aerospace things and really cool stuff"
			+ "&business.merchantCategoryCode=7399"
			+ "&business.currencyCode=USD"
			+ "&business.contactPhone=1234567890"
			+ "&business.driverLicense="
			+ "&business.driverLicenseCountryCode="
			+ "&business.driverLicenseState="
			+ "&business.registrationCountryCode="
			+ "&business.registrationState="
			+ "&business.registrationYear="
			+ "&business.workHours="
			+ "&business.timeZoneCode="
			+ "&business.relationshipBeginDate="
			+ "&estimates.annualDirectDebitVolume=1000000"
			+ "&estimates.annualCardsVolume=1000000"
			+ "&estimates.avgDirectDebitTransactionAmount=400000"
			+ "&estimates.avgCardsTransactionAmount=600000"
			+ "&estimates.maxTransactionAmount=500000"
			+ "&deposit.bankName=Stark Bank"
			+ "&deposit.holderName=Tony Stark"
			+ "&deposit.routingNumber=324377516"
			+ "&deposit.accountNumber=1234567980"
			+ "&deposit.accountType=C"

                ));
        }

	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-manage.ziftpay.com/gates/onboarding?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=create"
			 postData =  postData + "&userName=myapiuser"
			 postData =  postData + "&password=myapipassword"
			 postData =  postData + "&merchantType=M"
			 postData =  postData + "&merchantProfile=SSSSM"
			 postData =  postData + "&merchantCreationPolicy=A"
			 postData =  postData + "&profileId=254558741"
			 postData =  postData + "&resellerId=216"
			 postData =  postData + "&clientHost=4.4.4.4"
			 postData =  postData + "&portfolioId=101"
			 postData =  postData + "&merchantId="
			 postData =  postData + "&feeTemplateId=254785"
			 postData =  postData + "&distributionSchemaCode="
			 postData =  postData + "&processingConfigurationScript=sandbox"
			 postData =  postData + "&applicationCode=100001"
			 postData =  postData + "&isEmbedded=1"
			 postData =  postData + "&pageFormat=OBDA"
			 postData =  postData + "¬ifyURL=https://myNotifyURL.com"
			 postData =  postData + "&cancelURL=http://myCancelURL.com"
			 postData =  postData + "&returnURL=http://myReturnURL.com"
			 postData =  postData + "&returnURLPolicy=page"
			 postData =  postData + "¬ificationPolicy=X"
			 postData =  postData + "&owner.firstName=Tony"
			 postData =  postData + "&owner.lastName=Stark"
			 postData =  postData + "&owner.email=tony@ziftpay.com"
			 postData =  postData + "&owner.street1=10880 Malibu Point"
			 postData =  postData + "&owner.street2="
			 postData =  postData + "&owner.city=Los Angeles"
			 postData =  postData + "&owner.state=CA"
			 postData =  postData + "&owner.zipCode=95660"
			 postData =  postData + "&owner.countryCode=US"
			 postData =  postData + "&owner.birthDate=19670210"
			 postData =  postData + "&owner.socialSecurity=369258741"
			 postData =  postData + "&owner.phone=5551234567"
			 postData =  postData + "&business.businessName=Stark Labs"
			 postData =  postData + "&business.legalName=Stark Industries"
			 postData =  postData + "&business.ownershipStructureType=C"
			 postData =  postData + "&business.street1=34th Street Stark Tower"
			 postData =  postData + "&business.street2="
			 postData =  postData + "&business.city=New York"
			 postData =  postData + "&business.state=NY"
			 postData =  postData + "&business.zipCode=10025"
			 postData =  postData + "&business.countryCode=US"
			 postData =  postData + "&business.descriptorPhone=5551234567"
			 postData =  postData + "&business.paymentCardDescriptor=starkind-1234567890"
			 postData =  postData + "&business.directDebitDescriptor=starkind:1234567890"
			 postData =  postData + "&business.taxId=741852369"
			 postData =  postData + "&business.webSite=http://stark.ziftpay.com"
			 postData =  postData + "&business.email=tony@ziftpay.com"
			 postData =  postData + "&business.description=Aerospace things and really cool stuff"
			 postData =  postData + "&business.merchantCategoryCode=7399"
			 postData =  postData + "&business.currencyCode=USD"
			 postData =  postData + "&business.contactPhone=1234567890"
			 postData =  postData + "&business.driverLicense="
			 postData =  postData + "&business.driverLicenseCountryCode="
			 postData =  postData + "&business.driverLicenseState="
			 postData =  postData + "&business.registrationCountryCode="
			 postData =  postData + "&business.registrationState="
			 postData =  postData + "&business.registrationYear="
			 postData =  postData + "&business.workHours="
			 postData =  postData + "&business.timeZoneCode="
			 postData =  postData + "&business.relationshipBeginDate="
			 postData =  postData + "&estimates.annualDirectDebitVolume=1000000"
			 postData =  postData + "&estimates.annualCardsVolume=1000000"
			 postData =  postData + "&estimates.avgDirectDebitTransactionAmount=400000"
			 postData =  postData + "&estimates.avgCardsTransactionAmount=600000"
			 postData =  postData + "&estimates.maxTransactionAmount=500000"
			 postData =  postData + "&deposit.bankName=Stark Bank"
			 postData =  postData + "&deposit.holderName=Tony Stark"
			 postData =  postData + "&deposit.routingNumber=324377516"
			 postData =  postData + "&deposit.accountNumber=1234567980"
			 postData =  postData + "&deposit.accountType=C"


         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-manage.ziftpay.com/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'=>'myapiuser',
			'password'=>'myapipassword',
			'merchantType'=>'M',
			'merchantProfile'=>'SSSSM',
			'merchantCreationPolicy'=>'A',
			'profileId'=>'254558741',
			'resellerId'=>'216',
			'clientHost'=>'4.4.4.4',
			'portfolioId'=>'101',
			'merchantId'=>'',
			'feeTemplateId'=>'254785',
			'distributionSchemaCode'=>'',
			'processingConfigurationScript'=>'sandbox',
			'applicationCode'=>'100001',
			'isEmbedded'=>'1',
			'pageFormat'=>'OBDA',
			'notifyURL'=>'https://myNotifyURL.com',
			'cancelURL'=>'http://myCancelURL.com',
			'returnURL'=>'http://myReturnURL.com',
			'returnURLPolicy'=>'page',
			'notificationPolicy'=>'X',
			'owner.firstName'=>'Tony',
			'owner.lastName'=>'Stark',
			'owner.email'=>'tony@ziftpay.com',
			'owner.street1'=>'10880 Malibu Point',
			'owner.street2'=>'',
			'owner.city'=>'Los Angeles',
			'owner.state'=>'CA',
			'owner.zipCode'=>'95660',
			'owner.countryCode'=>'US',
			'owner.birthDate'=>'19670210',
			'owner.socialSecurity'=>'369258741',
			'owner.phone'=>'5551234567',
			'business.businessName'=>'Stark Labs',
			'business.legalName'=>'Stark Industries',
			'business.ownershipStructureType'=>'C',
			'business.street1'=>'34th Street Stark Tower',
			'business.street2'=>'',
			'business.city'=>'New York',
			'business.state'=>'NY',
			'business.zipCode'=>'10025',
			'business.countryCode'=>'US',
			'business.descriptorPhone'=>'5551234567',
			'business.paymentCardDescriptor'=>'starkind-1234567890',
			'business.directDebitDescriptor'=>'starkind:1234567890',
			'business.taxId'=>'741852369',
			'business.webSite'=>'http://stark.ziftpay.com',
			'business.email'=>'tony@ziftpay.com',
			'business.description'=>'Aerospace things and really cool stuff',
			'business.merchantCategoryCode'=>'7399',
			'business.currencyCode'=>'USD',
			'business.contactPhone'=>'1234567890',
			'business.driverLicense'=>'',
			'business.driverLicenseCountryCode'=>'',
			'business.driverLicenseState'=>'',
			'business.registrationCountryCode'=>'',
			'business.registrationState'=>'',
			'business.registrationYear'=>'',
			'business.workHours'=>'',
			'business.timeZoneCode'=>'',
			'business.relationshipBeginDate'=>'',
			'estimates.annualDirectDebitVolume'=>'1000000',
			'estimates.annualCardsVolume'=>'1000000',
			'estimates.avgDirectDebitTransactionAmount'=>'400000',
			'estimates.avgCardsTransactionAmount'=>'600000',
			'estimates.maxTransactionAmount'=>'500000',
			'deposit.bankName'=>'Stark Bank',
			'deposit.holderName'=>'Tony Stark',
			'deposit.routingNumber'=>'324377516',
			'deposit.accountNumber'=>'1234567980',
			'deposit.accountType'=>'C',


	              }
    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-manage.ziftpay.com/gates/onboarding?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'create',
			'userName':'myapiuser',
			'password':'myapipassword',
			'merchantType':'M',
			'merchantProfile':'SSSSM',
			'merchantCreationPolicy':'A',
			'profileId':'254558741',
			'resellerId':'216',
			'clientHost':'4.4.4.4',
			'portfolioId':'101',
			'merchantId':'',
			'feeTemplateId':'254785',
			'distributionSchemaCode':'',
			'processingConfigurationScript':'sandbox',
			'applicationCode':'100001',
			'isEmbedded':'1',
			'pageFormat':'OBDA',
			'notifyURL':'https://myNotifyURL.com',
			'cancelURL':'http://myCancelURL.com',
			'returnURL':'http://myReturnURL.com',
			'returnURLPolicy':'page',
			'notificationPolicy':'X',
			'owner.firstName':'Tony',
			'owner.lastName':'Stark',
			'owner.email':'tony@ziftpay.com',
			'owner.street1':'10880 Malibu Point',
			'owner.street2':'',
			'owner.city':'Los Angeles',
			'owner.state':'CA',
			'owner.zipCode':'95660',
			'owner.countryCode':'US',
			'owner.birthDate':'19670210',
			'owner.socialSecurity':'369258741',
			'owner.phone':'5551234567',
			'business.businessName':'Stark Labs',
			'business.legalName':'Stark Industries',
			'business.ownershipStructureType':'C',
			'business.street1':'34th Street Stark Tower',
			'business.street2':'',
			'business.city':'New York',
			'business.state':'NY',
			'business.zipCode':'10025',
			'business.countryCode':'US',
			'business.descriptorPhone':'5551234567',
			'business.paymentCardDescriptor':'starkind-1234567890',
			'business.directDebitDescriptor':'starkind:1234567890',
			'business.taxId':'741852369',
			'business.webSite':'http://stark.ziftpay.com',
			'business.email':'tony@ziftpay.com',
			'business.description':'Aerospace things and really cool stuff',
			'business.merchantCategoryCode':'7399',
			'business.currencyCode':'USD',
			'business.contactPhone':'1234567890',
			'business.driverLicense':'',
			'business.driverLicenseCountryCode':'',
			'business.driverLicenseState':'',
			'business.registrationCountryCode':'',
			'business.registrationState':'',
			'business.registrationYear':'',
			'business.workHours':'',
			'business.timeZoneCode':'',
			'business.relationshipBeginDate':'',
			'estimates.annualDirectDebitVolume':'1000000',
			'estimates.annualCardsVolume':'1000000',
			'estimates.avgDirectDebitTransactionAmount':'400000',
			'estimates.avgCardsTransactionAmount':'600000',
			'estimates.maxTransactionAmount':'500000',
			'deposit.bankName':'Stark Bank',
			'deposit.holderName':'Tony Stark',
			'deposit.routingNumber':'324377516',
			'deposit.accountNumber':'1234567980',
			'deposit.accountType':'C'


         }
    }

    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-manage.ziftpay.com/gates/onboarding?',
       [
			requestType=>'create',
			userName=>'myapiuser',
			password=>'myapipassword',
			merchantType=>'M',
			merchantProfile=>'SSSSM',
			merchantCreationPolicy=>'A',
			profileId=>'254558741',
			resellerId=>'216',
			clientHost=>'4.4.4.4',
			portfolioId=>'101',
			merchantId=>'',
			feeTemplateId=>'254785',
			distributionSchemaCode=>'',
			processingConfigurationScript=>'sandbox',
			applicationCode=>'100001',
			isEmbedded=>'1',
			pageFormat=>'OBDA',
			notifyURL=>'https://myNotifyURL.com',
			cancelURL=>'http://myCancelURL.com',
			returnURL=>'http://myReturnURL.com',
			returnURLPolicy=>'page',
			notificationPolicy=>'X',
			owner.firstName=>'Tony',
			owner.lastName=>'Stark',
			owner.email=>'tony@ziftpay.com',
			owner.street1=>'10880 Malibu Point',
			owner.street2=>'',
			owner.city=>'Los Angeles',
			owner.state=>'CA',
			owner.zipCode=>'95660',
			owner.countryCode=>'US',
			owner.birthDate=>'19670210',
			owner.socialSecurity=>'369258741',
			owner.phone=>'5551234567',
			business.businessName=>'Stark Labs',
			business.legalName=>'Stark Industries',
			business.ownershipStructureType=>'C',
			business.street1=>'34th Street Stark Tower',
			business.street2=>'',
			business.city=>'New York',
			business.state=>'NY',
			business.zipCode=>'10025',
			business.countryCode=>'US',
			business.descriptorPhone=>'5551234567',
			business.paymentCardDescriptor=>'starkind-1234567890',
			business.directDebitDescriptor=>'starkind:1234567890',
			business.taxId=>'741852369',
			business.webSite=>'http://stark.ziftpay.com',
			business.email=>'tony@ziftpay.com',
			business.description=>'Aerospace things and really cool stuff',
			business.merchantCategoryCode=>'7399',
			business.currencyCode=>'USD',
			business.contactPhone=>'1234567890',
			business.driverLicense=>'',
			business.driverLicenseCountryCode=>'',
			business.driverLicenseState=>'',
			business.registrationCountryCode=>'',
			business.registrationState=>'',
			business.registrationYear=>'',
			business.workHours=>'',
			business.timeZoneCode=>'',
			business.relationshipBeginDate=>'',
			estimates.annualDirectDebitVolume=>'1000000',
			estimates.annualCardsVolume=>'1000000',
			estimates.avgDirectDebitTransactionAmount=>'400000',
			estimates.avgCardsTransactionAmount=>'600000',
			estimates.maxTransactionAmount=>'500000',
			deposit.bankName=>'Stark Bank',
			deposit.holderName=>'Tony Stark',
			deposit.routingNumber=>'324377516',
			deposit.accountNumber=>'1234567980',
			deposit.accountType=>'C'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = '
https://sandbox-manage.ziftpay.com/gates/onboarding?'
	    values = {
			'requestType':'create',
			'userName':'myapiuser',
			'password':'myapipassword',
			'merchantType':'M',
			'merchantProfile':'SSSSM',
			'merchantCreationPolicy':'A',
			'profileId':'254558741',
			'resellerId':'216',
			'clientHost':'4.4.4.4',
			'portfolioId':'101',
			'merchantId':'',
			'feeTemplateId':'254785',
			'distributionSchemaCode':'',
			'processingConfigurationScript':'sandbox',
			'applicationCode':'100001',
			'isEmbedded':'1',
			'pageFormat':'OBDA',
			'notifyURL':'https://myNotifyURL.com',
			'cancelURL':'http://myCancelURL.com',
			'returnURL':'http://myReturnURL.com',
			'returnURLPolicy':'page',
			'notificationPolicy':'X',
			'owner.firstName':'Tony',
			'owner.lastName':'Stark',
			'owner.email':'tony@ziftpay.com',
			'owner.street1':'10880 Malibu Point',
			'owner.street2':'',
			'owner.city':'Los Angeles',
			'owner.state':'CA',
			'owner.zipCode':'95660',
			'owner.countryCode':'US',
			'owner.birthDate':'19670210',
			'owner.socialSecurity':'369258741',
			'owner.phone':'5551234567',
			'business.businessName':'Stark Labs',
			'business.legalName':'Stark Industries',
			'business.ownershipStructureType':'C',
			'business.street1':'34th Street Stark Tower',
			'business.street2':'',
			'business.city':'New York',
			'business.state':'NY',
			'business.zipCode':'10025',
			'business.countryCode':'US',
			'business.descriptorPhone':'5551234567',
			'business.paymentCardDescriptor':'starkind-1234567890',
			'business.directDebitDescriptor':'starkind:1234567890',
			'business.taxId':'741852369',
			'business.webSite':'http://stark.ziftpay.com',
			'business.email':'tony@ziftpay.com',
			'business.description':'Aerospace things and really cool stuff',
			'business.merchantCategoryCode':'7399',
			'business.currencyCode':'USD',
			'business.contactPhone':'1234567890',
			'business.driverLicense':'',
			'business.driverLicenseCountryCode':'',
			'business.driverLicenseState':'',
			'business.registrationCountryCode':'',
			'business.registrationState':'',
			'business.registrationYear':'',
			'business.workHours':'',
			'business.timeZoneCode':'',
			'business.relationshipBeginDate':'',
			'estimates.annualDirectDebitVolume':'1000000',
			'estimates.annualCardsVolume':'1000000',
			'estimates.avgDirectDebitTransactionAmount':'400000',
			'estimates.avgCardsTransactionAmount':'600000',
			'estimates.maxTransactionAmount':'500000',
			'deposit.bankName':'Stark Bank',
			'deposit.holderName':'Tony Stark',
			'deposit.routingNumber':'324377516',
			'deposit.accountNumber':'1234567980',
			'deposit.accountType':'C'


      }

    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
responseTypecreateIndicates the type of response.
applicationCodeString (20)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.
applicationIdLongUnique 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.
merchantIdIntegerAssociates the merchant application to a Zift merchant. When present in the request this field is sent back in the response via the notify URL.
accountIdIntegerRepresents 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.
cardsDescriptorString (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.
directDebitDescriptorString (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.
responseCodeString (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
requestTypeget-statusRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
applicationIdLongRequired
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.
https://sandbox-manage.ziftpay.com/gates/onboarding?requestType=get-status&userName=myusername&password=mypassword&applicationId=123456
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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-manage.ziftpay.com/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
responseTypeget-statusIndicates the type of response.
applicationIdLongUnique 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.
merchantIdIntegerThis 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.
accountIdIntegerRepresents 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.
cardsDescriptorString (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.
directDebitDescriptorString (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.
responseCodeString (5)Response code returned for the transaction. See response codes for more information.
responseMessage String (255)Application status for the specified applicationId.

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
requestTypepingRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=ping&userName=myUsername&password=myP%40ssword
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypepingIndicates the type of response.
implementationVersionString (50)Current implementation version of the application.
specificationVersionString (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
requestTypebank-dataRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
accountAccessoryString (10)Required
Bank routing number.
https://sandbox-secure.ziftpay.com/gates/xurl?requestType=bank-data&userName=myUsername&password=myP%40ssword&accountId=2001&terminalId=001&accountAccessory=021000021
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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.ziftpay.com/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
responseTypebank-dataIndicates the type of response.
accountIdString (12)Indicates the accountId
routingNumberString (10)Bank routing number used in the request.
bankNameString (100)Name of the bank.
servicingFRBNumberIntegerServicing routing number of the federal reserve bank's main office.
countryCodeString (2)Country of the bank.
stateString (2)The state of the bank.
zipCodeString (15)The zip code of the bank.
cityString (50)The city of the bank.
streetString (128)The street address of the bank.
officeCodeString (1)Code of the bank's office.
phoneNumberString (20)Phone number of the bank.

Upload Resource

requestType=upload-resource

There are situations where it may be necessary to upload additional transaction data to Zift. Usually it happens automatically with the initial transaction, however, in some cases you may need to upload the data manually in which case you can use the upload-resource operation.

The following resources can be uploaded to the system:

  • Email of a card or bank account holder to receive transaction receipts. The email address can be uploaded using the receiptEmail field.
Name Value or Format Description
requestTypeupload-resourceRequired
Specifies the type of operation to be performed.
userNameString (50)Required
Name of a user that initiates the API call.
passwordString (32)Required
Password of a user that initiates the API call.
accountIdString (12)Required
Specifies which merchant account to use with this API call. Your API credentials may be associated with more than one accountId
userCodeString (60)Identifier of a user supplied by a submitter that initiates the API call.
transactionCodeString (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.

transactionInternalCodeString (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.
transactionIdLongRequired
Unique identifier of the transaction within Zift. Always present in the response.
receiptModeGRequired
Value identifying how the transaction receipt is delivered to the customer. Receipt is sent to the customer via e-mail.
receiptEmailString (100)Required
Email of a card or bank account holder.
Upload Resource Conditions

Field Usage
transactionId Required
transactionCode Not required
transactionInternalCode Not required

Field Usage
transactionId Not required
transactionCode Required
transactionInternalCode Not required

Field Usage
transactionId Not required
transactionCode Not required
transactionInternalCode Required

https://sandbox-secure.ziftpay.com/gates/xurl?requestType=upload-resource&userName=myUsername&password=myP%40ssword&accountId=2001&terminalId=001&content=4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA&transactionId=123456&receiptMode=N
//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-secure.ziftpay.com/gates/xurl? \
	-d "requestType=upload-resource"  \
	-d "userName=myUsername"  \
	-d "password=myP%40ssword"  \
	-d "accountId=2001"  \
	-d "terminalId=001"  \
	-d "content=4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA"  \
	-d "transactionId=123456"  \
	-d "receiptMode=N"  \

 
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.ziftpay.com/gates/xurl?", 
 			 "&requestType=upload-resource"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&terminalId=001"
			+ "&content=4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA"
			+ "&transactionId=123456"
			+ "&receiptMode=N"
       
        ));
 
    }              
    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.ziftpay.com/gates/xurl?';
    $data = array(
			'requestType'=>'upload-resource',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'terminalId'=>'001',
			'content'=>'4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA',
			'transactionId'=>'123456',
			'receiptMode'=>'N',

        );
 
    $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.ziftpay.com/gates/xurl?",

			 "requestType=upload-resource"
			+ "&userName=myUsername"
			+ "&password=myP%40ssword"
			+ "&accountId=2001"
			+ "&terminalId=001"
			+ "&content=4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA"
			+ "&transactionId=123456"
			+ "&receiptMode=N"

                ));
        }

	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.ziftpay.com/gates/xurl?")
         request.Method = "POST"
         Dim postData As String
			 postData = "requestType=upload-resource"
			 postData =  postData + "&userName=myUsername"
			 postData =  postData + "&password=myP%40ssword"
			 postData =  postData + "&accountId=2001"
			 postData =  postData + "&terminalId=001"
			 postData =  postData + "&content=4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA"
			 postData =  postData + "&transactionId=123456"
			 postData =  postData + "&receiptMode=N"


         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.ziftpay.com/gates/xurl?")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    post_params = {
			'requestType'=>'upload-resource',
			'userName'=>'myUsername',
			'password'=>'myP%40ssword',
			'accountId'=>'2001',
			'terminalId'=>'001',
			'content'=>'4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA',
			'transactionId'=>'123456',
			'receiptMode'=>'N',


	              }
    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.ziftpay.com/gates/xurl?',
    method: 'POST',
    headers: headers,
    form: {
			'requestType':'upload-resource',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'terminalId':'001',
			'content':'4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA',
			'transactionId':'123456',
			'receiptMode':'N'


         }
    }

    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.ziftpay.com/gates/xurl?',
       [
			requestType=>'upload-resource',
			userName=>'myUsername',
			password=>'myP%40ssword',
			accountId=>'2001',
			terminalId=>'001',
			content=>'4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA',
			transactionId=>'123456',
			receiptMode=>'N'


      ],
    );
    print $req->content;
                    
     #More examples this https://docs.python.org/3/howto/urllib2.html
     import urllib.parse
     import urllib.request
	    url = 'https://sandbox-secure.ziftpay.com/gates/xurl?'
	    values = {
			'requestType':'upload-resource',
			'userName':'myUsername',
			'password':'myP%40ssword',
			'accountId':'2001',
			'terminalId':'001',
			'content':'4QAuRXhpZgAATU0AKgAAAAgAAgEAAAMAA2wBDAAUEBAQEAwUEBA',
			'transactionId':'123456',
			'receiptMode':'N'


      }

    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
responseTypeupload-resourceIndicates the type of response.
accountIdString (12)Indicates the accountId
terminalIdString (32)Reference to a terminal associated with the API call. See integration notes for more information.Note: If the field's value contains special characters (&, ?, =, etc), it must be URL-encoded.
transactionIdLongUnique identifier of the transaction within Zift. Always present in the response.
transactionCodeString (60)An identifier of the transaction from an external system. If present in the request it will be returned in the response.
transactionResourceCodeLongIdentifier assigned to the newly uploaded resource.

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.

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 malformatted 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 Unattempted 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 Speified 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 ocurred 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 (occures 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 cancelation; 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 prenotification 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:
  • minimum amount required by receiver has not been remitted;
  • exact amount required has not been remitted;
  • the account is subject to litigation and the receiver will not accept the transaction;
  • acceptance of the transaction results in an overpayment;
  • the originator is not known by the receiver;
  • the receiver has not authorized this credit entry to this account.
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 (nonconsumer) 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 commercial 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 Misrouted 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 Misrouted Dishonored Return ODFI misrouted 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:
  • invalid DFI/bank branch country code;
  • invalid DFI/bank identification number qualifier;
  • invalid foreign exchange indicator;
  • invalid ISO originating currency code;
  • invalid ISO destination currency code;
  • invalid ISO destination country code;
  • invalid transaction type value.
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 malformatted.
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 malformatted.
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 malformatted.
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 malformatted.
C61 Misrouted Notification of Change Notification of change has been refused due to misrouting.
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 malformatted 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 Succesfull 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.