Processing Methods

Deposit - Customer

This section describes the parameters required to perform a deposit a customer's bank account.

To implement this method:

  1. The merchant securely obtains all the information needed to start a transaction;
  2. The merchant then initiates a HTTPS POST method to the Intrapay endpoint URL with all the necessary information (sent as url-encoded key-value pairs);
    URL: payment.intrapay.com/deposit/customer
  3. The system will respond back to the Merchant with the result of the transaction;
  4. The Merchant shows the result of the transaction to the end user.

Deposit - Customer Fields

Order (pSign)Field NameDetailsMinMaxTypeRequired
01merchantIDMerchant id supplied by Intrapay18NumberYes
02amountThe purchase amount (ex. 1.99)112DecimalYes
03currencyThe purchase currency (ISO 4217)33StringYes
04orderIDThe unique Merchant Order ID164StringYes
05notifyURLMerchant URL for server to server asynchronous notifications1300StringNo
06customerIPCustomer's IP (IPv4 only)750StringYes
07customerForwardedIPCustomer's IP forwarded by proxies (IPv4 only)750StringNo
08customerEmailCustomer's email address1120StringYes
09customerPhoneCustomer's telephone number716StringYes
10customerFirstNameCustomer's first name1128StringYes
11customerLastNameCustomer's last name1128StringYes
12customerAddress1Customer's address line 11128StringYes
13customerAddress2Customer's address line 21128StringNo
14customerCityCustomer's city name1128StringYes
15customerZipCodeCustomer's zip / postal code116StringYes
16customerStateProvinceCustomer's state / province1128StringNo*
17customerCountryCustomer's country code (ISO 3166-2)22StringYes
18customerDobCustomer's date of birth (yyyy-mm-dd)1010StringNo*
19customerIdCustomer's identification number130NumberNo*
20bankCodeCustomer's bank code164StringYes
21bankBranchCustomer's bank branch code145StringNo*
22bankAccountNumberCustomer's bank account number145StringNo*
23custom1Additional bank required field164StringNo*
24custom2Additional bank required field164StringNo*
25custom3Additional bank required field164StringNo*
26descriptionTransaction or Product short description164StringNo
27pSignThe SHA signature used to secure protocol4040StringYes

* Please note that some Gateways / Banks do not support/use these parameters, or may consider them as mandatory! Our technical team will specify if any of these are required/supported.


Example Deposit - Customer Request:

[POST URL] https://payment.intrapay.com/deposit/customer

[POST PARAMS]

<?php
    	
require_once("classes/Api.php");
    	
$endPointUrl = "https://payment.intrapay.com/deposit/customer";	// api name to be process
$passCode = "PASSCODE_GOES_HERE"; //your pass Code

$postData["merchantID"] = "MERCHANT_ID_GOES_HERE"; //your merchant ID
$postData["amount"] = "2.11";
$postData["orderID"] = rand (100000,999999); //unique order ID
$postData["notifyURL"] = "http://mysite.com/notify";
$postData["customerIP"] = "188.26.48.48";
$postData["customerForwardedIP"] = "";
$postData["customerEmail"] = "test@test.com";
$postData["customerPhone"] = "8008828181";
$postData["customerFirstName"] = "John";
$postData["customerLastName"] = "Doe";
$postData["customerAddress1"] = "Address St 1";
$postData["customerAddress2"] = "Address St 2";
$postData["customerCity"] = "Los Angeles City";
$postData["customerZipCode"] = "92929";
$postData["customerStateProvince"] = "CA";
$postData["customerCountry"] = "US";
$postData["customerDob"] = "2010-10-12";
$postData["customerId"] = "YOUR_CUSTOMER_ID"; //your unique customer id
$postData["bankCode"] = "BANKCODE";
$postData["bankBranch"] = "";
$postData["bankAccountNumber"] = "123456789012345678901234567890";
$postData["custom1"] = "";
$postData["custom2"] = "";
$postData["custom3"] = "";
$postData["description"] = "";

try {
	$api = new Api();
   
	$data = $api->generatePsign( $passCode, $postData );
   
	echo $api->apiCurlRequest( $data , $endPointUrl);
   
} catch (Exception $e) {
	echo "Caught exception: ",  $e->getMessage(), "\n";
}
   
?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" %>
<%@ page import="java.net.*, java.util.*, com.intrapay.util.*" %>
<%
	String endPointUrl = "https://payment.intrapay.com/deposit/customer";
	String passCode = "PASSCODE_GOES_HERE"; //your pass Code
	String merchantID = "MERCHANT_ID_GOES_HERE"; //your merchant ID
	String amount = "2.11";
	String orderID = new Random().nextInt(999999) + ""; // unique order ID
	String notifyURL = "http://mysite.com/notify";
	String customerIP = "188.26.48.48";
	String customerForwardedIP = "";
	String customerEmail = "test@test.com";
	String customerPhone = "8008828181";
	String customerFirstName = "John";
	String customerLastName = "Doe";
	String customerAddress1 = "Address St 1";
	String customerAddress2 = "Address St 2";
	String customerCity = "Los Angeles City";
	String customerZipCode = "92929";
	String customerStateProvince = "CA";
	String customerCountry = "US";
	String customerDob = "2010-10-12";
	String customerId = "YOUR_CUSTOMER_ID"; //your unique customer id
	String bankCode = "BANKCODE";
	String bankBranch = "";
	String bankAccountNumber = "123456789012345678901234567890";
	String custom1 = "";
	String custom2 = "";
	String custom3 = "";
	String description = "";

	String pSign = PSignUtil.generatePSign(passCode + merchantID + amount + orderID + notifyURL + customerIP + 
		customerForwardedIP + customerEmail + customerPhone + customerFirstName + customerLastName + 
		customerAddress1 + customerAddress2 + customerCity + customerZipCode + customerStateProvince + 
		customerCountry + customerDob + customerId + bankCode + bankBranch + 
		bankAccountNumber + custom1 + custom2 + custom3 + description);
		
	String and = "&";
	StringBuffer requestData = new StringBuffer();

	requestData.append("merchantID=" + merchantID);
	requestData.append(and + "amount=" + amount);
	requestData.append(and + "orderID=" + orderID);
	requestData.append(and + "notifyURL=" + URLEncoder.encode(notifyURL, "UTF-8"));
	requestData.append(and + "customerIP=" + customerIP);
	requestData.append(and + "customerForwardedIP=" + customerForwardedIP);
	requestData.append(and + "customerEmail=" + customerEmail);
	requestData.append(and + "customerPhone=" + customerPhone);
	requestData.append(and + "customerFirstName=" + customerFirstName);
	requestData.append(and + "customerLastName=" + customerLastName);
	requestData.append(and + "customerAddress1=" + customerAddress1);
	requestData.append(and + "customerAddress2=" + customerAddress2);
	requestData.append(and + "customerCity=" + customerCity);
	requestData.append(and + "customerZipCode=" + customerZipCode);
	requestData.append(and + "customerStateProvince=" + customerStateProvince);
	requestData.append(and + "customerCountry=" + customerCountry);
	requestData.append(and + "customerDob=" + customerDob);
	requestData.append(and + "customerId=" + customerId);
	requestData.append(and + "bankCode=" + bankCode);
	requestData.append(and + "bankBranch=" + bankBranch);
	requestData.append(and + "bankAccountNumber=" + bankAccountNumber);
	requestData.append(and + "custom1=" + custom1);
	requestData.append(and + "custom2=" + custom2);
	requestData.append(and + "custom3=" + custom3);
	requestData.append(and + "description=" + description);
	requestData.append(and + "pSign=" + pSign);

	String result = ServerPost.post(requestData.toString(), endPointUrl);
%>
<%=result%>
var request = require('request');
var querystring = require('querystring');

/*
 * 
 * Merchant's Data Variables.
 * 
 */
var postUrl = 'https://payment.intrapay.com/deposit/customer'; //api name to be process
var passCode = 'PASSCODE_GOES_HERE'; //your pass Code
var merchantID = 'MERCHANT_ID_GOES_HERE'; //your merchant ID
var amount = '2.11';
var orderID = Date.now(); // unique order ID
var notifyURL = 'http://mysite.com/notify';
var customerIP = '188.26.48.48';
var customerForwardedIP = '';
var customerEmail = 'test@test.com';
var customerPhone = '8008828181';
var customerFirstName = 'John';
var customerLastName = 'Doe';
var customerAddress1 = 'Address St 1';
var customerAddress2 = 'Address St 2';
var customerCity = 'Los Angeles City';
var customerZipCode = '92929';
var customerStateProvince = 'CA';
var customerCountry = 'US';
var customerDob = '2010-10-12';
var customerId = 'YOUR_CUSTOMER_ID'; //your unique customer id
var bankCode = 'BANKCODE';
var bankBranch = '';
var bankAccountNumber = '123456789012345678901234567890';
var custom1 = '';
var custom2 = '';
var custom3 = '';
var description = '';

/*
*
* Generate pSign
*
*/
var crypto = require('crypto'), shasum = crypto.createHash('sha1');

shasum.update(passCode + merchantID + amount + orderID + notifyURL + customerIP + 
		customerForwardedIP + customerEmail + customerPhone + customerFirstName + customerLastName + 
		customerAddress1 + customerAddress2 + customerCity + customerZipCode + customerStateProvince + 
		customerCountry + customerDob + customerId + bankCode + bankBranch + 
		bankAccountNumber + custom1 + custom2 + custom3 + description);
		
var pSign = shasum.digest('hex');

/*
*
* Ready HTTP Post with url-encoded data
*
*/

var data = {
		'passCode' : passCode,
		'merchantID' : merchantID,
		'amount' : amount,
		'orderID' : orderID,
		'notifyURL' : notifyURL,
		'customerIP' : customerIP,
		'customerForwardedIP' : customerForwardedIP,
		'customerEmail' : customerEmail,
		'customerPhone' : customerPhone,
		'customerFirstName' : customerFirstName,
		'customerLastName' : customerLastName,
		'customerAddress1' : customerAddress1,
		'customerAddress2' : customerAddress2,
		'customerCity' : customerCity,
		'customerZipCode' : customerZipCode,
		'customerStateProvince' : customerStateProvince,
		'customerCountry' : customerCountry,
		'customerDob' : customerDob,
		'customerId' : customerId,
		'bankCode' : bankCode,
		'bankBranch' : bankBranch,
		'bankAccountNumber' : bankAccountNumber,
		'custom1' : custom1,
		'custom2' : custom2,
		'custom3' : custom3,
		'description' : description,
};

var formData = querystring.stringify(data);
var contentLength = formData.length;
var headers = {
    "Content-Length" : contentLength,
    "Content-Type" : "application/x-www-form-urlencoded",
}

var options = {
    url : postUrl,
    method : "POST",
    headers : headers,
    body : formData,
}

request(options, function(err, res, body) {
    if (res && (res.statusCode === 200 || res.statusCode === 201)) {
        // return result
        console.log(body);
    }
});
require 'time'
require_relative 'classes/API'

api = API.new

postUrl = 'https://payment.intrapay.com/deposit/customer' #api name to be process
passCode = 'PASSCODE_GOES_HERE' #your pass Code
merchantID = 'MERCHANT_ID_GOES_HERE' #your merchant ID
amount = '2.11'
orderID = Time.now.to_i #unique order ID
notifyURL = 'http://mysite.com/notify'
customerIP = '188.26.48.48'
customerForwardedIP = ''
customerEmail = 'test@test.com'
customerPhone = '8008828181'
customerFirstName = 'John'
customerLastName = 'Doe'
customerAddress1 = 'Address St 1'
customerAddress2 = 'Address St 2'
customerCity = 'Los Angeles City'
customerZipCode = '92929'
customerStateProvince = 'CA'
customerCountry = 'US'
customerDob = '2010-10-12'
customerId = 'YOUR_CUSTOMER_ID' #your unique customer id
bankCode = 'BANKCODE'
bankBranch = ''
bankAccountNumber = '123456789012345678901234567890'
custom1 = ''
custom2 = ''
custom3 = ''
description = ''

postData = Hash[
	'merchantID' => merchantID,
	'amount' => amount,
	'orderID' => orderID,
	'notifyURL' => notifyURL,
	'customerIP' => customerIP,
	'customerForwardedIP' => customerForwardedIP,
	'customerEmail' => customerEmail,
	'customerPhone' => customerPhone,
	'customerFirstName' => customerFirstName,
	'customerLastName' => customerLastName,
	'customerAddress1' => customerAddress1,
	'customerAddress2' => customerAddress2,
	'customerCity' => customerCity,
	'customerZipCode' => customerZipCode,
	'customerStateProvince' => customerStateProvince,
	'customerCountry' => customerCountry,
	'customerDob' => customerDob,
	'customerId' => customerId,
	'bankCode' => bankCode,
	'bankBranch' => bankBranch,
	'bankAccountNumber' => bankAccountNumber,
	'custom1' => custom1,
	'custom2' => custom2,
	'custom3' => custom3,
	'description' => description
]

postData['pSign'] = api.generatePsign(passCode, postData)

puts api.apiPostRequest(postData, postUrl)
<%@ Page Language="C#" %>
<%@ Import Namespace="Intrapay.Api.Util" %> 
<%
	String endPointUrl = "https://payment.intrapay.com/deposit/customer";
	String passCode = "PASSCODE_GOES_HERE"; //your pass Code
	String merchantID = "MERCHANT_ID_GOES_HERE"; //your merchant ID
	String amount = "2.11";
	String orderID = new Random().Next(1, 999999).ToString(); //unique order ID
	String notifyURL = "http://mysite.com/notify";
	String customerIP = "188.26.48.48";
	String customerForwardedIP = "";
	String customerEmail = "test@test.com";
	String customerPhone = "8008828181";
	String customerFirstName = "John";
	String customerLastName = "Doe";
	String customerAddress1 = "Address St 1";
	String customerAddress2 = "Address St 2";
	String customerCity = "Los Angeles City";
	String customerZipCode = "92929";
	String customerStateProvince = "CA";
	String customerCountry = "US";
	String customerDob = "2010-10-12";
	String customerId = "YOUR_CUSTOMER_ID"; //your unique customer id
	String bankCode = "BANKCODE";
	String bankBranch = "";
	String bankAccountNumber = "123456789012345678901234567890";
	String custom1 = "";
	String custom2 = "";
	String custom3 = "";
	String description = "";

	String pSign = PSignUtil.GeneratePSign(passCode + merchantID + amount + orderID + notifyURL + customerIP + 
		customerForwardedIP + customerEmail + customerPhone + customerFirstName + customerLastName + 
		customerAddress1 + customerAddress2 + customerCity + customerZipCode + customerStateProvince + 
		customerCountry + customerDob + customerId + bankCode + bankBranch + 
		bankAccountNumber + custom1 + custom2 + custom3 + description);
		
	String and = "&";
	StringBuilder requestData = new StringBuilder();

	requestData.Append("merchantID=" + merchantID);
	requestData.Append(and + "amount=" + amount);
	requestData.Append(and + "orderID=" + orderID);
	requestData.Append(and + "notifyURL=" + HttpUtility.UrlEncode(notifyURL));
	requestData.Append(and + "customerIP=" + customerIP);
	requestData.Append(and + "customerForwardedIP=" + customerForwardedIP);
	requestData.Append(and + "customerEmail=" + customerEmail);
	requestData.Append(and + "customerPhone=" + customerPhone);
	requestData.Append(and + "customerFirstName=" + customerFirstName);
	requestData.Append(and + "customerLastName=" + customerLastName);
	requestData.Append(and + "customerAddress1=" + customerAddress1);
	requestData.Append(and + "customerAddress2=" + customerAddress2);
	requestData.Append(and + "customerCity=" + customerCity);
	requestData.Append(and + "customerZipCode=" + customerZipCode);
	requestData.Append(and + "customerStateProvince=" + customerStateProvince);
	requestData.Append(and + "customerCountry=" + customerCountry);
	requestData.Append(and + "customerDob=" + customerDob);
	requestData.Append(and + "customerId=" + customerId);
	requestData.Append(and + "bankCode=" + bankCode);
	requestData.Append(and + "bankBranch=" + bankBranch);
	requestData.Append(and + "bankAccountNumber=" + bankAccountNumber);
	requestData.Append(and + "custom1=" + custom1);
	requestData.Append(and + "custom2=" + custom2);
	requestData.Append(and + "custom3=" + custom3);
	requestData.Append(and + "description=" + description);
	requestData.Append(and + "pSign=" + pSign);

	String result = ServerPost.Post(requestData.ToString(), endPointUrl);
	Response.Write(result);
%>
from classes.API import API

import time

postUrl = 'https://payment.intrapay.com/deposit/customer' #api name to be process
passCode = 'PASSCODE_GOES_HERE' //your pass Code
merchantID = 'MERCHANT_ID_GOES_HERE' //your merchant ID
amount = '2.11'
orderID = time.time() #unique order ID
notifyURL = 'http://mysite.com/notify'
customerIP = '188.26.48.48'
customerForwardedIP = ''
customerEmail = 'test@test.com'
customerPhone = '8008828181'
customerFirstName = 'John'
customerLastName = 'Doe'
customerAddress1 = 'Address St 1'
customerAddress2 = 'Address St 2'
customerCity = 'Los Angeles City'
customerZipCode = '92929'
customerStateProvince = 'CA'
customerCountry = 'US'
customerDob = '2010-10-12'
customerId = 'YOUR_CUSTOMER_ID' //your unique customer id
bankCode = 'BANKCODE'
bankBranch = ''
bankAccountNumber = '123456789012345678901234567890'
custom1 = ''
custom2 = ''
custom3 = ''
description = ''

postData = {
	'passCode' => passCode,
	'merchantID' => merchantID,
	'amount' => amount,
	'orderID' => orderID,
	'notifyURL' => notifyURL,
	'customerIP' => customerIP,
	'customerForwardedIP' => customerForwardedIP,
	'customerEmail' => customerEmail,
	'customerPhone' => customerPhone,
	'customerFirstName' => customerFirstName,
	'customerLastName' => customerLastName,
	'customerAddress1' => customerAddress1,
	'customerAddress2' => customerAddress2,
	'customerCity' => customerCity,
	'customerZipCode' => customerZipCode,
	'customerStateProvince' => customerStateProvince,
	'customerCountry' => customerCountry,
	'customerDob' => customerDob,
	'customerId' => customerId,
	'bankCode' => bankCode,
	'bankBranch' => bankBranch,
	'bankAccountNumber' => bankAccountNumber,
	'custom1' => custom1,
	'custom2' => custom2,
	'custom3' => custom3,
	'description' => description
}

postData['pSign'] = API.generatePsign(passCode, postData)
print(API.apiPostRequest(postData, postUrl))

You will see the response here...