Api Specification For Molpay Integration: (Version 13.0)
Api Specification For Molpay Integration: (Version 13.0)
(Version 13.0)
Last updated on 24 Oct 2016
MOLPay Sdn Bhd (948015-X)
B-13-3A, Jalan Multimedia 7/AH,
CityPark, i-City, 40000 Shah Alam,
Selangor Darul Ehsan, Malaysia.
Social Networks
https://www.facebook.com/MOLPay
https://twitter.com/molpay
https://plus.google.com/+Molpay/
https://www.instagram.com/molpay_com/
https://www.youtube.com/user/MOLPaySB
https://www.linkedin.com/company/molpay-sdn-bhd
Developer Platforms
https://github.com/MOLPay
Mobile SDK, seamless and inpage checkout, and many shopping carts
payment plugin/module/addon/extension are available
1
Table of Contents
INTRODUCTION
SIMULATION
PAYMENT APIs
Initiating Payment
Channel Lists
Cross-Border Multi-Currency Card Processing (Non-3DS)
Multi-Currency Alternative Payment
Malaysia
Singapore
China
Philippines
Indonesia
Vietnam
Australia
Thailand
Payment Page Integration
Getting Payment Result
Payment Status Notification
IPN (Instant Payment Notification)
MOLPay Notification
MOLPay Callback with IPN
2
Payee Standing Instruction API
Direct Standing Instruction or Payout API
Requery for Payout Standing Instruction
ERROR CODES
RESOURCES
Logos of all brand name
Mobile SDK/XDK
Supported Shopping Cart
ISO References
Handling JSON/PLAIN TEXT using .NET
Predefined Bank Lists (Updated on 06th Jan 2015)
Settlement/FTT Country & Currency Lists (Updated on 11th Sep 2014)
3
INTRODUCTION
Dealing with banks and 3rd party payment gateway suppliers are time-consuming and it might
cost you a lot of money. We also understand that it’s a hassle for those non-technical people to
integrate even one kind of online payment method into their existing website. Thus MOLPay
Sdn Bhd proudly presents MOLPay Secure Online Transaction service to cater your
requirement.
MOLPay is a service to help merchant to sell online and expand rapidly to South-East Asia
market. The service includes:
● Front-end
○ RWD or responsive web design payment page for online buyer to checkout
○ Secure 1-click payment using credit card tokenization technology, to ease the
payment flow for returning purchase
○ Bcard redemption and rewarding loyalty program for buyers
○ Seamless integration to popup bank login page immediately
○ In-page checkout similar to Stripe and airbnb checkout flow that can seamlessly
integrated with merchant system
○ Mobile SDK allows app developers to implement in-app payments
○ Channel switching is available for same currency channels
○ MOLPay CASH payment request which supports offline payment
○ Common shopping carts payment module, plugin, addon, or extension supported
● Back-end
○ Server-to-server Notification to ensure no missing status update
○ Callback to update merchant system on deferred status change
○ Merchant can login to control panel to track payment status
○ Scheduled report on daily/weekly/monthly basis to update merchant via email
○ Real-time visualized reports
4
PAYMENT FLOW OVERVIEW
MOLPay provides hosted payment page service, so that merchant does not require costly and
tech-savvy PCI-DSS compliance at merchant website or system. The integration is as simple as
passing parameters via HTTPS POST or GET method from merchant to MOLPay payment
page. Buyer will proceed their transaction on internet banking or any payment channel. Once
completed, MOLPay will redirect buyer’s front-end back to merchant system, using POST
method.
IPN (instant payment notification) or ACK from merchant could be implemented to confirm the
receiving of payment status update.
5
© 2005 - 2016 MOLPay Sdn Bhd.
All rights reserved. All trademarks are the property of their respective owners.
6
How to identify and report tech-related issue to MOLPay?
Merchant needs to prepare 3 simple and similar payment endpoint scripts to handle the
payment notification from MOLPay:
1. return URL: front-end or browser redirection notification, which are normally not a 100%
reliable and robust channel due to unexpected network connectivity issue or client-side
behavior, such as browser application crashes;
2. notification URL: a server-to-server back-end webhook which is more robust and
crucial, especially for mobile application;
3. callback URL: a special handler webhook to get notified on non-realtime payment
status, such as “deferred status update”, change of payment status, or MOLPay CASH,
which is not a realtime payment naturally.
After the normal payment flow, merchant can always send payment status query request, which
is defined in ReQuery APIs (a.k.a PSQ, Payment Status Query).
7
.
8
© 2005 - 2016 MOLPay Sdn Bhd.
All rights reserved. All trademarks are the property of their respective owners.
9
SECURITY & DATA INTEGRITY
MOLPay system uses “merchant ID”, “Verify Key”(public key, a.k.a verification key) and
“Secret Key”(private key) to generate encrypted hash string to ensure data integrity in the
payment process.
xxxxxxxxxxxxxx is Merchant’s Verify Key provided by MOLPay. Please make sure it is at least
32 characters. Merchant may request to change the key when necessary.
Merchants who are using MOLPay mobile xdk MUST use different strings for “Verify Key”(public
key) and “Secret Key”(private key), respectively. Contact MOLPay support team to reset your
keys whenever needed.
10
vcode (in payment request)
MOLPay vcode is to ensure the data integrity passed from merchant-end (either website or
mobile APP) to MOLPay payment page to avoid man-in-the-middle (MITM) attack. It uses
“Verify Key”(public key) for hashing purpose.
It becomes mandatory for each transaction if “Enable Verify Payment” is activated in merchant
profile as shown:-
vcode was encrypted using MD5 encryption hash function and consists of the following
information (must be set in the following orders) :
1. Transaction amount
2. MOLPay Merchant ID
3. Order ID
4. MOLPay Verify Key
$amount = “27.60”;
$merchantID = “ACME”;
$orderid = “OD8842”;
$verifykey = “xxxxxxxxxxxxxxxxxx”;
// Replace xxxxxxxxxxxxxxxxxx with your MOLPay Verify Key
// vcode formula
$vcode = md5( $amount.$merchantID.$orderid.$verifykey );
?>
11
Verification tool for vcode
To verify whether the vcode generated is correct, merchant may check on this URL:-
https://www.onlinepayment.com.my/MOLPay/query/vcode.php
12
skey (in payment response)
MOLPay skey is a MOLPay generated returning hash string to ensure the payment result data
integrity that passed to merchant system. Merchant MUST verify this hash string properly and
also compare the order ID, currency, amount, and the payment date/time if possible, to protect
self interest from being cheated by hacker/buyer. It uses “Secret Key”(private key) for hashing
process.
skey was encrypted twice using MD5 encryption hash function and consists of the following
information (must be set in the following orders) :
First hash string
1. Transaction ID
2. Order ID
3. Status
4. MOLPay Merchant ID (domain)
5. Amount
6. Currency
Final hash string
1. Payment Date/Time
2. MOLPay Merchant ID (domain)
3. First hash string
4. Approval Code
5. MOLPay Secret Key
6. extraP* (if applicable)
/********************************
*Don't change below parameters
********************************/
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$merchant = $_POST['domain'];
13
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey']; //Security key return by MOLPay
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5( $tranID.$orderid.$status.$merchant.$amount.$currency );
$key1 = md5( $paydate.$domain.$key0.$appcode.$vkey );
//key1 : Security key generated on Merchant system
?>
14
SIMULATION
Merchant should be provided a trial/test/sandbox account or developer account from MOLPay
sales or support, in order to simulate the payment flow for transaction successful and failure
cases.
IT purpose and only faked credit card channel is
Please note that “test_” account is for S
available. “_Dev” account has full range of production feature for advanced integration and UAT
purpose.
A “Dev” or developer account is always ended in “_Dev” while a test account is with prefix
“test_”.
Developer Account
For full feature integration and UAT, such as mobile XDK or seamless integration, please
request “Developer” account or “Dev” account from MOLPay support team.
These accounts are all set with a short period of lifespan for integration and testing purpose
only. No settlement are allowed in these accounts.
For real transaction conducted in “Dev” account, please void or cancel the transaction on the
same day. For Malaysian internet banking, only Maybank and CIMB Clicks are allowed to
request cancel. You may request to turn on the channel if it is not enabled in your “Dev”
account.
15
PAYMENT APIs
Initiating Payment
Passing parameters to MOLPay payment page using POST/GET method via HTTPS or SSL
connection will initiate a payment request from merchant system.
REQUEST URL
https://www.onlinepayment.com.my/MOLPay/pay/MerchantID/Payment_Method
Payment_Method: optional value to identify payment channel; Payment channel can be identified by using
channel filename, or pass the channel parameter to index.php using GET/POST method.
The URL is an API to accept POST/GET parameters from merchant site as well as the payment
page for buyer.
Channel Lists
Cross-Border Multi-Currency Card Processing (Non-3DS)
Default currency: USD
Channel Name filename channel Payable Amount Range Extra Information
16
Malaysia
Default currency: MYR
Channel Name channel channel Payable Amount Extra Information
filename parameter Range / Downtime*
MyClear FPX fpx.php fpx > 1.00 / 12am - 1am indirect internet banking
Maybank2u maybank2u.php maybank2u > 1.00 / 12:15am - 1am direct internet banking
CIMB Clicks cimb.php cimb > 1.00 / 11:45pm - direct internet banking /
12:45am CIMB credit card
Bank Islam BIMB.php BIMB > 1.00 / 12:15am - 1am direct internet banking
RHB Now rhb.php rhb > 1.00 / 12am - 1am direct internet banking /
RHB credit card
Am Online amb.php amb > 1.00 / 12am - 6am direct internet banking
Hong Leong Connect hlb.php hlb > 1.00 / 11pm - 7am direct internet banking /
HLB credit card
17
Maybank CDM Cash-MBBCDM.php Cash-MBBCDM > 10.00 cash (denominations:
RM10, 20, 50, 100)
MBB-eBPG-(PD or PW) MBB-EzyPay.php MBB-EzyPay Non-installment > 1.00 credit card / Installment
EzyPay Installment: for MBB issued card
3 mon: 200 - 1000
6 mon: 500 - 15,000
12 mon: 500 - 15,000
24 mon: 2,500 - 15,000
Remarks
1. Secure 1-click or credit card tokenization function can be enabled in merchant profile to ease next purchase on the same
merchant system.
2. Bcard loyalty reward points for successful transaction can be activated in merchant profile.
3. For certain MOLPay CASH channels, such as 7-eleven and epay, round to the nearest 0 or 5 cents and convenience
store fee applied. Buyer will see the “Payable Amount”, but MOLPay still return the amount passed from merchant system.
Singapore
Default currency: SGD
Channel Name filename channel Payable Amount Range Extra Information
SAM by SingPost singpost.php singpost > 5.00 cash / bank card / ATM
China
Default currency: USD (for merchant), RMB/CNY (for buyer)
Channel Name filename channel Payable Amount Range Extra Information
(Processing Currency)
18
Remarks
1. Due to China National Bank regulations, these channel will accept USD as default processing currency, and buyer
account will be deducted an equivalent amount in RMB. If merchant passes MYR as the currency, MOLPay will convert it
to equivalent amount of USD based on Yahoo! daily FX rate.
Philippines
Default currency: PHP
Channel Name filename channel Payable Amount Range Extra Information
Indonesia
Default currency: IDR
Channel Name filename channel Payable Amount Range Extra Information
Vietnam
Default currency: VND
Channel Name filename channel Payable Amount Range Extra Information
Australia
Default currency: AUD
Channel Name filename channel Payable Amount Range Extra Information
Thailand
Default currency: THB
Channel Name filename channel Payable Amount Range Extra Information
19
© 2005 - 2016 MOLPay Sdn Bhd.
All rights reserved. All trademarks are the property of their respective owners.
20
Payment Page Integration
This is the traditional integration method which will send the buyer information to MOLPay
hosted payment page. You may want to explore in-page(card only), seamless integration, Direct
Server API, mobile xdk or supported shopping cart payment modules for better user experience
beside this hosted payment page integration on MOLPay github repositories.
Request Parameters
These parameters can be passed using either POST or GET method, or mixed of these
methods. Please use UTF-8 encoding for all values.
Variable / Type Format / Max Length Description / Example
Parameter
merchant_id optional, alphanumeric Merchant ID provided by MOLPay
amount mandatory, integer or up to 2 decimal points The total amount to be paid in one purchase order.
numeric value Configurable to lock this field (Read-only). E.g. 500,
168.99
orderid mandatory, alphanumeric up to 32 characters Invoice or order number from merchant system. Can
set to Read-only field. E.g. BH2018-09rev
bill_desc mandatory, alphanumeric, 64kB Purchase itemized list or order description. Try to
avoid special character so that the payment request is
not blocked by web application firewall.
vcode Conditional if accept open amount or order This is the data integrity protection hash string. Refer
payment, such as virtual terminal is optional vcode section for details.
otherwise is mandatory. 32 chars hexadecimal
string
cur / currency optional, 3 chars ISO-4217 currency code Default payment currency from merchant site. E.g.
MYR, USD, EUR, AUD, SGD, CNY, IDR
channel optional, predefined string. Refer to c hannel Default payment page will be displayed without
column in the Channel Lists. channel specified.
langcode n
optional, predefined string. Currently only e Default language, i.e. English, will be displayed
for English & cn for Simplified Chinese. without langcode specified.
returnurl optional, URL For selected merchant only. Used for multiple return
URL. All URLs must be registered beforehand with
MOLPay.
callbackurl optional, URL Used for multiple callbackurl. All URLs must be
registered beforehand with MOLPay
21
cancelurl optional, URL orderid will be sent back to this URL via GET method
if buyer click “Cancel” button to abandon payment
before proceeding. No transaction will be created.
is_escrow optional, for escrow payment Set the value to 1 to indicate this is an escrow
payment. Escrow transaction also can be set after the
transaction has been created using escrow API.
tcctype optional, for Credit Card transaction type. Available value is:
SALS = Capture Transaction (Default)
AUTH = Authorize Transaction
22
Examples
23
response.write("& bill_mobile=” & mobile)
response.write("& bill_desc=” & desc)
response.write("& country=” & country)
response.write("& vcode=” & vcode)
response.write("’> Pay via MOLPay </a>”)
%>
24
Getting Payment Result
Payment result will be returned to merchant system once payment is done or user abandons the
payment process. HTTP POST is the only method that MOLPay returns all parameters to
merchant’s return URL for real-time status update, which merchant can configure it in merchant
admin. Merchant system should block all other methods or parameters from untrusted source.
Response Parameters
Variable / Type Format / Max Length Description / Example
Parameter
amount 2 decimal points numeric value The total amount paid or to be paid for CASH payment
request.
appcode alphanumeric, 16 chars Bank approval code. Mandatory for Credit Card.
Certain channel returns empty value.
skey 32 chars hexadecimal string This is the data integrity protection hash string. Refer
skey section for details.
currency 2 or 3 chars (ISO-4217) currency code Default currency is RM (indicating MYR) for Malaysia
channels.
channel predefined string in MOLPay system Channel references for merchant system. Refer to the
below table.
25
“channel” in response parameter
Card / Wallet Direct / Indirect Internet Banking Kiosk / Over-the-Counter / Cash
China
unionpay
Australia
polipayment
* obsoleted
26
Merchant is recommended to implement IPN(instant payment notification) in order to
acknowledge(ACK) on the receiving of payment status from MOLPay. There are 2 ways to
implement IPN. Please refer to IPN section for details.
/********************************
*Don't change below parameters
********************************/
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5( $tranID.$orderid.$status.$domain.$amount.$currency );
$key1 = md5( $paydate.$domain.$key0.$appcode.$vkey );
if ( $status == "00" ) {
if ( check_cart_amt($orderid, $amount) ) {
/*** NOTE : this is a user-defined function which should be prepared by merchant ***/
// action to change cart status or to accept order
// you can also do further checking on the paydate as well
// write your script here .....
}
} else {
// failure action. Write your script here .....
// Merchant might send query to MOLPay using Merchant requery
// to double check payment status for that particular order.
}
?>
27
Sample return URL script for ASP/ASP.NET
<!--#include file="md5.asp"--> ’For ASP Developer
<!--#include file="md5.aspx"--> ’For ASP.NET Developer
<%
’ md5.asp/md5.aspx is a 3rd party developed md5 solution for ASP/ASP.NET user
’ You could get the md5.asp/md5.aspx from [email protected]
’ Some variables below are coming from POST method
dim key0, key1, tranID, orderid, status, merchantID, amount, currency, paydate, appcode,
skey
tranID = Request.Form(“tranID”)
orderid = Request.Form(“orderid”)
status = Request.Form(“status”)
merchantID = Request.Form(“domain”)
amount = Request.Form(“amount”)
currency = Request.Form(“currency”)
paydate = Request.Form(“paydate”)
appcode = Request.Form(“appcode”)
skey = Request.Form(“skey”)
key0 = md5( tranID & orderid & status & domain & amount & currency )
key1 = md5( paydate & merchantID & key0 & appcode & ” xxxxxxxxxxxx” )
’Replace xxxxxxxxxxxx with your MOLPay Secret_Key
’ invalid transaction if the key is different. Merchant might issue a requery to MOLPay to
double check payment status with MOLPay.
%>
28
Payment Status Notification
WARNING: Please note that multiple payment notifications (either from return URL, notification
URL or callback URL) for single transaction is possible but this does not mean that the buyer
has paid twice or multiple times.
Implementation:
Step 1: Logon to merchant admin, choose “Yes” to “Enable Return URL with IPN”, as shown:-
1. Simple front-end snippet: copy the Javascript (JS) code from merchant admin and paste
it on merchant receipt page (which shows payment success/failed), preferable in the
HTML header, before </head> tag.
2. Advanced back-end scripting: merchant is to echo back all the POST variables with one
additional variable, i.e. “treq” with value 1. PHP sample code is provided below.
URL: https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php
29
Step 3: Merchant to prepare a callback URL script, which is similar to return URL script, in order
to receive consequent payment notification in case merchant system misses the first notification
attempt from MOLPay.
30
Example of back-end IPN script for PHP (combined in return URL script)
<?php
/***********************************************************
* Snippet code in purple color is the enhancement required
* by merchant to add into their return script in order to
* implement backend acknowledge method for IPN
************************************************************/
while ( list($k,$v) = each($_POST) ) {
$postData[]= $k."=".$v;
}
$postdata = implode("&",$postData);
$url = "https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST , 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS , $postdata );
curl_setopt($ch, CURLOPT_URL , $url );
curl_setopt($ch, CURLOPT_HEADER , 1 );
curl_setopt($ch, CURLINFO_HEADER_OUT , TRUE );
curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1 );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , FALSE);
$result = curl_exec( $ch );
curl_close( $ch );
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5( $tranID.$orderid.$status.$domain.$amount.$currency );
$key1 = md5( $paydate.$domain.$key0.$appcode.$vkey );
if( $skey != $key1 ) $status= -1; // Invalid transaction
if ( $status == "00" ) {
if ( check_cart_amt($orderid, $amount) ) {
// write your script here .....
}
} else {
// failure action
}
?>
31
MOLPay Notification
MOLPay notification is back-end instant status update mechanism that send the payment status
notification from MOLPay server to merchant server or system, without relying on any user
agent such as web browser or mobile application.
Notification URL script is similar to return URL script but no output is required for front-end user
interface. This is also known as background URL.
Implementation:
Step 1: Logon to merchant admin and go to merchant profile, fill in the Notification URL.
Notification URL with IPN can be activated for better merchant-payment system communication.
Choose “Yes” to “Enable Notification URL with IPN”, as shown:-
Step 2: Merchant to prepare a notification URL script, which is similar to return URL script.
Step 3: If IPN is disable please ignore this step. Merchant have to echo back all the POST
variables with one additional variable, i.e. “treq” with value 1. PHP sample code is provided
below.
URL: https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php
amount 2 decimal points numeric value The total amount paid or to be paid for CASH
payment request.
appcode alphanumeric, 16 chars Bank approval code. Mandatory for Credit Card.
Certain channel returns empty value.
32
error_code alphanumeric Refer to the Error Codes section.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
Refer s key section for details.
currency 2 or 3 chars (ISO-4217) currency code Default currency is RM (indicating MYR) for
Malaysia channels.
channel predefined string in MOLPay system Channel references for merchant system.
$_POST[treq]= 1; // Additional parameter for IPN. Value always set to 1.
/********************************
*Don't change below parameters
********************************/
$nbcb = $_POST['nbcb'];
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];
/***********************************************************
* Snippet code in purple color is the enhancement required
* by merchant to add into their notification script in order to
* implement backend acknowledge method for IPN
************************************************************/
while ( list($k,$v) = each($_POST) ) {
$postData[]= $k."=".$v;
}
$postdata = implode("&",$postData);
$url = "https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST , 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS , $postdata );
curl_setopt($ch, CURLOPT_URL , $url );
curl_setopt($ch, CURLOPT_HEADER , 1 );
curl_setopt($ch, CURLINFO_HEADER_OUT , TRUE );
curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1 );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , FALSE );
$result = curl_exec( $ch );
curl_close( $ch );
33
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5( $tranID.$orderid.$status.$domain.$amount.$currency );
$key1 = md5( $paydate.$domain.$key0.$appcode.$vkey );
if( $skey != $key1 ) $status= -1; // Invalid transaction
if ( $status == "00" ) {
if ( check_cart_amt($orderid, $amount) ) {
// write your script here .....
}
} else {
// failure action
}
?>
34
MOLPay Callback with IPN
MOLPay Callback is a back-end activity that initiated by MOLPay to notify merchant system
anytime once there are changes on payment status.
Callback URL script is similar to return URL script. Both handling the payment status result;
Unlike the return URL script, callback URL script is to handle defer status update or all other
non-realtime payment status update, such as MOLPay CASH payment.
Merchant must fill the Callback URL in merchant admin in order to get those non-realtime status
update from MOLPay. Callback URL IPN can be activated for better merchant-payment system
communication. Instead of returning all parameters from MOLPay, merchant’s callback script
just need to echo “CBTOKEN:MPSTATOK”, in plaintext, without double quotes or any HTML
tags.
Merchant can actually use the same script for both callback URL & return URL, because it is
only one extra parameter in callback request, in addition to return URL parameters, which is
“nbcb”. Besides, an additional status code, 22 has been introduced for “pending” transaction
status.
Once there is status changed event, MOLPay will POST the following parameters to mechant
callback URL. If MOLPay could not get the actual ACK message from merchant, MOLPay will
retry for maximum 3 times, of 1 hour interval for each attempt.
amount 2 decimal points numeric value The total amount paid or to be paid for CASH
payment request.
35
appcode alphanumeric, 16 chars Bank approval code. Mandatory for Credit Card.
Certain channel returns empty value.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
Refer s key section for details.
currency 2 or 3 chars (ISO-4217) currency code Default currency is RM (indicating MYR) for
Malaysia channels.
channel predefined string in MOLPay system Channel references for merchant system.
$nbcb = $_POST['nbcb'];
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5( $tranID.$orderid.$status.$domain.$amount.$currency );
$key1 = md5( $paydate.$domain.$key0.$appcode.$vkey );
if( $skey != $key1 ) $status= -1; // Invalid transaction
if ( $status == "00" ) {
if ( check_cart_amt($orderid, $amount) ) {
// write your script here .....
}
} else {
// failure action
// write your script here .....
}
if ( $nbcb==1 ) {
//callback IPN feedback to notified MOLPay
echo “ CBTOKEN:MPSTATOK”; exit;
}else{
//normal IPN and redirection
36
}
?>
37
Escrow & Mass Payment APIs
Introduction
MOLPay provides escrow payment service for marketplace platform operator and any C2C
business model that requires a reputable brand or business entity as the middleman to protect
the interests of both seller and buyer, and of course, the operator itself, who is also MOLPay
merchant.
Platform operator can activate escrow indicator for all the transactions under one MOLPay
merchant account, or pass the parameter “is_escrow=1” to the normal payment link. If merchant
implements pre-registration for seller or payee, then merchant can pass the payee ID using
parameter “payee_id” with the appropriate value.
Escrow flag can be used by merchant to control the settlement and hold the funds in MOLPay
account for future disbursement or payout purpose.
38
Mass payment, a.k.a bulk payment, or cash management service, would able to help merchant
or system provider to transfer funds to their agent/reseller/partner from the available balance.
The same service will be used to help marketplace platform operator to distribute the available
balance to the sellers, and to proceed refund to buyer, in case the dispute is unable to resolved.
Mass payment can either be set in merchant admin or passing standing instruction via API.
Merchant can either issue payment to pre-register payees (which normally are the sellers) or
send direct standing instructions without payees registration.
Mass payment can be used to transfer funds to active MOLWallet account, if the payee’s mobile
number and email are matched in MOLWallet user database.
39
Escrow Service API
MOLPay provides a tri-party confirmation or opposition mechanism for platform operator to set
an initial/default status on all “captured” transaction, the buyer, seller, or operator can later
toggle the payment as OK/KO, in order to “hold” or to release the funds for the following
settlement.
Merchant can send this request to make a specific “captured” transaction become escrow
transaction.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/escrow/index.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
txnID integer, 10 digits Unique transaction ID for tracking purpose.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
Response
Variable / Parameter Type Format / Max Length Description / Example
txnID integer, 10 digits Echo of transaction ID
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
40
© 2005 - 2016 MOLPay Sdn Bhd.
All rights reserved. All trademarks are the property of their respective owners.
41
Mass Payment APIs
Payee Profile API
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/MassPayment/payee_profile.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
operator alphanumeric, 32 chars Merchant ID in MOLPay system.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
profile_hash Any encoding string used by operator This is operator or merchant internal encryption
method to ensure the data integrity of payee profile,
MOLPay will echo back without manipulating this
hash key
Response
Variable / Parameter Type Format / Max Length Description / Example
payeeID integer, 10 digits Registered payee ID (seller or buyer)
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
42
Formula of skey & VrfKey
skey =md5( func & operator & profile & profile_hash & SHA1(Verify_Key) )
VrfKey=md5( SHA1(Secret_Key) & payeeID & skey & profile_hash & operator & StatCode )
43
Payee Standing Instruction API
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/MassPayment/SI_by_payee.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
operator alphanumeric, 32 chars Merchant ID in MOLPay system.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
amount integer or up to 2 decimal points The total amount of mass payment could not
numeric value exceed the settlement funds
Response
Variable / Parameter Type Format / Max Length Description / Example
payeeID integer, 10 digits Registered payee ID (seller or buyer)
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
44
Direct Standing Instruction or Payout API
This is one-time payout in MOLPay but merchant can use this to schedule periodical payout
instruction to implement recurring payment.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/MassPayment/direct_SI.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
operator alphanumeric, 32 chars Merchant ID in MOLPay system.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
amount integer or up to 2 decimal points The total amount of mass payment could not
numeric value exceed the settlement funds
notify_url URL This is the URL for merchant to receive payout final
status.
Response
Variable / Parameter Type Format / Max Length Description / Example
skey 32 chars hexadecimal string Echo of skey
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
45
skey =md5( operator & amount & currency & payee & reference_id & notify_url &
SHA1(Verify_Key) )
VrfKey=md5( SHA1(Secret_Key) & skey & operator & StatCode & mass_id & reference_id )
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/MassPayment/requery_SI.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
operator alphanumeric, 32 chars Merchant ID in MOLPay system.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
amount integer or up to 2 decimal points The total amount of mass payment could not
numeric value exceed the settlement funds
Note: * Your may send in either one of this value or both. For both, those values must match with MOLPay record.
Response
Variable / Parameter Type Format / Max Length Description / Example
skey 32 chars hexadecimal string Echo of skey
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
46
MERCHANT REQUEST APIs
MOLPay has prepared plenty of merchant tools for merchant to initiate status requery and
cancellation/void of transaction. However, merchant is not allowed send in these request too
frequent (maximum 1 query every 5 minutes). Massive incoming query will lead to IP blocking.
1. Direct Status Requery - merchant send status query to processing bank directly
47
Direct Status Requery
This will trigger a query to the payment channel or bank status server and there are cases that bank status
server is not in-sync with its payment server that might give different result, that leads to a defer update and
will trigger a callback from MOLPay server, once the status is synced and changed.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/gate-query/index.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
amount 2 decimal points numeric value The payment amount
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
Response
Variable / Parameter Type Format / Max Length Description / Example
Amount 2 decimal points numeric value The payment amount
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
48
Example of Direct Status Requery for PHP
<?php
echo “<a
href='https://www.onlinepayment.com.my/MOLPay/API/gate-query/index.php?amount=3899&txID=6523
4&domain=shopA&skey=e1c4c60c99116fffc3ce77bd5fd0f7b1'>
Check payment status for tran ID 65234 </a> ”;
?>
Example of response
type=0 (default output, plain text with linebreaks) type=1 (POST result sent to URL)
StatCode: 00 $_POST [StatCode] = “00”;
StatName: captured $_POST [StatName] = “captured”;
TranID: 65234 $_POST [TranID] = “65234”;
Amount: 3899.00 $_POST [Amount] = “3899.00”;
Domain: shopA $_POST [Domain] = “shopA”;
VrfKey: 456cf69e5bddfe8ed47371096 $_POST[VrfKey:]= “456cf69e5bddfe8ed47371096”;
49
Indirect Status Requery
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
Response
Variable / Parameter Type Format / Max Length Description / Example
TranID integer, 10 digits Unique transaction ID for tracking purpose.
50
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
format optional, 1-digit integer, apply for type=1 0 = result string with delimiter ( | )
only 1 = result in array
Response
Variable / Parameter Type Format / Max Length Description / Example
TranID integer, 10 digits Unique transaction ID for tracking purpose.
51
StatCode 2-digit numeric 00 = Success
11 = Failure
22 = Pending
Formula of skey
skey =md5( oID & domain & Verify_Key )
52
Example of response
type=0, TranID BillingDate StatCode StatName Amount BillingName
plain text output, 418607 2009-11-26 22 pending 25.00 Lenka
newline with TAB 418603 2009-11-26 00 captured 125.10 Mika
character 418583 2009-11-26 00 captured 71.10 Ciara
53
4. Query by multiple order ID (batch output)
Request
URL: https://www.onlinepayment.com.my/MOLPay/query/q_by_oids.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
oIDs alphanumeric, up to 100 orders Merchant order ID, must be URLencoded.
delimiter single character, default is “|” Avoid using any symbol that might exist in order ID,
and also any of these: “,%, *, <, >, ? , \, $, &, =
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
format optional, 1-digit integer, apply for type=1 0 = result string with delimiter ( | )
only 1 = result in array
Response
Variable / Parameter Type Format / Max Length Description / Example
TranID integer, 10 digits Unique transaction ID for tracking purpose.
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
54
5. Query by multiple transaction ID (batch output)
Request
URL: https://www.onlinepayment.com.my/MOLPay/query/q_by_tids.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
tIDs concatenated transaction ID with “|” up A group of transaction ID, must be URLencoded.
to 100 items
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
format optional, 1-digit integer, apply for type=1 0 = result string with delimiter ( | )
only 1 = result in array
Response
Variable / Parameter Type Format / Max Length Description / Example
TranID integer, 10 digits Unique transaction ID for tracking purpose.
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
55
Daily Transaction Report (Reconciliation)
MOLPay Daily Transaction Report provides merchant end-of-day (EoD) reconciliation or to
verify all transactions for a specific date.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/PSQ/psq-daily.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
merchantID alphanumeric, 32 chars Merchant ID in MOLPay system.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
Formula of skey
Response
(plain text with newline & TAB characters)
Variable / Parameter Type Format / Max Length Description / Example
BillingDate Date/Time (YYYY-MM-DD HH:mm:ss) Transaction date/time
Channel Predefined string in MOLPay system Channel references for merchant system.
56
Settlement Report (Reconciliation)
MOLPay Settlement Report provides merchant the fund transfer or balance clearance and
settlement reconciliation for a specific date.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/settlement/report.php
Method: GET
Variable / Parameter Type Format / Max Length Description / Example
version Integer, Default value is 1.0. Indicate version of the API. Current version is 2.0. If
not specify, version 1.0 will be use.
token 32 chars hexadecimal string This is the data integrity protection hash string
download optional, set to “y” if Download option is only available for CSV format
Formula of token
token =md5( merchantID & Verify_Key & date )
Response
Field with * only available in 2.0
total settlement amount numeric without decimal and comma 5331674 is equal to 53,316.74 in that currency
total settlement fees numeric without decimal and comma Sum of the transfer fees and 3rd party costs
total transaction amount* numeric without decimal and comma Sum of settled transactions amount
Total transaction GST* numeric without decimal and comma Sum of settled transactions GST amount
bank account alpha-numeric Bank swift code and bank account number
total refund amount* numeric without decimal and comma Sum of the refund and chargeback amount
Total refund GST* numeric without decimal and comma Sum of the refund and chargeback GST amount
57
Variable / Parameter Type Format / Max Length Description / Example
D 1 character Data or the content
Forex Rate* numeric without 8 digit decimal and Forex rate for multi currency transaction. Eg:
comma 1.00000000 = 100000000
Settlement amount numeric This should equal the original transaction amount
minus the fee or commission (calculate first, then
round to two digits after the decimal point).
Settlement amount* numeric This should equal the original transaction amount
minus the fee or commission (calculate first, then
round to two digits after the decimal point).
58
success false
amount 2 decimal points numeric value The total amount paid or to be paid.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
59
Reversal Request
Merchant can request a reversal of transaction for a “captured” credit card and POS Terminal
payment. For card payment, the transaction can be “void” immediately on the same day before
the bank settlement. Otherwise this API will accept refund request for transaction that happens
within 3 days and the refund or cancellation process will take about 7-14 days after the request
sent. Please note that this API is to send refund request, but not getting the status of refund
process.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/refundAPI/refund.php
Method: POST or GET
Variable / Parameter Type Format / Max Length Description / Example
txnID integer, 10 digits Unique transaction ID for tracking purpose.
skey 32 chars hexadecimal string This is the data integrity protection hash string.
url optional, URL for POST response The URL to receive POST response from MOLPay
Response
Variable / Parameter Type Format / Max Length Description / Example
TranID integer, 10 digits Unique transaction ID for tracking purpose.
VrfKey 32 chars hexadecimal string This is the data integrity protection hash string.
60
The following partial refund related features are only available for limited merchants and
channels only.
Partial Refund
Merchant can request partial refund for a “captured” or “settled” transaction. The refund process
will take about 7-14 days after the request sent.
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/refundAPI/index.php
Method: POST or GET
No Field Name Data Type(Size) M/O Description
6 BankCode a{8} C Applicable for Online Banking and Physical Payment transaction
only. (Refer to predefined bank lists)
7 BeneficiaryName as{1..100} C Applicable for Online Banking and Physical Payment transaction
only.
8 BeneficiaryAccNo as{1..100} C Applicable for Online Banking and Physical Payment transaction
only.
10 mdr_flag n{1} O This is to include or exclude MDR refund to buyer if the amount
is same as bill amount.
Available value is as below:
0 - Include MDR/Full Refund (Default)
1 - Exclude/Reserved MDR
Response
MOLPay responds JSON format to merchant upon a successful request (positive result)
No Field Name Data Type(Size) M/O Description
61
4 RefundID n{1..100} M Refund ID provided by MOLPay
Signature = md5( $RefundType . $MerchantID . $RefID . $RefundID . $TxnID . $Amount . $Status . $secret_key );
MOLPay will respond the following in JSON format once error occurs (negative result)
(insert table here)
No Field Name Data Type(Size) Description
Request
URL: https://www.onlinepayment.com.my/MOLPay/API/refundAPI/q_by_txn.php
Method: POST or GET
No Field Name Data Type(Size) M/O Description
Response
MOLPay responds JSON format to merchant upon a successful request (positive result)
No Field Name Data Type(Size) M/O Description
62
5 LastUpdate ans{1..255} M Last update timestamp.
1 a Letters, A-Za-z
2 n Numbers, 0-9
3 s Symbols, .:|?*,!&_-
1 M Mandatory field.
2 O Optional field.
3 C Conditional field.
63
14 PR014 Bank information is mandatory for non-credit channel transaction.
64
ERROR CODES
Payment Page
Error Code Description
P01 Timeout
P02 Your transaction has been denied due to merchant account issue.
Payment channel is not available for merchant.
P06 System is busy now, temporary out of services. Please try again later.
P10 Sorry, Your Credit Card Number or CVV or expiration date is not valid
P11 Amount return from bank not match with MOLPay system.
P990 Sorry, we're not able to process your request now. You may close this window.
65
Due to one of the reason: country restriction, blacklist, exceeds transaction limit
3DS Error
Error Code Description
P3011 This merchant only allows 3DS card
66
Payment Status Query (PSQ) Error
Error Code Description
Q99 Service blocked due to massive connection. Please send only 1 request every
5 minutes.
Error in Escrow
Error Code Description
1001 Missing Parameter.
67
1002 Operator not exist.
68
Error Codes in Channel
MOLPay will add a the following prefix to all credit card and certain internet banking error codes
Credit Card (Paymex, MIGS, etc) CC_
101 Invalid field passed to 3D Merchant needs to check error description to find out what is
Secure MPI wrong with the field. Authorization/Authentication not carried out.
201 Invalid ACS response Retry the transaction. If error persists, contact issuing bank.
format. Transaction is
aborted.
203 3D PaRes has invalid Retry the transaction. If error persists, contact issuing bank.
signature. Transaction is
aborted
300 Transaction not approved Transaction has failed authorization, e.g. due to insufficient credit,
invalid card number, etc.
The actual response code provided by acquiring host can be
found via the View Transaction History web page available to
merchants.
301 Record not found ● Merchant/User has submitted a transaction with invalid
purchase ID
● Merchant/User tried to reverse a previously declined
transaction
302 Transaction not allowed ● Purchase ID not unique due to mismatched card
number and/or transaction amount
● System unable to process reversal due to transaction
has been settled
● System unable to process reversal due to transaction
type is CAPS
● System unable to process previously voided transaction
69
303 Invalid Merchant ID Not a valid merchant account
305 Merchant password is not The error code will be returned if merchant password is not
available available during the VISA 3D authentication,
306 Merchant exceeded count The error code will be returned if the merchant daily transaction
limit count exceeded the predefined daily transaction count limit.
307 Merchant exceeded amount The error code will be returned if the merchant daily transaction
limit amount exceeded the predefined daily transaction amount limit.
308 Merchant exceeded group The error code will be returned if the merchant transaction
count limit exceeded the predefined merchant organization transaction count
limit.
309 Merchant exceeded group The error code will be returned if the merchant transaction
amount limit exceeded the predefined merchant organization transaction
amount limit.
310 Request signature is not The PX_SIG is not append on the PxReq message or PX_SIG is
available blank
311 Request signature The signature of the PxReq is not match with the PxReq message
verification failed
900 3D Transaction timeout Timeout of 3D transaction due to late response from Issuer ACS,
after the predefined 3D timeout set in the application.
901 System Error System unable to complete transaction. Merchant to report error
to acquiring bank.
903 Pxtems no response Transaction has failed to get response from MPI links. The
service not available due to:
● Database connection error
● Network connection error
Host Error
00 | Successful approval/completion or that V.I.P. PIN verification is valid
01 | Refer to card issuer
02 | Refer to card issuer, special condition
03 | Invalid merchant or service provider
04 | Pickup card
05 | Do not honor / Incorrect CVV or 3D password
06 | Error
07 | Pickup card, special condition (other than lost/stolen card)
10 | Partial Approval-Private label
11 | V.I.P. approval
12 | Invalid transaction
13 | Invalid amount (currency conversion field overflow. Visa Cash-invalid
load mount)
14 | Invalid account number (no such number)
15 | No such issuer
19 | Re-enter transaction
21 | No action taken (unable to back out prior transaction)
25 | Unable to locate record in file, or account number is missing from the
inquiry
28 | File is temporarily unavailable
41 | Pickup card (lost card)
43 | Pickup card (stolen card)
51 | Insufficient funds
70
52 | No checking account
53 | No savings account
54 | Expired card
55 | Incorrect PIN (Visa Cash-invalid or missing S1 signature)
57 | Transaction not permitted to cardholder (Visa Cash-incorrect routing,
not a load request)
58 | Transaction not allowed at terminal
59 | Suspected fraud"; break;
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 Reference
number)
77 | Previous message located for a repeat or reversal, but repeat or
reversal data are in consistent with original message
80 | Invalid date (For use in private label card transactions and check
acceptance transactions)
81 | PIN cryptographic error found (error found by VIC security module
during PIN decryption)
82 | Incorrect CVV/iCVV
83 | Unable to verify PIN
85 | No reason to decline a request for account number verification or
address verification
91 | Issuer unavailable or switch inoperative (STIP not applicable or
available for this transaction)
92 | Destination cannot be found for routing
93 | Transaction cannot be completed; violation of law
96 | System malfunction System malfunction or certain field error conditions
N0 | Force STIP
N3 | Cash service not available
N4 | Cash request exceeds issuer limit
N7 | Decline for CVV2 failure
P2 | Invalid biller information
P5 | PIN Change/Unblock request declined
P6 | Unsafe PIN
0 | Transaction Successful
? | Transaction status is unknown
1 | Unknown Error
2 | Bank Declined Transaction
3 | No Reply from Bank
4 | Expired Card
5 | Insufficient funds
6 | Error Communicating with Bank
7 | Payment Server System Error
8 | Transaction Type Not Supported
9 | Bank declined transaction (Do not contact Bank)
A | Transaction Aborted
C | Transaction Cancelled
D | Deferred transaction has been received and is awaiting processing
F | 3D Secure Authentication failed
I | Card Security Code verification failed
L | Shopping Transaction Locked (Please try the transaction again later)
N | Cardholder is not enrolled in Authentication scheme
P | Transaction has been received by the Payment Adaptor and is being
processed
R | Transaction was not processed - Reached limit of retry attempts allowed
S | Duplicate SessionID (OrderInfo)
T | Address Verification Failed
U | Card Security Code Failed
V | Address Verification and Card Security Code Failed
71
Y | The cardholder was successfully authenticated.
E | The cardholder is not enrolled.
N | The cardholder was not verified.
U | The cardholder's Issuer was unable to authenticate due to some system
error at the Issuer.
F | There was an error in the format of the request from the merchant.
A | Authentication of your Merchant ID and Password to the ACS Directory
Failed.
D | Error communicating with the Directory Server.
C | The card type is not supported for authentication.
S | The signature on the response received from the Issuer could not be
validated.
P | Error parsing input from Issuer.
I | Internal Payment Server system error.
05 | Fully Authenticated
06 | Not authenticated (cardholder not participating), liability shift
07 | Not authenticated due to a system problem
00 | Approved
03 | Invalid Merchant
05 | Seller Account Closed
12 | Invalid Transaction
13 | Invalid Amount
14 | Invalid Buyer Account
20 | Invalid Response
30 | Transaction Not Supported For Model Or Format Error
31 | Invalid Bank
39 | No Credit Bank
45 | Duplicate Seller Order Number
46 | Invalid Seller Exchange Or Seller
47 | Invalid Currency
48 | Transaction Limit Exceeded
51 | Insufficient Funds
53 | No Saving Account
57 | Transaction Not Permitted
61 | Withdrawal Limit Exceeded
65 | Withdrawal Frequency Exceeded
70 | Invalid Serial Number
72 | Duplicate Exchange Order Number
76 | Transaction Not Found
77 | Invalid Buyer Name Or Buyer Id
78 | Decryption Failed
79 | Host Decline When Down
80 | Buyer Cancel Transaction
83 | Invalid Transaction Model
84 | Invalid Transaction Type
85 | Internal Error At Bank System
87 | Debit Failed Exception Handling
88 | Credit Failed Exception Handling
89 | Transaction Not Received Exception Handling
93 | Transaction Cannot Be Completed
96 | System Malfunction
98 | MAC Error
99 | Pending for Authorization (Applies to B2B model)
FE | Internal Error
BC | Transaction Cancelled By Customer
OE | Transaction Rejected As Not In FPX Operating Hours (7 AM To 11 PM)
OF | Transaction Timeout
OA | Session Timeout at FPX Entry Page
SB | Invalid Seller Bank Code
XA | Invalid Source IP Address For B2B Model 2 Transactions
72
XE | Invalid Message
XM | Invalid FPX Transaction Model
XN | Transaction Rejected Due To Duplicate Seller Exchange Order Number
XO | Duplicate Exchange Order Number
XS | Seller Does Not Belong To Exchange
XC | Seller Exchange Encryption Error
XI | Invalid Seller Exchange
XB | Invalid Seller Exchange IP
XF | Invalid Number Of Orders
XT | Invalid Transaction Type
XW | Seller Exchange Date Difference Exceeded
1A | Buyer Session Timeout at IB Login Page
1B | Buyer failed to provide the necessary info to login to IB Login page
1C | Buyer choose cancel at Login Page
1D | Buyer session timeout at Account Selection Page
1E | Buyer failed to provide the necessary info at Account Selection Page
1F | Buyer choose cancel at Account Selection Page
1G | Buyer session timeout at TAC Request Page
1H | Buyer failed to provide the necessary info at TAC Request Page
1I | Buyer choose cancel at TAC Request Page
1J | Buyer session timeout at Confirmation Page
1K | Buyer failed to provide the necessary info at Confirmation Page
1L | Buyer choose cancel at Confirmation Page
2A | Transaction Amount Is Lower Than Minimum Limit
Alipay
BCard
73
05 PIN Changed Fail
06 Card Is Blocked
07 Card Is Expired
08 Principal Is Currently A Supplementary
09 Supplementary Is Currently A Principal
10 Supplementary Is Already A Supplementary
11 Merge Own Card
12 Transaction Record Does Not Exists/ Invalid Transaction ID
13 Transaction Already Voided
14 Transaction Already Reversed
15 Transaction record more than one or not found
16 Invalid point/amount/bill no
18 Invalid category
19 Card not registered
20 Duplicate Data
21 Web Service Key already setup
22 Invalid Web Service Key
23 Invalid IC
24 Invalid Name
25 Invalid Operation/adjustment
26 Invalid STAN No/ Offline ID
27 Invalid Staff
29 Invalid Date
98 Unexpected Erro r
99 Server Exception
CIMB-Clicks
00 APPROVED OR COMPLETED
01 REFER TO CARD ISSUER
03 INVALID MERCHANT
04 CAPTURE CARD
05 DO NOT HONOR
12 INVALID TRANSACTION
13 INVALID AMOUNT
14 INVALID CARD NUMBER
15 INVALID ISSUER
30 FORMAT ERROR
41 LOST CARD
43 STOLEN CARD
51 INSUFFICIENT FUNDS
52 NO CURRENT ACCOUNT
53 NO SAVING ACCOUNT
54 EXPIRED CARD
55 INVALID PIN
57 TRANSACTION NOT PERMITTED ISS
58 TRANSACTION NOT PERMITTED ACQ
59 SUSPECTED FRAUD
61 EXCEEDS WITHDRAWAL LIMITS
62 RESTRICTED CARD
63 SECURITY VIOLATION
65 EXCEEDS WITHDRAWAL COUNT LIMIT
68 LATE RESPONSE
75 ALLOWABLE PIN TRIES EXCEEDED
80 FORCE PIN CHANGE
81 FORCE PRE-REGISTERED PIN CHANGE
91 SWITCH OR ISSUER INOPERATIVE
92 UNABLE TO ROUTE TRANSACTION
94 DUPLICATE TRANSACTION DETECTED
96 SYSTEM ERROR/ MALFUNCTION/VALIDATION ERROR
Dragonpay
000 Success
74
101 Invalid payment gateway id
102 Incorrect secret key
103 Invalid reference number
104 Unauthorized access
105 Invalid token
106 Currency not supported
107 Transaction cancelled
108 Insufficient funds
109 Transaction limit exceeded
110 Error in operation
111 Invalid parameters
201 Invalid Merchant Id
202 Invalid Merchant Password
eNets Debit
“For the online transaction status query feature, the response returned to the
merchant is in the format of <stage>_<responsecode>.”
20002 Data Validation Error Invalid data sent from either party
The bank will not proceed with the
transaction and will initiate a reversal.
It will inform customer the transaction is
unsuccessful.
75
Notification Acknowledgement Message, DBS
will have to initiate a reversal of the
transaction.
76
30004 Signature Error Unable to verify Merchant signature due to
different keys used.
Merchant to check that the public key sent
to the
Gateway is correct.
30013 Bank ID not enabled Fill in the problem log and escalate to
eNETS.
77
Debit) FXmicropay
40004 Unable to verify Bank The Gateway will not accept the message.
Signature. Check with the respective bank.
78
40011 Transaction timeout The Gateway has no response in specified
time.
Check Gateway itself and link between
Gateway and bank.
40098 Transaction is not in Stage response code does not align with the
a valid state for transaction status.
this action. Check gateway database
50001 Registry Access Error Fill in the problem log and escalate to
eNETS
50002 Database Access Error Fill in the problem log and escalate to
eNETS
50003 Page forward Error Fill in the problem log and escalate to
eNETS
60001 Unable to get the CRL Fill in the problem log and escalate to
eNETS.
60002 Unable to send email Fill in the problem log and escalate to
to Administrator eNETS.
79
revoked flag in
database for Banks
80001 Error loading data Fill in the problem log and escalate to
into context eNETS.
90001 Invalid URL for Fill in the problem log and escalate to
reloading data into eNETS.
context
80
1035 Invalid UMID
Gift Card
0 Success
1 Failure
2 Invalid ESN
4 System Error
7 Invalid Request
8 Card Redeemed
9 Invalid Card
10 Card Deactivated
11 Card Suspended
12 Card Activated
13 Invalid Account
14 No Previous Action
15 Card is Active
16 Card is Deactivated
17 Card is Redeemed
19 Card Locked
20 Delayed Redemption
22 Invalid XML
23 Network Error
24 Invalid PIN
25 Declined
81
28 Card Expired
29 Card Stolen
30 Card Lost
31 Card Damaged
32 Card Pending
33 PIN Redeemed
34 Invalid/Inactive PIN
35 Card In Use
36 Already Reversed
37 Not Reversible
40 Pin Locked
41 Suspected Fraud
42 Format Error
45 Card is Pending
46 Card is Suspended
47 Card is Expired
48 Card is Stolen
49 Card is Lost
50 Card is Damaged
82
CurrencyMismatch The CustomerCurrency specified in the request
did not match the Currency associated with the
specified GoInterpay rate offer.
83
GoInterpay suspects that the order is
fraudulent and/or represents too high a risk
to proceed with processing.
84
054999 Double attempt
00001H Buyer failed to provide the necessary info at TAC Request Page
85
00001L Buyer choose cancel at Confirmation Page
000 Success
100 Invalid merchant ID
101 Empty merchant ID
102 Empty amount
103 Invalid amount (not approved string,dot and comma )
104 Empty orderid
105 Empty bill_name
106 bill_email
107 Empty bill_mobile
108 Empty bill_desc
109 Empty vcode
110 Invalid Authentication Key
111 Empty due_time
113 Invalid
MOLPoints
86
40104 Channel Id not permitted.
PEx Plus
00000 Successful.
87
PEx+.ERR_PAYMENT.10105 The Payment Transaction is invalid. Please try again.
[10105]
Poli Payment
1003 Invalid Merchant Code The merchant code specified in the request
does not exist in the database.
There may be an error in the
implementation of POLi™. Check your web
services.
88
corresponds to a merchant that is
inactive.
There may be an error in the
implementation of POLi™. Check your web
services.
1007 Invalid Currency Code The specified currency code does not exist
in the database.
There may be an error in the
implementation of POLi™. Check your web
services.
89
specify the limit.
1015 Invalid timeout value The specified timeout value is less than
the system minimum timeout value.
may be an error in the implementation of
POLi™. Check your web services.
1016 The transaction has The transaction being enquired upon has
expired lapsed past the 15min enquiry window.
Use the Merchant Console to attain the
outcome of this transaction.
90
services.
1023 Invalid Field Length The specified field has an invalid length.
There may be an error in the
implementation of POLi™. Check your web
services.
1025 Invalid Field Range The value in the field is out of the
allowable range.
There may be an error in the
implementation of POLi™. Check your web
services.
91
NOTE: This error should never be returned
to a Merchant. If it does then please
inform Centricom
2021 Invalid Payment The amount being paid is not equal to the
Amount transaction amount.
The user’s locale can affect the way that
currency amounts are displayed on the
screen. For example, a German locale may
display the amount with a comma rather
than a decimal point. This affects the way
that POLi™ interprets the amount and may
result in a failure. Setting the locale to
En-AU, En-US, or En-GB will rectify this
issue.
8005 Invalid Field Length The specified field has an invalid length.
There may be an error in the
implementation of POLi™. Check your web
services.
8007 Invalid Field Range The value in the field is out of the
allowable range.
There may be an error in the
implementation of POLi™. Check your web
services.
92
11002 Unable to Send Nudge A nudge sent to the merchant has failed.
The Nudge Notification URL may be publicly
inaccessible or the destination is down or
it takes too long to respond.
12011 Request Type Length Request Type length exceeds maximum number
of characters allowed.
Provide a Request Type with a valid
length.
93
Provide Customer Reference with a valid
value.
UnionPay
00 Payment is successful.
01 Refer to card issuer.
03 Invalid merchant.
05 Merchant or seller account closed.
06 Issuer card is expired.
09 Request in progress.
12 Invalid transaction.
13 Invalid amount.
14 Invalid buyer account or card information.
17 Buyer cancel transaction.
22 Suspected malfunction.
25 Failure to search an original transaction.
30 Format error or MAC error.
31 Invalid bank.
39 No credit account.
51 Insufficient fund.
53 No saving account.
57 Transaction not permitted.
61 Withdrawal limit exceeded.
65 Withdrawal frequency exceeded.
76 Transaction not found.
77 Invalid buyer name or buyer Id.
79 Host decline when down.
85 Internal error at bank’s system.
87 Debit failed (exception handling).
88 Credit failed (exception handling).
89 Transaction not received (exception handling).
94
92 Financial institution or intermediate network facility cannot be found for
routing.
93 Transaction cannot be completed.
FE Internal error.
OE Transaction rejected as not in operating hours.
OF Transaction timeout.
OA Session timeout.
1A Buyer session timeout at bank login page.
1B Buyer failed to provide the necessary info to login to bank login page.
1C Buyer choose cancel at login page.
1D Buyer session timeout at account selection page.
1E Buyer failed to provide the necessary info at account selection page.
1F Buyer choose cancel at account selection page.
1G Buyer session timeout at TAC request page.
1H Buyer failed to provide the necessary info at TAC request page.
1I Buyer choose cancel at TAC request page.
1J Buyer session timeout at confirmation page.
1K Buyer failed to provide the necessary info at confirmation page.
1L Buyer choose cancel at confirmation page.
2A Transaction amount is lower than minimum limit.
Paysbuy
Error Code Description Action / Remark
95
RESOURCES
Mobile SDK/XDK
MOLPay is now ready to be integrated into your mobile apps. We have released Mobile SDK
and XDK library on GitHub and BitBucket. To apply this, kindly contact [email protected]
and provide your MOLPay Merchant ID or Company name, Platform (iOS/Android), Apps Name
in order to register and authorize 3rd party app in MOLPay system.
ISO References
http://www.iso.org/iso/country_codes.htm
http://en.wikipedia.org/wiki/ISO_3166-1
http://www.iso.org/iso/currency_codes
http://en.wikipedia.org/wiki/ISO_4217
96
Predefined Bank Lists (Updated on 06th Jan 2015)
Bank Code Bank Name CA/SA & Credit Card Loan H/P
ABNAMYKL THE ROYAL BANK OF SCOTLAND BHD Personal 7,9, Corp. CA 7,9,10
97
CITIMYKL CITIBANK BHD Personal 10, Corp. CA 9-16, Y 10-14
ICBKMYKL INDUSTRIAL & COMM. BANK OF CHINA (M) BHD 17/19 17/19
98
MFBBMYKL ALLIANCE BANK MALAYSIA BHD 15, Y 15 15
99
Settlement/FTT Country & Currency Lists (Updated on 11th Sep 2014)
United States USD
Denmark DKK
Switzerland CHF
100