Latpay API

Introduction

The LatPay API provides a suite of solutions to manage the entire Checkout process along with transaction management. Our API has been built with security as its core and offers all features as required by both the back office operations team as well as ease of integration for your technical team.

By accessing the LatPay payment management engine through the API, you will be able to manage the entire cash flow from collection to payout. The LatPay platform also gives you the ability to process in over 140 currencies and settle in 26 major currencies, all in real time. The API is designed in such a way that a single unified model to integrate for card, alternate payment and bank transfer is possible. So high level of code reusability and quick integration is possible.

Our API integration is very simple. However, if you need to contact us for technical support, please e-mail us at techsupport@lpsmail.com. For sandbox access, please send email to techsupport@lpsmail.com. Signing up for the sandbox will give you access to a test MID through which you can check out live responses, make demo transactions and explore features.

Getting Started

Our documentation was designed to be easy to use. Our API calls are grouped by resources which you will see in the navigation menu on the left frame.

These are the base API URLs for the LATPAY environments:

Sandbox: <<<Endpoint provided on signup to test MID>>>

Production: <<<Endpoint provided on issue of live MID>>>

mediaType: application/json

Checkout

The Checkout API call will initialise an order in the Latpay system and begin the checkout process for the customer. The response will provide a unique transaction id, order id to acknowledge order acceptance and state of transaction. The response code indicates the type of response along with status and error codes to indicate the actual status and if rejected, the reason for rejection.

The Checkout API call includes a mandatory parameter “notifyurl” which must be populated to indicate the callback to notify the transaction status.

Card

The Checkout API is part of a unified API request to process authorisations. To use cards as payment mode, indicate the “billing” section with type set to “card” as shown the sample request.

Batch Authorisation

Latpay offers batch API to submit authorisation request in a batch. A batch can be upto 10k transactions. The process flow will be for each batch request, the API will validate the request and acknowledge receipt of batch with a batchid and status pending. Latpay enterprise Gateway will then sweep all pending batches and will notify the status of transactions in each batch in a callback notification.

Batch Submission

Request

Fields Type Mandatory
merchant_User_Id string Required
merchantpwd string Required
batchreference string Required
transaction[] Transaction Required
notifyurl string Optional
batch autorisation
{
"batchauthorisation":
    {
     "merchant_User_Id": "test_user",
     "merchantpwd": "v!@qst",
     "batchreference": "test01",
     "transaction":[
      {
        "consumer": 
           {
           "firstname": "Thirlok",
           "lastname": "Shankar",
           "phone": "1234567890",
           "email": "email@domain.com"
           },
        "billing":
           {
           "type": "card",
           "card":
                {
                    "name": "name on card",
                    "pan": "4200000000000000",
                    "exp": "12/25",
                    "cvc": "123"
                }
            "address" :
                 {
                   "line1" : "Southbank House",
                   "line2" : "",
                   "city" : "London",
                   "state" : "",
                   "country" : "GB",
                   "zipcode" : "SE1",
                  }
            },
        "order":
          {
          "reference": "lpstest123",
          "currency": "USD",
          "amount": "2.00"
          }
        },
       
        {
          "consumer": 
              {
               "firstname": "Ian",
               "lastname": "Vidamour",
               "phone": "1234567890",
               "email": "email@domain.com"
               },
           "billing":
             {
               "type": "card",
               "card":
                 {
                  "name": "name on card",
                  "pan": "4200000000000002",
                  "exp": "12/25",
                  "cvc": "345"
                 }
                "address" :
                 {
                   "line1" : "Southbank House",
                   "line2" : "",
                   "city" : "London",
                   "state" : "",
                   "country" : "GB",
                   "zipcode" : "SE1",
                   }
              },
            "order":
               {
                  "reference": "lpstest456",
                  "currency": "USD",
                  "amount": "5.00"
                }
              }
            ],
        notifyurl: "https://www.notifyurl.aspx"
     }
  }
Acknowledgement

Response

Field type response
batchid string required
batchcount numeric required
status Status required
Failure
Success
Error

Prescreen Failure

{
"response":
   {
     "batchid" : "123456",
     "batchcount": "10000",
     "status": 
      {
         "responsetype": "0",
         "statuscode": "1",
         "errorcode": "1001",
         "errordesc": "Authentication failed"
      }
    }
}

Batch Accepted

{
"response":
   {
    "batchid" : "123456",
    "batchcount": "10000",
    "status": 
      {
         "responsetype": "8",
         "statuscode": "2",
         "errorcode": "00",
         "errordesc": "Batch accepted for processing"
      }
 
    }
}

System Error

{
"response":
   {
     "batchid" : "123456",
     "batchcount": "10000",
     "status": 
      {
         "responsetype": "8",
         "statuscode": "1",
         "errorcode": "9000",
         "errordesc": "System Error"
      }
    }
}
Notification

Response

Field Type Mandatory
batchid string Required
batchcount numeric Required
batchreference string Required
transaction[] Transaction Required
Notification
{
 "batchauthorisation":
    {
      "batchid" : "123456",
      "batchcount": "10000",
      "batchreference": "ref123",
      "status": 
                {
                "responsetype": "4",
                "statuscode": "0",
                "errorcode": "00",
                "errordesc": "Batch processing completed"
                 }
      "transaction":[
           {
           "transactionid": "74580250",
           "consumer": 
                {
                "firstname": "Thirlok",
                "lastname": "Shankar",
                "phone": "1234567890",
                "email": "email@domain.com"
                },
           "billing":
                {
                "type": "card",
                "card":
                    {
                    "name": "name on card",
                    "pan": "420000XXXXXX0000",
                    "exp": "12/25",
                    "cvc": "XXX"
                    },
                 "address" : 
                   {
                    "line1" : "Southbank House",
                    "line2" : "",
                    "city" : "London",
                    "state" : "",
                    "country" : "GB",
                    "zipcode" : "SE1",
                    }
                },
           "order":
                {
                "reference": "lpstest123",
                "currency": "USD",
                "amount": "2.00"
                },
           "status": 
                {
                "responsetype": "1",
                "statuscode": "0",
                "errorcode": "00",
                "errordesc": "Transaction approved"
                 }
 
            },
        "transaction":
            {
               "transactionid": "74580251",
               "consumer": 
                  {
                   "firstname": "Ian",
                   "lastname": "Vidamour",
                   "phone": "1234567890",
                   "email": "email@domain.com"
                  },
               "billing":
                 {
                  "type": "card",
                  "card":
                      {
                       "name": "name on card",
                       "pan": "420000XXXXXX0002",
                       "exp": "12/25",
                       "cvc": "XXX"
                      },
                  "address" : 
                     {
                       "line1" : "Southbank House",
                       "line2" : "",
                       "city" : "London",
                       "state" : "",
                       "country" : "GB",
                       "zipcode" : "SE1",
                      }
                  },
               "order":
                   {
                     "reference": "lpstest456",
                     "currency": "USD",
                     "amount": "5.00"
                   },
               "status": 
                   {
                     "responsetype": "1",
                     "statuscode": "1",
                     "errorcode": "05",
                     "errordesc": "Do not honor"
                    }
                }
            ]
 
    }
  }
Batch Status Check
Request
Field Type Mandatory
merchant_User_Id string Required
merchantpwd string Required
batchreference string Required
batchcount numeric Required
batchid string Optional
Request
{
"batchauthorisation":
     {
        "merchant_User_Id": "test_user",
        "merchantpwd": "v!@qst",
        "batchreference": "test01",
        "batchcount": "10000",
        "batchid": "12345"
     }
}
Response
Field Type Mandatory
merchant_User_Id string Required
merchantpwd string Required
batchreference string Required
batchcount numeric Required
batchid string Optional
transaction[] Transaction Required
Failure
Success
Pending / Inprogress
Error

Prescreen Failure

{
"batchauthorisation":
     {
         "batchid" : "",
         "batchcount": "10000",
         "batchreference": "test01",
         "status": 
	     {
	       "responsetype": "0",
	       "statuscode": "1",
	       "errorcode": "2001",
	       "errordesc": "Invalid Batch Details"
	      }
    }
}

Batch Accepted

{
"batchauthorisation":
     {
         "batchid" : "123456",
         "batchcount": "10000",
         "batchreference": "test01",
         "status": 
              {
                "responsetype": "6",
                "statuscode": "0",
                "errorcode": "00",
                "errordesc": "Batch processing completed"
                }
         "transaction":[
              {
                "transactionid": "74580250",
                "consumer": 
                 {
                   "firstname": "Thirlok",
                   "lastname": "Shankar",
                   "phone": "1234567890",
                   "email": "email@domain.com"
                  },
                "billing":
                   {
                    "type": "card",
                    "card":
                        {
                          "name": "name on card",
                          "pan": "420000XXXXXX0000",
                          "exp": "12/25",
                          "cvc": "XXX"
                        },
                    "address" : 
                        {
                          "line1" : "Southbank House",
                          "line2" : "",
                          "city" : "London",
                          "state" : "",
                          "country" : "GB",
                          "zipcode" : "SE1",
                        }
                    },
                "order":
                   {
                      "reference": "lpstest123",
                      "currency": "USD",
                      "amount": "2.00"
                   },
                "status": 
                   {
                       "responsetype": "1",
                       "statuscode": "0",
                       "errorcode": "00",
                       "errordesc": "Transaction approved"
                    }
               },
              
               {
                "transactionid": "74580251",
                "consumer": 
                   {
                   "firstname": "Ian",
                   "lastname": "Vidamour",
                   "phone": "1234567890",
                   "email": "email@domain.com"
                   },
               "billing":
                 {
                   "type": "card",
                   "card":
                      {
                       "name": "name on card",
                       "pan": "420000XXXXXX0002",
                       "exp": "12/25",
                       "cvc": "XXX"
                       },
                   "address" : 
                     {
                      "line1" : "Southbank House",
                      "line2" : "",
                      "city" : "London",
                      "state" : "",
                      "country" : "GB",
                      "zipcode" : "SE1",
                     }
                 },
               "order":
                  {
                    "reference": "lpstest456",
                    "currency": "USD",
                    "amount": "5.00"
                   },
               "status": 
                  {
                    "responsetype": "1",
                    "statuscode": "1",
                    "errorcode": "05",
                    "errordesc": "Do not honor"
                   }
                }
            ]
 
     }
}
 

Batch Pending / Inprogress

{
"batchauthorisation":
	 {
	     "batchid" : "123456",
	     "batchcount": "10000",
	     "batchreference": "test01",
		 "status": 
		       {
		           "responsetype": "6",
		           "statuscode": "2",
		           "errorcode": "2003",
		           "errordesc": "Batch still in pending / Inprogress"
		         }
	   }
	}

System Error

{
	"batchauthorisation":
	     {
	         "batchid" : "123456",
	         "batchcount": "10000",
	         "batchreference": "test01",
		     "status": 
		                   {
		                       "responsetype": "6",
		                       "statuscode": "1",
		                       "errorcode": "9000",
		                       "errordesc": "System Error"
		                    }
	      }
	}
Embedded Form

The Embedded UI - Checkout (Card) is a two step process, first step to dynamically create a payment form to securely collect customer’s card details without handling sensitive data and a server side API call for confirmation of capture of checkout transactions.

1. Latpay Embedded Form - Checkout securely collects customer payment information and returns a card token dynamically during payment form submission. This token along with your other checkout details are then submitted to your server by the browser

2. The token generated is then used by your server side code to make an API call for the capture.

By capturing card details from the client side and tokenising the sensitive information, the card details never pass through your server. Hence the integration is fully PCI-compliant.


Account Registration

The first step will be to obtain a Latpay processing account enabled for Embedded UI - Checkout.Register Now.


Payment Form Creation

The next step is to securely collect card details. Embedded UI - Checkout creates UI components that are hosted in Latpay in your payment form, rather than you creating them directly.

Add this script tag in the head section of your Checkout HTML page:

<script src="https://lateralpayments.com/checkout/scripts/latpay2.js"></script>

This script should be loaded directly from https://lateralpayments.com

Authentication

Next, to authenticate the merchant account to enable binding of Checkout elements into the payment page. This is performed by calling the open() function on the Latpay Checkout script. This should be called on the Page Onload() event. The following Javascript code sample can be used as a template. The function provides an option to handle authentication failure for e.g. to alert website admins or write to log etc.

LatpayCheckout.open
({
merchantid: issued by latpay ,
publickey: issued by latpay,
'status': function (status) {}
//merchat can write custom logic to get alerted
});

On the payment form, to allow the Embedded UI - Checkout elements to be binded, it is necessary to create an empty DOM container (div tag) with the unique id “latpay-element”. This should be within your payment form and placed in location where you would like to have the card elements to be displayed.


<form method="post" action="your-own-server-side-page">
<div id=latpay-element>
</div>
<button id="customButton">Checkout</button>
</form>

To customise the user interface styles, the following classes can be added as inline style to overwrite the default behaviour of the card element UI. The available style classes and its default configuration used in Embedded UI - Checkout element are:

CSS details


Card element style


/*This selector is used for set required field "*" color*/
span.latpay-required {
color: red;
font-weight: bold;
}

/*This selector points to form labels */
div.latpay-elements-field > label {
color: #999 !important;
font-size: 12px !important;
}

/*This selector points to CVC box while pay using card token*/
div.latpay-elements-field {
padding: 10px 5px;
}

/*This selector points all input boxes*/
div.latpay-elements-field > input {
width: 100%;
margin-top: 5px;
border: 1px solid #d9d9d9;
background: #fff !important;
padding: 6px;
font-size: 18px !important;
color: grey !important;
}

/*This selector points card brand logo*/
i.latpay-credit-card-brand {
position: absolute;
right: 8%;
margin-top: -37px;
display: block;
width: 30px;
height: 24px;
background: no-repeat url(http://localhost/martfury/wp-content/plugins/hps/images/credit-card.svg);
}

/*This selector points division between Expiry Date and CVC*/
div.latpay-flex {
display: flex;
justify-content: space-between;
padding-bottom: 5%;
}

/*This selector points division width Expiry Date and CVC*/
div#latpay-exp-element, div#latpay-cvc-element {
width: 50%;
}



/*This selector points error-list section */
li.latpay-error-list {
color: #b81c23;
font-weight: bold !important;
}

@media (max-width: 520px) and (min-width: 300px) {
div.payment_box {
padding: 0px !important;
}

div.latpay-elements-field > input {
font-size: 15px !important;
}
}

Payment Token Handling along with Card Token


An event listener must be added to trap the customer submit action when the customer fills in the card details. The processpayment()must be called to submit the customer card details to Latpay and generate a Payment TransToken and along with it the CardToken (which can be used for repeat purchases of same customer). The Checkout elements have built in form validation which handles all format errors during card details entry. In case of error during Payment TransToken generation, it will be returned as error, which can then be handled on the listener. Once the request is successful, the request can be continued to submit to your server.

LatpayCheckout.processpayment({
amount: 'transaction amount' ,
currency: 'transaction currency' ,
reference: 'transaction reference' ,
description: 'transaction description' ,
status: function (token) {
if(token == "success"){
// Transtoken generated succesfully, you can proceed to form post after completing any custom work as necessary
return true;
}
else if(token == "failed"){
// if transaction generation failed, merchant can complete any custom work and prevent form post
 e.preventDefault();
}

}
});
});

The following Javascript code sample template shows an implementation for the event listener

// Onload or click event
LatpayCheckout.open({
merchantid: 'test_hps' ,
publickey: 'querygfdsazar'
});

 $("#customButton").click(function (e) {

LatpayCheckout.processpayment({
amount: transaction amount ,
currency: transaction currency ,
reference: transaction reference ,
description: transaction description,
status: function (token) {
if(token == "success"){
// Transtoken generated succesfully, you can proceed to form post after completing any custom work as necessary
return true;
}
else if(token == "failed"){
// if transaction generation failed, merchant can complete any custom work and prevent form post
 e.preventDefault();
}

}
});
});
});

Authorise the payment

After the customer has submitted the card details and Payment TransToken generated and submitted to your server, you can use it to authorise the payment. On your server, you can retrieve the TransToken and other details from the POST parameters submitted by your form. Then an API call should be made server to server to authorise the payment.

The request and response fields for authorise the payment API call provided below.

Capture Confirmation of Checkout

Once checkout is completed and the payment form is successfully submitted to your server side code along with cardtoken, an API call can be made to confirm the capture of transaction. To get the transtoken using form collection

Example in PHP code : $_REQUEST[‘transtokenval’] ;

Method : Post
Url : https://lateralpayments.com/checkout-staging/Testcheckout/Capture

Note that unless a capture confirmation call is made, no finalisation of authorisation of fund against the card is made. Hence it is important to ensure capture call is made after checkout completion
Request
API Type Mandatory
amount money Required
currency string Required
status Status Required
transtoken string Required
datakey string Required
merchantuserid string Required
reference string Required
description string Optional
Example 1
{
    "amount":"0.10",
    "currency":"AUD",
    "status":"0",
    "transtoken":"iRc2jMXATo\/UYXCTkjDLbbKb+Ai0eXx\/cahLmePGaYOVLAdbYrHoGngOoeldZo0V",
    "datakey":"skhjhdashgau",
    "merchantuserid":"test_hps",
    "reference":"3811b2a16309ba9f20d8e51ebce782b8a09962eb",
    "description":"3811b2a16309ba9f20d8e51ebce782b8a09962eb"
    
}
Response
API Type Mandatory
datakey string Required
cardtoken string Required
amount money Required
currency string Required
reference string Required
description string Optional
status Status Required
API
POST /url/path/
Request
POST /url/path/

The payload of Checkout request must contain details of the authentication, customer, order details. For a seamless experience for customer, all purchase details can be included as well. The request & response parameters table below summarises the field requirements for Checkout along with mandatory field indicators . For the full list of parameters, including what is and is not mandatory, refer our API Reference section.

Checkout Request

Checkout URL Parameters

API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey** String Required
consumer Consumer Required
order Order Required
callback_params Callback param Optional
billing Billing Required

** Refer the “merchantkey” construction details in Authentication section

Card Transaction
Token Transaction
{
   "accountid": "test_lpsv2",
   "storeid":"ST1",
   "deviceid":" Ter1",
   "merchantkey":"a746ff9621d67a6d1b8d7bb6174fea00",
   "consumer": 
      {
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
       "email": "thirlok@lpsmail.com"
      },
    "order":
      {
          "reference": "lpstest123",
          "currency": "USD",
          "amount": "2",
          "purchasesummary": "Ecomm purchase list",
          "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
           },
           {
             "productid": "1891",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
           }
         ]
        },
    "callback_params":
       {
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
       },
    "billing":
       {
         "type": "card",
              "card":
                {
                  "name": "name on card",
                  "pan": "4200000000000000",
                  "exp": "12/25",
                  "cvc": "123"
                },
              "address" : 
                {
                  "line1" : "Southbank House",
                  "line2" : "",
                  "city" : "London",
                  "state" : "",
                  "country" : "GB",
                  "zipcode" : "SE1",
                },
              "fees" : 
                {
                  "processingfee": "0.25"
                }
              
         
        }
}
{
   "accountid": "test_pos",
   "storeid": "store1",
   "deviceid": "latapydssj5",
   "merchantkey": "84961a8c564ffc4551eebfc937114226851c5260c4039d76ec4127eda15272d6",
   "consumer": 
        {
          "firstname": "thirlok",
          "lastname": "shankar",
          "phone": "1234512345",
          "email": "thirlok@lpsmail.com"
        },
    "order":
        {
          "reference": "lpstest123",
          "currency": "AUD",
          "amount": "0.02",
          "purchasesummary": "Ecomm purchase list", 
          "purchasedetail": [
              {
                "productid": "1890",
                "productname": "Smart watch",
                "productsku": "shop_dept_item_12434",
                "productdescription": "Android Smart wear design # tyfg45667",
                "productcategory": "Electronics",
                "productURL": "http://lateralpaymentsolutions.com",
                "quantity": "2",
                "priceperunit": "0.5"
               },
             {
               "productid": "1891",
               "productname": "Smart card",
               "productsku": "shop_dept_item_7895",
               "productdescription": "Kingston Smart SD Card # sd43545",
               "productcategory": "Electronics",
               "productURL": "http://lateralpaymentsolutions.com",
               "quantity": "2",
                "priceperunit": "0.5"
              }
         ]
        },
     "callback_params":
       {
          "param1": "value1",
          "param2": "value2",
          "param3": "value3",
          "param4": "value4",
          "param5": "value5"
        },
     "billing":
         {
           "type": "card",
     "card":
         {
          "token" : "0x2a70aa24c86a53f06f057ecbf5acca7ebe383df4",
          "cvc" : "123"
          } ,
     "address": 
        {
          "line1": "Southbank House",
          "line2": "",
          "city": "London",
          "state": "",
          "country": "GB",
          "zipcode": "SE1"
        },
     "fees":
        {
           "processingfee": "1.0"
        }
      }
    }

Response

The response to checkout API indicates the status of transaction along with unique transaction and order id’s. In case of asynchronous payments where customer will be completing payments, the status will usually acknowledge as pending and final status notified on callback to URL sent on the notifyurl parameter.


Checkout Response



Checkout URL Parameters

API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid numeric Required
customerid numeric Required
responsekey** string Required
transactiondate_utc String Required
status Status Required
consumer Consumer Required
order Order Required
callback_params CallbackParams Optional
billing Billing Required

** Refer the “responsekey” details in Authentication section

Object
Application/json
{
   "accountid": "test_lpsv2",
   "storeid":"ST1",
   "deviceid":" Ter1",
   "transactionid": "39678",
   "customerid":"123",
   "responsekey":"a746ff9621d67a6d1b8d7bb6174fea00",
   "transactiondate_utc": "26/03/2020 07:01:00",
   "status": 
      {
         "responsetype": "1",
         "statuscode": "0",
         "errorcode": "0",
         "errordesc": ""
      },
   "consumer": 
     {
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
     },
   "order":
     {
        "orderid":"345"
        "reference": "lpstest123",
        "currency": "USD",
        "amount": "2",
        "purchasesummary": "Ecomm purchase list",
        "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
            },
            {
             "productid": "1890",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
            }
        ]
      },
   "callback_params":
      {
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
      },
   "billing":
       {
         "type": "card",
              "card":
                {
                    "name": "name on card",
                    "pan": "420000******0000",
                    "exp": "12/25",
                    "token": "0xcc6a72fac6e4cafd1dc09b5aaa5d6ae06706d9b3"
                },
              "address" : 
                {
                    "line1" : "Southbank House",
                    "line2" : "",
                    "city" : "London",
                    "state" : "",
                    "country" : "GB",
                    "zipcode" : "SE1",
                },
              "fees":
                {
                    "processingfee": "0.25"
                },
	"authresponse":
	      {
		"banktransactionno":  "673645",
		"authcode": "84645",
		"gatewayreference": "867674634"
	     }
	
         
        }
 
}
Auth Status Check

Auth Status Check API call offers the ability to query the status of transaction in realtime. This API can be used for querying of transaction status in case if no response back for the original authorisation request. It can also be used to verify transaction status as an additional check from server, if in case the authorisation was initiated from a client side application.

POST /url/path/
Request
POST /url/path/
Field Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey** string Required
transactionid string Optional
order Order Required
billing Billing Required

**Refer the “merchantkey” construction details in Authentication section

Example 1
{
"accountid": "test_pos",
"storeid": "store1",
"deviceid": "latapydssj5",
"merchantkey": "438ffbde7fd3b34e83abd80f7bca67cdd98559e1ea01d06c212dd97a67361364",
"transactionid": "5507",
"order":
   {
    "reference": "lpstest123",
    "currency": "AUD",
    "amount": "0.02",
    "purchasesummary": "Ecomm purchase list" 
    },
"billing":
        {
        "type": "card"
        }
}

Response
Field Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid string Required
responsekey** string Required
customerid string Required
transactiondate_utc string Required
consumer Consumer Required
order Order Required
billing Billing Required
status Status Required

** Refer the “responsekey” details in Authentication section

Object
Accepted
Prescreen Failed
{
    "accountid": "test_pos",
    "storeid": "store1",
    "deviceid": "latapydssj5",
    "transactionid": "5507",
    "responsekey": "F5AC56F7CE677853C0E2E4637546A004EC8AB0FC397D9190CB07C686942BDB8B",
    "customerid": "106",
    "transactiondate_utc": "17/04/2020 11:10",
    "consumer": 
       {
        "firstname": "thirlok",
        "lastname": "shankar",
        "phone": "1234512345",
        "email": "thirlok@lpsmail.com"
       },
    "order": 
       {
        "orderid": "5496",
        "reference": "lpstest123",
        "currency": "AUD",
        "amount": "0.02",
        "purchasesummary": "Ecomm purchase list"
       },
    "billing": 
      {
        "type": "card",
        "card": 
           {
            "name": "aswani",
            "pan": "420000XXXXXX0000",
            "exp": "03/21",
            "token": "0x2a70aa24c86a53f06f057ecbf5acca7ebe383df4"
           },
        "fees": 
           {
            "processingfee": "2.00"
            },
        "authresponse": 
            {
            "banktransactionno": "7008682104  ",
            "authcode": "",
            "gatewayreference": "76122834"
            }
       },
    "status": 
       {
        "responsetype": "6",
        "statuscode": "0",
        "errorcode": "",
        "errordesc": ""
       }
}
{
    "accountid": "test_pos",
    "storeid": "store1",
    "deviceid": "latapydssj5",
    "transactionid": "5367",
    "responsekey": "C93E5C54B01E71BB16C1A8CCEEB2F2F94B96DEB8854C396CD19B7FCB5E9FC1C0",
    "customerid": "106",
    "transactiondate_utc": "30/03/2020 07:11:00",
    "consumer": {
        "firstname": "thirlok",
        "lastname": "shankar",
        "phone": "1234512345",
        "email": "thirlok@lpsmail.com"
       },
    "order": {
        "orderid": "5356",
        "reference": "lpstest123",
        "currency": "AUD",
        "amount": "0.12",
        "purchasesummary": "Ecomm purchase list"
        },
    "billing": {
        "type": "card",
        "card": {
            "name": "aswani",
            "pan": "420000XXXXXX0000",
            "exp": "03/21",
            "token": "0x2a70aa24c86a53f06f057ecbf5acca7ebe383df4"
           },
        "authresponse": {
            "banktransactionno": "7008532746  ",
            "authcode": "",
            "gatewayreference": "75924657"
          }
        },
    "status": {
        "responsetype": "0",
        "statuscode": "2",
        "errorcode": "1001",
        "errordesc": "Authentication failed for Merchant"
    }
}
Reports
POST /url/path/
Request
POST /url/path/
API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey string Required
startdate string Required
enddate string Required
Example 1
{
     "accountid":"test_pos",
     "storeid":"store1",
     "deviceid":"latapydssj5",
     "merchantkey":"F71933713E0279B9AFDE5AEF4CB72F71C1A46C386C50248A1F90A931B1907396",
     "startdate":"01/02/2019",
     "enddate":"01/02/2019"
    
}
Response
API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
responsekey string Required
status Status Required
transaction[] Transaction Required
Object
Example 1
{
    "accountid": "test_pos",
    "storeid": "store1",
    "deviceid": "latapydssj5",
    "responsekey": "958D572150DC06C45384C72A2F0CCACC95800B7EADFC6AA53A7F5C67C4339572",
    "status": {
        "responsetype": "10",
        "statuscode": "0",
        "errorcode": "",
        "errordesc": ""
    },
    "transactions": [
        {
            "transactionid": "3674",
            "amount": "2.00",
            "currency": "AUD",
            "transtype": "1",
            "reference": "lpstest123",
            "transactiondate": "01/02/2019 09:17",
            "pan": "4200000000000000",
            "status": {
                "responsetype": "1",
                "statuscode": "0",
                "errorcode": "",
                "errordesc": ""
            }
        },
        {
            "transactionid": "3673",
            "amount": "2.00",
            "currency": "AUD",
            "transtype": "1",
            "reference": "lpstest123",
            "transactiondate": "01/02/2019 08:00",
            "pan": "",
            "status": {
                "responsetype": "1",
                "statuscode": "0",
                "errorcode": "",
                "errordesc": ""
            }
        },
        {
            "transactionid": "3672",
            "amount": "2.00",
            "currency": "AUD",
            "transtype": "1",
            "reference": "lpstest123",
            "transactiondate": "01/02/2019 07:49",
            "pan": "",
            "status": {
                "responsetype": "1",
                "statuscode": "0",
                "errorcode": "",
                "errordesc": ""
            }
        },
        {
            "transactionid": "3671",
            "amount": "2.00",
            "currency": "AUD",
            "transtype": "1",
            "reference": "lpstest123",
            "transactiondate": "01/02/2019 07:19",
            "pan": "",
            "status": {
                "responsetype": "1",
                "statuscode": "0",
                "errorcode": "",
                "errordesc": ""
            }
        }
    ]
}
Alternate Payment

The Checkout API is part of a unified API request to process authorisations. To use alternate payments as payment mode, indicate the “billing” section with type set to “alt” and “the service code” as shown the sample request.

POST /url/path/
Request
POST /url/path/

The payload of Checkout request must contain details of the authentication, customer, order details. For a seamless experience for customer, all purchase details can be included as well. For the full list of parameters, including what is and is not mandatory, refer our API Reference section.

Alternate Payment Request

Alternate Payment URL Parameters

API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey string Required
consumer Consumer Required
order Order Required
callback_params CallbackParams Optional
billing Billing Required
notifyurl string Required
Application/json
{
   "accountid": "test_lpsv2",
   "storeid":"ST1",
   "deviceid":" Ter1",
   "merchantkey":"a746ff9621d67a6d1b8d7bb6174fea00",
 } ,
   "consumer": 
{
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
},
   "order":
{
         "orderid":"345",
          "reference": "lpstest123",
         "currency": "USD",
          "amount": "2",
          "purchasesummary": "Ecomm purchase list",
          "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
            },
           {
             "productid": "1890",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2',
             "priceperunit": "0.5"
            }
       ]
},
    "callback_params":
{
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
},
    "billing":
{
         "type": "alt",
		  "servicecode": "Alipay"	 
},
  "notifyurl": "https://www.notifyurl.aspx"
}

Response

The response to checkout API indicates the status of transaction along with unique transaction and order id's. In case of asynchronous payments where customer will be completing payments, the status will usually acknowledge as pending and final status notified on callback to URL sent on the notifyurl parameter.

Alternate Payment Response

Alternate Payment URL Parameters


API Type Mandatory
accountid string Required
responsekey string Required
storeid string Required
deviceid string Required
consumer Consumer Required
order Order Required
callback_params CallbackParams Optional
billing Billing Required
status Status Required
notifyurl string Required
Object
Application/json
{
   "accountid": "test_lpsv2",
   "storeid":"ST1",
   "deviceid":" Ter1",
   "transactionid": "39678",
   "customerid":"123",
   "responsekey":"a746ff9621d67a6d1b8d7bb6174fea00",
   "status": 
      {
         "responsetype": "1",
         "statuscode": "2",
         "errorcode": "0",
         "errordesc": ""
      } ,
   "consumer": 
     {
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
     },
   "order":
     {
         "orderid":"345",
          "reference": "lpstest123",
         "currency": "USD",
          "amount": "2",
          "purchasesummary": "Ecomm purchase list",
          "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
           },
          {
             "productid": "1890",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": "2",
             "priceperunit": "0.5"
           }
        ]
      },
   "callback_params":
      {
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
      },
   "billing":
      {
       "type": "alt",
	   "servicecode": "Alipay"		 
      },
  "notifyurl": "https://www.notifyurl.aspx"
}

Service Code

Latpay API currently supports the following services:

Service Service Code
Alipay QR Alipay
Object
Direct debit

The Checkout API is part of a unified API request to process authorisations. To use direct debit as payment mode, indicate the “billing” section with type set to “dd” as shown the sample request.

POST /url/path/
Request
POST /url/path/

The payload of Checkout request must contain details of the authentication, customer, order details. For a seamless experience for customer, all purchase details can be included as well. For the full list of parameters, including what is and is not mandatory, refer our API Reference section.

Direct Debit Request

Direct Debit URL Parameters


API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey string Required
consumer Consumer Required
order Order Required
callback_params CallbackParams Optional
billing Billing Required
notifyurl string Required
Application/json
{
   "accountid": "test_pos",
   "storeid":"store1",
   "deviceid":"latapydssj5",
   "merchantkey":"394DE40765DE5C7CE579CBC29C066AE98ABB56C3E05DD2AC19603F54227ED9CA",
   "consumer": 
{
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
},
    "order":
{
         "reference": "lpstest123",
         "currency": "USD",
          "amount": "0.12",
          "purchasesummary": "Ecomm purchase list",
          "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": 2,
             "priceperunit": 0.5
           },
           {
             "productid": "1891",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": 1,
             "priceperunit": 0.2
            }
        ]
},
    "callback_params":
{
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
},
    "billing":
{
         "type": "dd",
         "directdebit":
			{
				"bsb": "123456",
				"accountnumber": "8766565465",
				"accountname": "My account"
			},
	     "address":
	        {
                "line1": "Southbank House",
                "line2": "",
                "city": "London",
                "state": "",
                "country": "GB",
                "zipcode": "SE1"
             },
          "fees": 
             {
                 "processingfee": "0.25"
             }
},
  "notifyurl": "https://www.notifyurl.aspx"
}

Response

The response to checkout API indicates the status of transaction along with unique transaction and order id’s. In case of asynchronous payments where customer will be completing payments, the status will usually acknowledge as pending and final status notified on callback to URL sent on the notifyurl parameter.

Direct Debit Response

Direct Debit URL Parameters


API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid numeric Required
customerid string Required
responsekey string Required
consumer Consumer Required
order Order Required
callback_params CallbackParams Optional
billing Billing Required
status Status Required
Object
Application/json
{
   "accountid": "test_lpsv2",
   "storeid":"ST1",
   "deviceid":" Ter1",
   "transactionid": "39678",
   "customerid":"123",
   "responsekey":"a746ff9621d67a6d1b8d7bb6174fea00",
    "status": 
      {
         "responsetype": "2",
         "statuscode": "2",
         "errorcode": "0",
         "errordesc": ""
     } ,
   "consumer": 
     {
       "firstname": "thirlok",
       "lastname": "shankar",
       "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
     },
  "order":
     {
         "orderid":"345",
          "reference": "lpstest123",
         "currency": "USD",
          "amount": 2,
          "purchasesummary": "Ecomm purchase list",
          "purchasedetail": [
           {
             "productid": "1890",
             "productname": "Smart watch",
             "productsku": "shop_dept_item_12434",
             "productdescription": "Android Smart wear design # tyfg45667",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": 2,
             "priceperunit": 0.5
           },
           {
             "productid": "1890",
             "productname": "Smart card",
             "productsku": "shop_dept_item_7895",
             "productdescription": "Kingston Smart SD Card # sd43545",
             "productcategory": "Electronics",
             "productURL": "http://lateralpaymentsolutions.com",
             "quantity": 2,
             "priceperunit": 0.5
           }
         ]
      },
    "callback_params":
      {
       "param1": "value1",
       "param2": "value2",
       "param3": "value3",
       "param4": "value4",
       "param5": "value5"
       },
    "billing":
       {
         "type": "dd",
         "directdebit":
		    {
				"bsb": "123456",
				"accountnumber": "876*****65",
				"accountname": "My account"
			},
		 "address": 
		    {
               "line1": "Southbank House",
               "line2": "",
               "city": "London",
               "state": "",
               "country": "GB",
               "zipcode": "SE1"
            },
         "fees":  
           {
              "processingfee": "0.25"
           }
					
         }
  
}

Process Notification
API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid numeric Required
responsekey string Required
customerid string Required
transactiondate_utc string Required
consumer Consumer Required
order Order Required
billing Billing Required
status Status Required
Object
Example 1
{
    "accountid":"test_lpsv2",
    "storeid":"ST1",
    "deviceid":"Ter1",
    "transactionid":"39678",
    "responsekey":"a746ff9621d67a6d1b8d7bb6174fea00",
    "customerid":"123",
    "transactiondate_utc":"07/04/2020 00:40:00",
    "consumer":
        {
          "firstname":"thirlok",
          "lastname":"shankar",
          "phone":"1234567890",
          "email":"thirlok@lpsmail.com"
            
        },
    "order":
        {
            "orderid":"345",
            "reference":"lpstest123",
            "currency":"AUD",
            "amount":"0.01",
            "purchasesummary":"Ecomm purchase list"
            
        },
    "billing":
        {
            "type":"dd",
            "directdebit":
               {
                   "bsb":"650000",
                   "accountnumber":"111111",
                   "accountname":"My account"
                   
                },
            "authresponse":
               { 
                   "banktransactionno":"",
                   "authcode":"",
                   "gatewayreference":"123"
                   
               }
            
          },
        "status":
            {
                "responsetype":"4",
                "statuscode":"0",
                "errorcode":"",
                "errordesc":""
                
            }
    
}


Returns
Return Notification
API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid numeric Required
responsekey string Required
customerid string Required
transactiondate_utc string Required
consumer Consumer Required
order Order Required
billing Billing Required
status Status Required
Object
Example 1
{
    "accountid":"test_lpsv2",
    "storeid":"ST1",
    "deviceid":"Ter1",
    "transactionid":"39678",
    "responsekey":"a746ff9621d67a6d1b8d7bb6174fea00",
    "customerid":"123",
    "transactiondate_utc":"07/04/2020 00:40:00",
    "consumer":
        {
            "firstname":"thirlok",
            "lastname":"shankar",
            "phone":"1234567890",
            "email":"thirlok@lpsmail.com"
            
        },
    "order":
       {
           "orderid":"345",
           "reference":"lpstest123",
           "currency":"AUD",
           "amount":"0.01",
           "purchasesummary":"Ecomm purchase list"
           
       },
    "billing":
        {
            "type":"dd",
            "directdebit":
                 {
                     "bsb":"032053",
                     "accountnumber":"111114",
                     "accountname":"My account"
                     
                 },
            "authresponse":
                {
                    "banktransactionno":"",
                    "authcode":"",
                    "gatewayreference":"123"
                    
                }
            
        },
    "status":
       {
           "responsetype":"11",
           "statuscode":"1",
           "errorcode":"5056",
           "errordesc":"Refer to Customer"
           
        }
    
}


Status Check

Status Check API call offers the ability to query the status of transaction in realtime. This API can be used for querying of transaction status in case if no response back for the original authorisation request. It can also be used to verify transaction status as an additional check from server, if in case the authorisation was initiated from a client side application.

POST /url/path
Request
POST /url/path
Field Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey** string Required
transactionid string Conditional
order Order Required
billing Billing Required

** Refer the “merchantkey” construction details in Authentication section

Example 1
{
"accountid": "test_pos",
"storeid": "store1",
"deviceid": "latapydssj5",
"merchantkey": "127bb857ce2302012068afdb35f336d680de2d36ebf8c9f00d13b5a5542f8293",
"transactionid":"5800",
"order":
{
"reference": "HubTest123@25052020_12311",
"currency": "AUD",
"amount": "0.12",
"purchasesummary": "x"
},
"billing":
{
"type": "dd"
}
}
Response
Field Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid string Required
responsekey** string Required
customerid string Required
transactiondate_utc string Required
consumer Consumer Required
order Order Required
billing Billing Required
status Status Required
returnstatus Return Status Required

** Refer the “responsekey” details in Authentication section

Object
Success Response
Return Response
{
    "accountid": "test_pos",
    "storeid": "store1",
    "deviceid": "latapydssj5",
    "transactionid": "5800",
    "responsekey": "19518330367F2BD6B92025A528C6EDEFB7BF379943FAC12AD369694CAE29EC60",
    "customerid": "2",
    "transactiondate_utc": "25/05/2020 13:11",
    "consumer": {
        "firstname": "thirlok",
        "lastname": "shankar",
        "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
    },
    "order": {
        "orderid": "5789",
        "reference": "HubTest123@25052020_12311",
        "currency": "AUD",
        "amount": "0.12",
        "purchasesummary": "x"
    },
    "billing": {
        "type": "dd",
        "directdebit": {
            "bsb": "650-000",
            "accountnumber": "111XXXX111",
            "accountname": "Thirlok shankar"
        },
        "fees": {
            "processingfee": "0.25"
        },
        "authresponse": {
            "banktransactionno": "LATPAYDD0000000892",
            "authcode": "",
            "gatewayreference": "892"
        }
    },
    "status": 
    {
        "responsetype": "6",
        "statuscode": "0",
        "errorcode": "",
        "errordesc": ""
      },
      "returnstatus": 
      {
        "returnid": "",
        "returncode": "",
        "returndate": "",
        "returnreference": ""
      }
}
{
    "accountid": "test_pos",
    "storeid": "store1",
    "deviceid": "latapydssj5",
    "transactionid": "5800",
    "responsekey": "19518330367F2BD6B92025A528C6EDEFB7BF379943FAC12AD369694CAE29EC60",
    "customerid": "2",
    "transactiondate_utc": "25/05/2020 13:11",
    "consumer": {
        "firstname": "thirlok",
        "lastname": "shankar",
        "phone": "1234567890",
        "email": "thirlok@lpsmail.com"
    },
    "order": {
        "orderid": "5789",
        "reference": "HubTest123@25052020_12311",
        "currency": "AUD",
        "amount": "0.12",
        "purchasesummary": "x"
    },
    "billing": {
        "type": "dd",
        "directdebit": {
            "bsb": "650-000",
            "accountnumber": "111XXXX111",
            "accountname": "Thirlok shankar"
        },
        "fees": {
            "processingfee": "0.25"
        },
        "authresponse": {
            "banktransactionno": "LATPAYDD0000000892",
            "authcode": "",
            "gatewayreference": "892"
        }
    },
    "status": {
        "responsetype": "6",
        "statuscode": "1",
        "errorcode": "5055",
        "errordesc": "No acc/incorrect acc Number"
    },
    "returnstatus": {
        "returnid": "121",
        "returncode": "5055",
        "returndate": "27/05/2020 23:00",
        "returnreference": "LATPAYDD0000000892"
    }
}
Reversal

Merchants can post a request to the unified gateway to refund/reversal a previously successfully authorized transaction. When a request is submitted, the gateway performs a series of checks and then responds back to the merchant. Refunds/Reversal are checked by LPS staff before they are sent to the bank.

Card
POST /url/path/
Request
POST /url/path/

The payload of reversal must contain details of the original checkout request. For the full list of parameters, refer our API Reference section.

Reversal Request

Reversal URL Parameters


API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
merchantkey** string Required
transactionid string Conditional
amount money Required
currency string Required
reference string Required
reversaldetails Reversal Details Required
transtype*** string Required

** Refer the “merchantkey” construction details in Authentication section
*** Refer below table for reversal transaction types to be sent in request

Reversal can be used for transaction which has been authorised successfully. It can also be used for transactions for which no response has been received, in that case transactionid can be omittied. In this scenario, if the transaction was successful , then the reversal will be attempted. If the transaction was not successful, then the reversal will fail.

Application/json
Sample:
  {
      "accountid": "test_pos",
      "storeid": "store1",
      "deviceid": "latapydssj5",
      "merchantkey": "6cfd95f50c322eba55858d9ae16cedf86b4d5acada6bfd9a27ade7c26fb393db",
      "transactionid": "5175",
      "amount": "0.12",
      "currency": "AUD",
      "reference": "lpstest123",
      "reversaldetails": 
        {
         "type": "standard",
         "reason": "Customer doesnt want the service - so requesting reversal"
         }
         "transtype": "3"
   }
Reversal Types
Type Description
standard Reversal type to send when processing refunds/voids for general business process
fraud Reversal type to send when processing refunds/voids for suspicious fraud transactions
Reversal Transaction Types
Code Type
2 Refund
3 Void
Response

The response to reversal API indicates the status of transaction whether it was successfully reversed and also will contain unique transaction and order id’s.

Reversal Respose

Reversal URL Parameters


API Type Mandatory
accountid string Required
storeid string Required
deviceid string Required
transactionid numeric Required
status Status Required
reversaldetails Reversal Details Required
responsekey** string Required
transtype string Required

** Refer the “responsekey” details in Authentication section
Object
Application/json
Sample:
{
    "accountid":"test_pos",
    "storeid":"store1",
    "deviceid":"latapydssj5",
    "transactionid":"6602",
    "status":
       {
           "responsetype":"1",
           "statuscode":"0",
           "errorcode":"",
           "errordesc":""
       },
     "reversaldetails":
        {
            "type":"standard",
            "reason":"Customer doesnt want the service - so requesting reversal"
         },
      "responsekey":"958D572150DC06C45384C72A2F0CCACC95800B7EADFC6AA53A7F5C67C4339572",
      "transtype":"3"
    
}
Authentication

Each API call will need to be authenticated by way of a merchantid issued by LatPay along with a key, which will be a SHA-256 hash of a set of post fields along with a predefined secret agreed between merchant & Latpay at the time of account setup.

Checkout Request

In case of Checkout request, the authentication key is “merchantkey” which is a SHA2 hash of the following parameters.


Name Description
Amount Purchase amount – 2 decimal places
Currency The 3 digit ISO currency code
deviceid a unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
TerminalSecret (Secret passphrase provided by merchant to Latpay during account setup)

Sample:

Name Description
Amount 1.00
Currency USD
deviceid ST1
TerminalSecret bK5NDRFgLv3
SHA-256 Hash Value 025a7953b87b3677bb058222abb3482933e8d66dfe6206d26720e64646402bed
Object
Checkout Response

In case of Checkout response, the authentication key is “responsekey” which is a SHA2 hash of the following parameters.

Name Description
Amount Purchase amount – 2 decimal places
Currency The 3 digit ISO currency code
deviceid a unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
ResponseSecret (Secret passphrase provided by Latpay to merchant during account release)

Sample:

Name Description
Amount 1.00
Currency USD
deviceid ST1
TerminalSecret bK5NDRFgLv3
SHA-256 Hash Value 025a7953b87b3677bb058222abb3482933e8d66dfe6206d26720e64646402bed
Object
Reversal Request

In case of Reversal request, the authentication key is “merchantkey” which is a SHA-256 hash of the following parameters.

When transactionid Posted

Name Description
transactionid Unique id provided by Latpay
amount Purchase amount – 2 decimal places
currency The 3 digit ISO currency code
deviceid A unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
TerminalSecret Secret passphrase provided by merchant to Latpay during account setup

When transactionid Omitted

Name Description
amount Purchase amount – 2 decimal places
currency The 3 digit ISO currency code
deviceid A unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
TerminalSecret Secret passphrase provided by merchant to Latpay during account setup
Object
Reversal Response

Responsekey which is a SHA2 hash of the following parameters:

Name Description
accountid merchant account provided by Latpay
storeid unique id for each store (provided on account setup)
deviceid a unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (provided on account setup)
Responsesecret secret passphrase provided by Latpay to merchant during account setup
Object
Status Check Request

In case of Status check request, the authentication key is “merchantkey” which is a SHA-256 hash of the following parameters.

When transactionid Posted

Name Description
transactionid Unique id provided by Latpay
amount Purchase amount – 2 decimal places
currency The 3 digit ISO currency code
deviceid A unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
TerminalSecret Secret passphrase provided by merchant to Latpay during account setup

When transactionid Omitted

Name Description
amount Purchase amount – 2 decimal places
currency The 3 digit ISO currency code
deviceid A unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (Provided on account setup)
TerminalSecret Secret passphrase provided by merchant to Latpay during account setup
Object
Status Check Response

Responsekey which is a SHA2 hash of the following parameters:

Name Description
accountid merchant account provided by Latpay
storeid unique id for each store (provided on account setup)
deviceid a unique number assigned and linked to a specific point-of-sale (POS) terminal or workstation (provided on account setup)
Responsesecret secret passphrase provided by Latpay to merchant during account setup
Object
Notification

All Latpay API requests, on completion, will also generate a callback to merchant server to indicate the status of transaction in addition to the response. The status of the transaction will be received in “notifyurl” which will be given in checkout api call. The response fields sent in notification will be identifical to those of API response fields.

Response Codes
Transaction Types

Transtype:

Code Type
1 Auth
2 Refund
3 Void
Response Types
Value Description
0 LPS / Prescreen response
1 Bank / Service response
2 Pending / Intermediate / 3d Enrolled Response
3 Redirection Response
4 Notification Response
5 Auth Request Response
6 Statuscheck
7 ManageSCSS
8 Acknowledgement
9 Checkout
10 Reports
11 Returns
Status Codes
Value Description
0 Approved
1 Declined / Rejected
2 Pending
Error Codes
Code Description Reason
90 Communication Failure Communication Failure, Unknown error
1001 Authentication failed for Merchant Wrong id, password or IP supplied
1002 Merchant account inactive Merchant account inactive
9000 Unexpected error Incorrect data types, unknown error
9001 Missing required field Mandatory field(s) missing
9004 Bank gateway not enabled Bank gateway not enabled
CARD
1004 Customer has exceeded allowed transactions number for 24 hours Velocity control on purchases per day reached
1005 Purchase amount check *** Repeated amounts being purchased
1006 Invalid credit card number Incorrect digit length for card type
1007 Invalid credit card expiry details. Card expiry invalid
1008 Luhn’s modulus check failed. CC number is invalid for card type
1009 PO Box error *** Bill address contains a PO Box address
1010 Failed Country lookup Bill country is on a negative country list
1011 Failed IP lookup Customer IP is on a negative IP list
1012 Failed BIN lookup Card BIN is on a negative list
1013 Customer card no. exceeded bank rejection limit Card rejection limit reached
1014 Customer blocked Customer is temporarily blocked pending investigation
1015 Minimum purchase check Purchase amount is below a specified level
1016 Failed IP check. *** Customer IP not in allowed list of IPs’.
1020 MOTO block MOTO not enabled.
1021 Recurring block Recurring not enabled.
9002 Mastercard transactions blocked *** MasterCard not enabled
9003 Currency Block*** Currency NOT enabled
BATCH
2001 Invalid Batch Details Invalid BatchId or batch reference
2002 Duplicate Request Duplicate Request
2003 Batch still in pending / Inprogress Batch still in pending / Inprogress
2004 Max transaction limit exceeded Transaction amount exceeds the Per Transaction Limit
REFUND
4001 Merchant login details incorrect
4003 LPS transaction id is invalid / not found
4004 Transaction has already been canceled / fully refunded
4008 Transaction cannot be canceled, past cutoff period
4005 Refund amount is not equal to transaction amount
4014 Refund currency is not equal to transaction curency
DD
5011 Merchant Account inactive
5012 Missing Account Configuration
5013 Invalid BSB Account
5021 Merchant Reference already exists
RETURNS
5051 Invalid BSB Number Invalid BSB Number
5052 Payment Stopped Payment Stopped on the account
5053 Account Closed Account Closed
5054 Customer deceased Customer deceased
5055 No acc/incorrect acc Number No acc/incorrect acc Number
5056 Refer to Customer Refer to Customer
5057 Deleted Account Deleted
5058 Invalid User ID Number Invalid User ID Number
5059 Technically Invalid Technically Invalid
STATUSCHECK
6003 Transaction not found
API reference
Address

Address

Name Type Length
line1 string 100
line2 string 100
city string 20
state string 3
country string 2
zipcode string 6
Object
Transaction
Field Type length
transactionid numeric
consumer Consumer
billing Billing
order Order
status Status
Object
Billing

Checkout Request Billing Parameters

Name Type Length
type string 10
servicecode string 10
card Card
address Address
fees Fees
authresponse Auth Response
direct debit Directdebit
Object
Card

Card

Name Type Length
name string 100
pan string 30
exp string 20
cvc string 3
token string 50
Object
Callback param

CallbackParams Parameters

Name Type Length
param1 string 200
param2 string 200
param3 string 200
param4 string 200
param5 string 200
Object
Checkout
Name Type Length
accountid string 50
storeid string 50
deviceid string 50
merchantkey string 100
responsekey String 100
consumer Consumer
billing Billing
order Order
callbackparams Callback param
status Status
notifyurl String URL 255
Object
Consumer

Consumer Details

Name Type Length
firstname string 200
lastname string 200
phone string 200
email string 200
Object
Directdebit

Directdebit

Name Type Length
bsb numeric 07
accountnumber numeric 09
accountname numeric 32
Object
Order

Order Parameters

Name Type Length
orderid string 30
reference string 200
currency string 3
amount string 5
purchasesummary string 200
purchasedetail
productid numeric
productname string 200
productsku string 200
productdescription string 200
productcategory string 200
productURL string 200
quantity numeric
priceperunit money
unknown
Reversal Details
Name Type Length
type string 15
reason string 200
Object
Reversal
Name Type Length
accountid string 50
storeid string 50
deviceid string 50
transactionid string 10
merchantkey string 100
responsekey string 100
amount money
currency string 3
reference numeric 200
transtype numeric 1
status Status
reversaldetails Reversal Details
Object
Status

Status

Name Type Length
response type numeric 10
statuscode numeric 10
messagecode numeric 10
errorcode numeric 10
errordesc string 200
Object
Fees
Name Type Length
processingfee String 5
Object
Auth Response
Name Type Length
banktransactionno string 50
authcode string 10
gatewayreference string 100
Object
Return Status
Field Type length
returnid string 20
returncode string 20
returndate string 30
returnreference string 50
Object
Card Processing
Introduction
Standard Authorization
Authorization Post Fields
Field Description Mandatory Data Type
merchant_User_Id Merchant’s user id provided by LPS Y Mixed
merchantpwd Merchant’s PWD provided by LPS Y Mixed
merchant_ipaddress Static IP address of the Merchant server Y As provided by merchant
customer_firstname First name of the customer Y Mixed
customer_lastname Last name of the customer Y Mixed
customer_phone Telephone number of the customer Y Mixed
customer_email Email address of the customer Y Mixed
customer_ipaddress IP address of the customer Y Mixed
bill_firstname First name of the card holder Y Mixed
bill_lastname Last name of the card holder Y Mixed
bill_address1 First line of street address for billing the CC Y Mixed
bill_address2 Second line of street address for billing the CC Optional Mixed
bill_city City for the billing the credit card Y Mixed
bill_country Country for the billing the credit card See LPS
bill_state State for the billing the credit card Optional See LPS Standard Codes
bill_zip Postal code for the billing the credit card Y Mixed
dateregistered Date customer setup an account with your site Optional Mixed
customer_cc_expmo Expiration month(mm) of the credit card Y Mixed
customer_cc_expyr Expiration year(yyyy) of the credit card Y Mixed
customer_cc_number Credit card/Debit card number of the customer Y numeric
customer_dc_issue Debit card issue number Y (for debit cards only) numeric
customer_dc_startmo Debit card start month or valid from month(mm) for debit cards only Mixed
customer_dc_startyr Debit card start year or valid from year (yyyy) for debit cards only Mixed
customer_cc_type Credit Card type of the customer either VISA,MAST, SWITCH, SOLO, DELTA, AMEX, MAESTRO (Case Sensitive, upper case only) Y Mixed
customer_cc_cvc CVC number of the bank of customer card Y numeric
customer_bank_name Name of issuing bank of customer card Y
ship_to_address1 First line of the street address to ship the product Y Mixed
ship_to_address2 Second line of the street address to ship the product Y Mixed
ship_to_city City to which the ship the product Y Mixed
ship_to_country Country to which the ship the product Y Mixed
ship_to_phone Telephone number of shipping destination Y Mixed
ship_to_state State or province to which the ship the product Y Mixed
ship_to_zip Postal code to which the ship the product Y Mixed
ship_to_method Shipping method Y Mixed
merchant_ref_number Merchant generated reference number Y Mixed
currencydesc=”XXX” XXX is the currency code you are transacting in i.e., USD, GBP, EUR Y See LPS Standard Codes
amount 2 decimal places only Y Numeric
Authorization Post Response
Field Description Data Type Len
ResponseType Transaction response type int 4
LPS_transaction_id Unique Identifier for the transaction generated by LPS int 8
Merchant_ref_number Merchant reference number generated for the order varchar 50
Lpsid Login id of merchant site for authentication varchar 50
Lpspwd Password for LPS on Merchant site varchar 50
Fraudscreening_status Fraud screening response code from LPS int 4
Bank status Status of the transaction at the bank int 4
Amount Transaction amount 2 decimal places
Currency Transaction currency as per ISO code varchar 4
Bank_transaction_no Unique Bank ID varchar 50
Bank_authorisation_no Bank authorization number, save for your records varchar 50
Bank_date Date of bank transaction varchar 50
Bank_time Time of bank transaction varchar 50
Bank_original_code Original Bank Status code varchar 255

Note:

  • The entire Schedule 2B is always returned regardless of the transaction status.
  • The variables highlighted above in blue are always returned with values regardless of the ResponseType.
  • With a ResponseType=0 (fraudscreening status) then the variables in green will be blank. With a ResponseType=1 then all variables will be returned with appropriate values.
3D Secure Authorization
Introduction

When the customer is redirected to a URL on LPS Gateway after 3D SECURE authentication, it will match the transaction Id passed with the existing pending transaction. The status of the transaction will be updated to “3D SECURE Response Returned” and the 3D SECURE response will then be transferred back to a merchant’s URL which will return the customer back to the merchant site along with the details given in Table 2E.

The merchant should extract the 3D SECURE response and update the status of the transaction as 3D SECURE Response received. Note at this stage neither LPS nor the merchant know if the 3D SECURE authentication is successful. They will then open synchronous connection back to LPS payment gateway with the transaction details as shown in Table 2F.

Request POST Fields
Field Description Required/ Optional Data Type Len
merchant_User_Id Merchant’s user id provided by LPS Required varchar 50
merchantpwd Merchant’s PWD provided by LPS Required varchar 50
merchant_ipaddress Static IP address of the Merchant server Required , As provided by merchant
customer_firstname First name of the customer Required varchar 50
customer_lastname Last name of the customer Required varchar 50
customer_phone Telephone number of the customer Required varchar 50
customer_email Email address of the customer Required varchar 50
customer_ipaddress IP address of the customer Required varchar 50
bill_firstname First name of the card holder Required varchar 50
bill_lastname Last name of the card holder Required varchar 50
bill_address1 First line of street address for billing the CC Required varchar 100
bill_address2 Second line of street address for billing the CC Optional varchar 100
bill_city City for the billing the credit card Required varchar 50
bill_country Country for the billing the credit card Required See LPS Standard Codes
bill_state State for the billing the credit card Optional See LPS Standard Codes
bill_zip Postal code for the billing the credit card Required varchar 50
dateregistered Date customer setup an account with your site Optional varchar 50
customer_cc_expmo Expiration month(mm) of the credit card Required varchar
customer_cc_expyr Expiration year(yyyy) of the credit card Required varchar 50
customer_cc_number Credit card/Debit card number of the customer Required numeric 50
customer_dc_issue Debit card issue number Required (for debit cards only) numeric 2
customer_dc_startmo Debit card start month or valid from month (mm) Required (for debit cards only) varchar 50
customer_dc_startyr Debit card start year or valid from year (yyyy) Required (for debit cards only) varchar 50
customer_cc_type Credit Card type of the customer either VISA, MAST, SWITCH, SOLO,DELTA, AMEX, MAESTRO (Case Sensitive, upper case only) Required varchar 10
customer_cc_cvc CVC number of the bank of customer card Required numeric 3
customer_bank_name Name of issuing bank of customer card Optional
ship_to_address1 First line of the street address to ship the product Optional varchar 50
ship_to_address2 Second line of the street address to ship the product Optional varchar 50
ship_to_city City to which the ship the product Optional varchar 50
ship_to_country Country to which the ship the product Optional varchar 50
ship_to_phone Telephone number of shipping destination Optional varchar 50
ship_to_state State or province to which the ship the product Optional varchar 50
ship_to_zip Postal code to which the ship the product Optional varchar 50
ship_to_method Shipping method Optional varchar 50
merchant_ref_number Merchant generated reference number Required varchar 50
currencydesc=”XXX” XXX is the currency code you are transacting in i.e., USD, GBP, EUR Required See LPS Standard Codes
amount Purchase Amount – 2 decimal places only Required 2 decimal places
3dSecureCheck Flag to indicate whether 3d secure code check to be performed. Valid values Y,N. Default : N Optional varchar 1
POST response Fields
FIELDS DESCRIPTIONS DATA TYPE LENGTH
ResponseType Transaction response type -Point A int 4
LPS_transaction_id Unique Identifier for the transaction generated by LPS int 4
Merchant_ref_number Merchant reference number generated for the order varchar 50
Lpsid LPS Response Authentication User Id varchar 50
Lpspwd LPS Response Authentication User Password varchar 50
Fraudscreening_status Fraud screening response code from LPS – Point B int 4
Bank_status Status of the transaction at the bank - Point C int 4
Amount Transaction amount 2 decimal places
Currency Transaction currency as per ISO code varchar 4
Bank_transaction_no Unique Bank ID varchar 50
Bank_authorisation_no Bank authorization number, save for your records varchar 50
Bank_date Date of bank transaction varchar 50
Bank_time Time of bank transaction varchar 50
Bank_original_code Original Bank Status code varchar 255
AVS_Result Customer Address verification result for the address line1 value posted by merchant Values: Empty or 2: Not verified / Not checked; 1: Failed;0: Successful. Int 4
CVN_Result Result of CVC entered by customer Values:Empty or 2: Not verified / Not checked; 1: Failed;0: Successful. Int 4
CrdStrg_Token*** Unique card token generated for the card posted varchar 100

Note:
• The entire Schedule 2B is always returned regardless of the transaction status.
• The variables highlighted above in blue are always returned with values regardless of the ResponseType.
• With a ResponseType=0 (fraudscreening status) then the variables in green will be blank. With a ResponseType=1 then all variables will be returned with appropriate values.
• ***CrdStrg_Token: Will be returned only if SCSScheck was set to Y on request post (or) the token itself was posted on request along with SCSScheck set to D.

HPS
Introduction

LPS Hosted Payment System (HPS) is a simple integration method suitable for all e-commerce merchants. It allows real-time transaction processing and at the same time can remove the problems involved in collecting and storing of cardholder details on merchant systems.

The HPS is fully secure and linked to the LPS enterprise payment gateway which provides sophisticated fraud and risk assessment in addition to authorising the transaction. The HPS uses HTML redirect messages to pass information between merchant e-commerce site and LPS. This method does not involve installation of any files at merchant site and hence is very simple to implement. We provide a 256 bit SSL interface for secure transmission of data over the internet.

A secure reporting and administration system to provide real time information is also made available to the merchant. This document serves to explain the technical integration requirements and procedures. It is of a technical nature and should be read as such. HPS

Workflow

This integration method uses HTML forms to pass information to LPS payment gateway for payment processing. Merchants should create a purchase order form which describes the details of goods or service purchased by the customer.

  1. When a shopper is ready to pay for their goods, the merchants website should submit the order details to our hosted payment page.
  2. The shopper will then be taken to the LPS payment page to enter their payment details, such as credit/debit card details.
  3. If the shopper has chosen to pay by credit/debit card: • HPS system sends a request to LPS enterprise payment gateway which forwards the shopper’s details to the bank, where a card authorisation is attempted • the bank returns an authorised or declined response to LPS
  4. HPS then displays the result to the shopper and also sends them a confirmation email.
  5. The transaction status is then sent to merchant. If the merchant had opted for synchronous postback response then HPS will call the merchant postback URL and post the response fields. The customer is then taken back to merchant site along with the response fields in another HTML redirect post session.
Integration Details
  1. OVERVIEW Integrating with LPS Hosted Payment System is a very simple process. The points below describe the process of setting up an integration using a sample HTML form.
  2. ORDER DETAILS TO LPS HPS Order details submission from merchant to LPS HPS is simply a HTML form with a number of post fields. It should contain a list of mandatory fields as specified in Appendix A “Authorisation Post Fields & Response Fields”. It can also contain a range of optional fields. The merchant system should “POST” this form to the LPS HPS URL when customer has selected to proceed with making payment on merchant site
Sample order details
<form method="post" action="HPS_payment.aspx">
<!--Authentication details-->
<input type="hidden" name="Merchant_User_Id" value="" />
<input type="hidden" name="merchantpwd" value="" />
<!--Customer Details-->
<input type="hidden" name="customer_firstname" value="" />
<input type="hidden" name="customer_lastname" value="" />
<input type="hidden" name="customer_phone" value="" />
<input type="hidden" name="customer_email" value=""/>
<input type="hidden" name="customer_ipaddress" value="" />
<!--Billing details-->
<input type="hidden" name="bill_firstname" value=""/>
<input type="hidden" name="bill_lastname" value=""/>
<input type="hidden" name="bill_address1" value="" />
<input type="hidden" name="bill_address2" value="" />
<input type="hidden" name="bill_city" value="" />
<input type="hidden" name="bill_country" value="" />
<input type="hidden" name="bill_state" value="" />
<input type="hidden" name="bill_zip" value="" />
<!--Delivery details-->
<input type="hidden" name="ship_to_address1" value="" />
<input type="hidden" name="ship_to_address2" value="" />
<input type="hidden" name="ship_to_city" value="" />
<input type="hidden" name="ship_to_country" value="" />
<input type="hidden" name="ship_to_phone" value="" />
<input type="hidden" name="ship_to_state" value="" />
<input type="hidden" name="ship_to_zip" value="" />
<input type="hidden" name="ship_to_method" value="" />
<input type="hidden" name="merchant_ref_number" value="" />
<!--Purchase details-->
<input type="hidden" name="Purchase_summary" Value="" />
<input type="hidden" name="currencydesc" Value="" />
<input type="hidden" name="amount" Value= "" />
<!--Security details-->
<input type="hidden" name="transactionkey" Value="" />
</form>
Checkout form POST fields
Field Description Required/ Optional Data Type Length
merchant_User_Id Merchant’s user id provided by LPS Required varchar 50
merchantpwd Merchant’s PWD provided by LPS Required varchar 50
customer_firstname First name of the customer Required varchar 50
customer_lastname Last name of the customer Required varchar 50
customer_phone Telephone number of the customer Required varchar 50
customer_email Email address of the customer Required varchar 50
customer_ipaddress IP address of the customer Required varchar 50
bill_firstname First name of the card holder Required varchar 50
bill_lastname Last name of the card holder Required varchar 50
bill_address1 Bill address line1 Required varchar 100
bill_address2 Bill address line2 Optional varchar 100
bill_city Bill_city Required varchar 50
bill_country Bill_country Required See LPS Standard Codes
bill_country Bill_country Required See LPS Standard Codes
bill_state Bill state Optional varchar 50
bill_zip Postal code for the billing the credit card Required varchar 50
ship_to_address1 Delivery address line1 Optional varchar 50
ship_to_address2 Delivery address line2 Optional varchar 50
ship_to_city Delivery city Optional varchar 50
ship_to_country Delivery country Optional varchar 50
ship_to_phone Telephone number of shipping destination Optional varchar 50
ship_to_state State or province to which the ship the product Optional varchar 50
ship_to_zip Postal code to which the ship the product Optional varchar 50
ship_to_method Shipping method Optional varchar 50
merchant_ref_number Purchase order number Required varchar 50
Purchase_summary Summary details of the purchase details Required varchar 1000
currencydesc Purchase Currency in 3 digit ISO format. Required See LPS Standard Codes
amount Purchase Amount – 2 decimal places only Required Numeric
Redirect Response
Field Description Data Type
Merchant_User_Id Merchant’s user id provided by LPS varchar
Merchant_ref_number Purchase order number varchar
Lpsid Login id of merchant site for authentication varchar
Lpspwd Password for LPS on Merchant site. varchar
Transactionid Unique Identifier for the transaction generated by LPS Integer
Requestid Unique Identifier for the transaction generated by HPS Integer
bill_firstname First name of the card holder varchar
bill_lastname Last name of the card holder varchar
Purchase_summary Summary details of the purchase details varchar
currencydesc CurrencyCode in ISO 3 digit format See LPS Standard Codes
amount Purchase Amount – 2 decimal places only 2 decimal places
CardBin First six digit of the customer card integer
CardLast4 Last four digit of the customer card integer
CardType Card scheme of customer card varchar
CardHolderName Card holder name as entered on payment page varchar
CardIssuingCountry Card issuer country (2 digit ISO codes) See LPS Standard Codes
CardExpiry Card expiry as selected on payment page in the form of “MMYYYY” i.e., 012016 varchar
merchant_ipaddress Posted Merchant server IP address varchar
TransDateTime Date and time of transaction processed DateTime
CVN_Result CVN result code Integer
AVS_Result AVS result code Integer
Status Transaction status Refer to LPS Responsecodes
CardToken Unique card token generated for the card processed varchar
Bank_Code Bank reason code Integer
Bank_Message Bank reason message varchar
LPS Response Code
Code Description Reason
00 Transaction Approved
05 Transaction Rejected Bank Declined
90 Communication Failure, Status Unknown Contact LPS
92 Customer payment cancellation Customer cancelled before payment
1001 Authentication failed for Merchant Wrong id, password or IP supplied
1002 Merchant account inactive Merchant account inactive
1003 Transaction amount exceeds the Per Transaction Limit Purchase amount is above a specified level
1004 Customer has exceeded allowed transactions number for 24 hours Velocity control on purchases per day
1005 Code not in use
1006 Invalid credit card number Incorrect digit length for card type
1007 Invalid credit card expiry details
1008 Luhn’s modulus check failed Card number invalid
1009 Code not in use
1010 Failed Country lookup Bill country is not accepted by the bank
1011 Failed IP lookup Customer IP is blocked
1012 Failed BIN lookup Customer card BIN is blocked
1013 Bank rejection limit exceeded
1014 Customer blocked Customer details are blocked
1015 Minimum purchase check Purchase amount is below a specified level
1016 Failed IP check.*** Customer IP not in allowed list of IP’s
1022 Account not enabled for HPS Merchant account not enabled for HPS
9000 Unexpected error Incorrect data types, unknown error
9001 Missing required field A transactionid of –1 will also be returned
9002 Code not in use Code not in use
9003 Currency Block*** Currency NOT enabled.

NB. Any response codes that are denoted by *** may not be activated for you account(s).

Credits

This document describes the integration process for the LPS Recredits system. Recredits include the processing of voids (before settlement), refunds (after settlement), CFT’s, BAC’s and Faster Payments.

Void

Merchants can post a request to the LPS gateway to be void/reverse an authorisation. When a request is submitted, the gateway performs a series of checks and then directly forwards a void request to the bank for transaction reversal. A response is sent back to the merchant in real time to acknowledge the request and confirm if its been accepted or declined. The status of the request can also be viewed by logging onto the merchants reporting system on the LPS website.

Refund

Merchants can post a request to the LPS gateway to refund a settled transaction. When a request is submitted, the gateway performs a series of checks and then responds back to the merchant. Refunds are checked by LPS Admin staff before they are sent to the bank. Depending on the banks rules, this API can be used to perform partial refunds as well. The status of the request can be viewed by logging onto the merchants reporting system on the LPS website.

CFT's

Merchants can post a request to the LPS gateway to make a payment to a customers card number via the recredits system. When a request is submitted, the gateway performs a series of checks and responds back to the merchant. The submitted transactions are checked by LPS Admin staff before they are sent to the bank. The status of request can be viewed by logging onto the merchants reporting system on the LPS website.

Wires

Merchants can post a request to the LPS gateway to make a payment to a customers bank account via the LPS Wires system. When a request is submitted, the gateway performs a series of checks and responds back to the merchant. The submitted request is sent into the Banking network. The status of request can be viewed by logging onto the merchants reporting system on the LPS website. All requests are sent to LPS in the form of a HTTP synchronous POST over SSL. The LPS system then validates each individual request and responds on the same HTTP connection. This allows the merchant to incorporate the system into their backend process.

BAC's

Merchants can post a request to the LPS gateway to make a payment to a customers sort code and account number or credit card number via the BAC’s system. When a request is submitted, the gateway performs a series of checks and then responds back to the merchant. The submitted BAC’s transactions are checked by LPS Admin staff before they are sent to the BAC’s network. The status of request can be viewed by logging onto the merchants reporting system on the LPS website.

Faster Payments

Merchants can post a request to the LPS gateway to make a payment to a customers sort code and account number via the Faster Payments system. When a request is submitted, the gateway performs a series of checks and responds back to the merchant. The submitted Faster Payment are sent into the BAC’s network usually within a hour depending on the clients criteria. The status of request can be viewed by logging onto the merchants reporting system on the LPS website.