Hosted Payment
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 explains 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
- When a shopper is ready to pay for their goods, the merchants website should submit the order details to our hosted payment page.
- The shopper will then be taken to the LPS payment page to enter their payment details, such as credit/debit card details.
- Once the shopper confirms the purchase the HPS system sends a request to LPS enterprise payment gateway which forwards the shopper’s details to the Acquiring bank, and which in turn returns an authorised or declined response to LPS.
- HPS then displays the result to the shopper and sends them a confirmation email.
- The transaction status is then sent to merchant. If the merchant had opted for synchronous post back response, then HPS will call the merchant post back 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
3D SECURE
The LPS HPS Payment page is integrated with 3dsecure transaction payment processing. The merchant can indicate if the transaction should be processed as 3DSecure by setting theappropriate flag when redirecting the customer to the HPS payment system.
SECURE CARD STORAGE SERVICES (SCSS)
LPS HPS system is also linked with “Secure Card Storage Services (SCSS)” system which will help merchants to comply with PCI DSS audit requirements by removing the necessity to store card details in their system. SCSS system reduces the overhead of storing, managing and transmitting credit card details and card holder data. LPS HPS standard redirection post fields provide an option to flag a transaction to be part of SCSS and it automatically stores the card details and a corresponding token is returned in the response.
The encryption functionality works as follows:
a. Merchant should concatenate the following fields in the same order:
- currencydesc
- amount
- merchant_ref_number
- secret key
b. Merchant should generate SHA1 hash of the above concatenated field and post this value in“transactionkey” field along with other redirection parameters as per Schedule 2A. In the LPS HPS System, the transactionkey is validated by computing the hash value again and only if the posted key matches the key computed at our end (i.e. no data tampering during transit), the transaction is accepted for processing. If the hash doesn't match, the transaction request is declined.
PAYMENT CALLBACK NOTIFICATION
LPS HPS system provides payment callback notification which effectively calls a listening URL at merchant server as soon as a transaction is completed. This helps merchants to get notified instantly of transaction statuses instead of relying on customer getting redirected back to their server along with status fields. Though this is optional, LPS strongly recommends merchants to enable this feature so that in cases where customer accidentally closes the browser after transaction is completed at LPS HPS, merchants are still able to update the account details before customer returns to the site.
However, it is important for merchant NOT to have long business processes running on this listening URL. LPS HPS effectively waits only 30 seconds for the notification process to complete.
Merchant must quickly respond back the response string “RECEIVED OK” as soon as the notification is received. They should then proceed with updating their business process asynchronously. The reason being, since customer are effectively held in LPS HPS whilst notification is being delivered, it’s important for Merchant to respond quickly, so that we can then start the process of returning customer back to merchant website. If LPS HPS doesn’t get the response string within 30 seconds, it closes the connection and marks the notification as failed. However, we will still redirect the customer back to merchant site along with the usual response fields.
MULTILANGUAGE SUPPORT AND AMOUNT FORMAT
LPS HPS System support Multilanguage display wherein the payment page can be customised and displayed in the language of choice requested by merchant. The merchant can capture the culture locale of customer and accordingly can display the payment page. The language required to be displayed is to be sent as a request parameter when sending the initial form post request.
It is important to understand the implications of culture format on the amount field. Different cultures format the amount differently.
When sending the amount field on the initial post, it is very important that the amount is formatted as “culture independent” which uses decimal point for separating the major and minor units. For e.g. EUR 500.50, SEK 2575.75 etc.
Any request to use other languages on the payment page will be handled only after the request is received by the main payment form and thus it is important that when submitting the amount field, it is not formatted according any specific locale but always using decimal point with 2 decimal digits.
For more information on language supported, please refer to Appendix D.
FUNCTIONAL FLOW DIAGRAM
Image unavailable: lps_hosted.png
INTEGRATION IN DETAIL
NB. For questions or help at any stage of integration, please send an email to technical@lpsmail.com
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.
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 the customer has selected to proceed with making payment on merchant site.
A sample order details submission form is given below:
CARDHOLDER DETAILS CAPTURE
The HPS will display a payment page to the customer on successful redirection by the merchant using the order details form. The HPS will first authenticate to make sure the merchant is validated before allowing the payment page to be shown to customer. The customer will be able to enter the card details and to verify his purchase details. Finally, once all fields have been entered the customer will be able to make the payment.
PAYMENT PROCESSING STATUS
Once customer has clicked to pay for the transaction, the HPS system will send the request to the Acquiring bank and wait for authorisation response. The customer browser will NOT be redirected, and it will be server-to-server synchronous post request send to bank. Once receiving the response, HPS will display the status of the transaction result
PAYMENT CALLBACK NOTIFICATION
This is a feature in HPS. If the merchant has opted for payment callback notification, the HPS will automatically call a URL on the merchant server and post transaction status fields. This will make sure the merchants back office system is updated directly on response from the HPS and is not reliant on customer returning to merchant website along with the status. Merchant notification URL should quickly respond with “RECEIVED OK” on receiving the notification. An email confirming the payment authorisation will also be sent out to the customers on all successful authorisation requests.
CUSTOMER REDIRECTION BACK TO MERCHANT SITE
Once the transaction has been processed, the customer will be able to navigate back to merchant site from the HPS. The transaction status post fields will be posted back along with the redirection. This process also signals the end of transaction.
INFORMATION TO BE SUPPLIED BY MERCHANT
The following information is required:
- User name & Password:
The user name and password used for authentication on the return post from the LPS server to the merchant server. - IP address of server:
The IP address of the merchant web server needs to be provided. Please notify LPS before changing your IP address. - Technical Contact:
Technical contacts details. - Email address for Sending Email receipts:
Please provide the “sent from” e-mail address for e-mails sent to customers. i.e. orders@merchant.com. - Email Address for Receipt of Email receipts:
The merchant is Bcc’d on all receipts sent to customers. Please provide an e-mail address for these mails to be sent to. E.g.accounts@merchant.com - Secret key for generating one-way hash transaction key post field:
TESTING
Once the relevant information has been supplied to LPS, a test account will be created. The details of which will be returned by email to the merchant.
All test transactions should be sent to the URL as specified by LPS. The LPS test platform will respond, as it will do in a live environment.
The following rules must apply to testing:
- Use CC numbers as given in the test cards document.
- Use any expiry date but must be valid i.e. a date in the future
- Use any CVC code but must be valid i.e. three digits in length.
NB. No authorisations will be made on your credit card. Once testing is complete, LPS will provide a live URL and/or live account details for you to finalise end-to-end testing with the bank. At this stage authorisations will be made on your card.
Post Fields#
APPENDIX A: MERCHANT POSTED FIELDS TO LPS HOSTED PAYMENT SYSTEM
| Field | Description | Required/ Optional | Data Type | Length |
|---|---|---|---|---|
| merchant_User_Id# | Merchant’s user id 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# | MBill 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_state# | Bill state | 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 |
| 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 | |
| 3dsecurecheck# | Flag to indicate whether 3d secure code check to be performed. Valid values Y, N.Default: N | Optional | varchar | 1 |
| scsscheck# | Flag to indicate if SCSS is required.Values: Y, N, DY: Yes;N: No; [default if not sent]D: Done, token posted with the request. | Optional | varchar | 1 |
| motocheck# | Flag to indicate if transactions should be processed as MOTO. Valid values Y, N.Default: N | Optional | varchar | 1 |
| cardtoken# | Unique card token previously generated using LPS SCSS system. | Conditional (only if scsscheck is D). | varchar | 255 |
| transactionkey# | Secure one-way hash value for transactional security | Required | See “TRANSACTIONAL SECURITY” section above | |
| theme_identifier# | Unique identifier issued by LPS for the custom theme you’d configured for the MID | Optional | varchar | 50 |
| language# | Field indicating the language of the hosted payment page | Optional | See “Language Code” Section below | |
| processurl# | URL on merchant website to which the result of the authorisation will be posted back *should be sent as url encoded | Optional | varchar | 500 |
| notifyurl# | URL on merchant server to which the transaction status should be notified as soon as transaction is completed. This is independent of customer redirection and happens server to server synchronously *should be sent as url encoded. | Optional | varchar | 500 |
| cancelurl# | URL on merchant website to which the customer must be returned when customer opts out of the payment | |||
| process (by clicking the cancel button) *should be sent as url encoded# | Optional | varchar | 500 | |
| logoidUnique identifier issued by LPS for the custom Logo you’d configured for the MID# | Optional | varchar | 50 | |
| displayname# | Website / client name to be displayed on payment form | Optional | varchar | 50 |
| surcharge# | Surcharge processing fee | Optional | 2 decimal places | |
| defaultview# | Default payment option view to present to customer i.e., card or wallet. Valid values: ”card”, “wallet”Default: ”card” | Optional | varchar | 6 |
APPENDIX B: POSTED FIELDS FROM LPS HOSTED PAYMENT SYSTEM TO ECOMMERCE SYSTEM
| Field | Description | Data Type | Len |
|---|---|---|---|
| Merchant_User_Id# | Merchant’s user id provided by LPS | Varchar | 50 |
| Merchant_ref_number# | Purchase order number | Varchar | 50 |
| 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 | 50 |
| bill_lastname# | Last name of the card holder | Varchar | 50 |
| Purchase_summary# | Summary details of the purchase details | Varchar | 1000 |
| currencydesc# | Currency Code in ISO 3-digit format. | See LPS Standard Codes | |
| amount# | Purchase Amount – 2 decimal places only | 2 decimal places | |
| CardBin# | First six digits of the customer card | Integer | |
| CardLast4# | Last four digits 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. | Date Time | |
| CVN_Result# | CVN result code | Integer | |
| AVS_Result# | AVS result code | Integer | |
| Status# | Transaction status. | Refer to LPS Response codes. | |
| CardToken# | Unique card token generated for the card processed. | Varchar | |
| Bank_Code# | Bank reason code | Integer | |
| Bank_Message# | Bank reason message . | Varchar |
APPENDIX C: POSTED FILEDS FROM LPS HOSTED PAYMENT SYSTEM TO REDIRECT URL
| Field | Description | Data Type | Len |
|---|---|---|---|
| Merchant_User_Id# | Merchant’s user id provided by LPS | Varchar | 50 |
| 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=” XXX”# | XXX is the currency code you are transacting in i.e., USD, GBP, EUR | See LPS Standard Codes | |
| amount# | Purchase Amount – 2 decimal places only | 2 decimal places | |
| CardBin# | First six digits of the customer card | Integer | |
| CardLast4# | Last four digits 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. | Date Time | |
| CVN_Result# | CVN result code | Integer | |
| AVS_Result# | AVS result code | Integer | |
| Status# | Transaction status. | Refer to LPS Response codes. | |
| CardToken# | Unique card token generated for the card processed. | Varchar | |
| Bank_Code# | Bank reason code | Integer | |
| Bank_Message# | Bank reason message . | Varchar |
APPENDIX D: Language codes
APPENDIX E: LPS RESPONSE CODES
| 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 IPs’. |
| 1017# | Cardtype check failed*** | The card type is not allowed |
| 1022# | Account not enabled for HPS | Merchant account not enabled for HPS. |
| 5001# | 3D SECURE Authentication Failed | Customer card enrolled for 3D SECURE,but 3D SECURE authentication failed |
| 5002# | Intermediate 3d Secure Response code | Returned in schedule 2C Response if card is enrolled for 3d Secure |
| 5003# | Intermediate 3d Secure Response code** | Internal to LPS, indicating customer has completed authentication in ACS URL and landed back to LPS server |
| 5004# | Intermediate 3d Secure Response code** | Internal to LPS, indicating merchant has sent PARES to LPS Server |
| 5005# | 3dsecure processing only | Account supports 3d only, send 3dsecurecheck = Y |
| 5006# | Unable to verify PaRes as 3dsecure not available | Unable to verify PaRes as 3dsecure not available |
| 5007# | Invalid 3dsecure parameters | Invalid 3dsecure parameters |
| 5010# | Customer not enrolled or Issuer not participating in 3dsecure * | Card not enrolled |
| 9000# | Unexpected error | Incorrect data types, unknown error |
| 9001# | Missing required field | A transaction id 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 your account(s).
APPENDIX F: UNIQUE BANK CODE AND MESSAGE (BANK_CODE & BANK_MESSAGE)
| LPS Unique Bank Code | LPS Bank Message |
|---|---|
| N7# | Decline for CVV2 failure |
| R1# | Revocation of Authorization Order |
| 00# | Approved |
| 01# | Issuer Declined |
| 02# | Refer to Issuer |
| 03# | Invalid merchant or service provider |
| 04# | Retain Card |
| 05# | Do not honour |
| 06# | False Transaction |
| 07# | Pickup card, special condition (other than lost/stolen card) |
| 08# | Honour with Identification |
| 12# | Invalid transaction |
| 13# | Invalid amount(currency conversion field overflow) or amount exceeds maximum for card program |
| 14# | Invalid account number (no such number) |
| 15# | No such issuer |
| 21# | No action taken |
| 22# | Suspected Malfunction |
| 30# | Format Error |
| 34# | Suspected fraud, capture |
| 40# | Requested function not supported |
| 41# | Lost Card |
| 43# | Stolen Card |
| 51# | Insufficient funds |
| 54# | Expired card |
| 55# | Incorrect PIN |
| 57# | Transaction not permitted to cardholder |
| 58# | Transaction not allowed at terminal |
| 59# | Suspected Fraud |
| 61# | Activity amount limit exceeded |
| 62# | Restricted card (for example, in Country Exclusion table) |
| 63# | Security violation |
| 65# | Activity count limit exceeded |
| 75# | Allowable number of PIN-entry tries exceeded |
| 76# | Unable to locate previous message (no match on Retrieval Ref no) |
| 83# | Unable to verify PIN |
| 91# | Issuer unavailable |
| 92# | Financial institution or intermediate network unknown for routing |
| 93# | Transaction cannot be completed, violation of law |
| 94# | Duplicate Transmission |
| 96# | System malfunction, System malfunction or certain field error conditions |
| 104# | Billing country blocked |
| 105# | Issuing country of card bin blocked |
| 106# | Vendor is not registered for currency |
| 201# | Bank account configuration error |
| 203# | Host timeout |
| 204# | Declined by Acquirer |