(Official) Razer Direct Server API v1.6.9
(Official) Razer Direct Server API v1.6.9
(Version 1.6.9)
merchant.razer.com
Social Networks
https://twitter.com/Razer_MS
https://facebook.com/RazerMerchantServices
https://youtube.com/c/RazerMerchantServices
https://instagram.com/RazerMerchantServices
https://linkedin.com/company/RazerMerchantServices
Developer Platforms
https://github.com/RazerMerchantServices
Mobile XDK, seamless and inpage checkout, and many shopping carts
payment plugin/module/addon/extension are available
1
Revision History
Date Version Author(s) Description
2
Cont. Revision History
21/04/2022 1.6.2 Adryn Adding Direct Card Scheme Channel
3
Table of Contents
Introduction
Direct Server API Flow
ERROR CODES
4
Introduction
Direct Server API (previously known as Seamless Payment API) allows merchants to initiate
payment requests through post data. Merchant will redirect the customer/user based on the url
response back to the merchant site. Merchant will be required to initiate direct status inquiry
once user redirects from channel to merchant application.
If a merchant is to obtain credit card data directly from the buyer (not entering on bank or the
payment gateway hosted page or URL), then the merchant must be PCI-DSS compliant in order
to proceed. Otherwise assessment fee might be imposed by the brands, i.e. Visa or
MasterCard.
This is a server-to-server call API that merchants or developers will have more control on the
checkout experience and need to manage on the frontend user interface. Improper integration
might cause higher drop rate on the channel.
For payment status notification, payment status query, and other functional API calls, please
refer to the official API document.
5
Direct Server API Flow
6
Payment Request Parameters (Merchant to PG)
Merchant sends HTTPs POST payment request parameter to the payment gateway.
TxnChannelExt ans{1..128} O Parameters that will be sent to channel gateway (Refer to Channel
API Spec).
Must be in key:value format. Separated by comma (,)
Eg: “param1:value1,param2:value2”
CustContact ans(1..32) O Customer contact no. (Merchant can request it as mandatory upon
request. Please email your request to [email protected])
7
CC_MONTH n{2} O For credit-channel only. Valid Month (Except CREDITW)
Eg :
Mastercard Visa
02 05
01 06
00 07
non_3DS n{1} C Applicable to card processing via specific processor using specific
currency for pre-approved partner only.
Equal to 0 by default and 1 for non-3DS transaction
is_DDA n{1} C Indicator for DirectDebit e-Mandate transaction. Valid values are:-
8
Mandatory for DirectDebit e-Mandate (DDA or the enrollment
transaction). Valid values are:-
1 : New IC Number
2 : Old IC Number
3 : Passport Number
4 : Business Registration
split_info ans{1..200} C Used for “Alipay Split Payment”. Values with pipe ( | ) as data
delimiter and comma ( , ) as recipient separator as the format shown
below without ‘<’ and ‘>’:-
<Alipay_userID>|<amount>|<currency>|<description>,
<Alipay_userID>|<amount>|<currency>|<description>
CashWaittime n{1..2} O For cash payment only. To specify the transaction timeout, this will
overwrite the default cash timeout setting.
Eg. 12 [HOUR]
UserAgent ans{1..200} O Developers may pass in the HTTP header User-Agent string from the
client. This will help optimize the e-wallet In-App payment experience.
AppDeeplink ans{1..128} O Mobile deeplink/universal link that allows e-wallet In-App payment
GooglePay array C The response of the whole Google Pay payload needs to be provided
to the payment gateway to perform authorization
ApplePay ans{1.300} C The response of the encrypted token from Apple Pay needs to be
provided to the payment gateway to perform authorization.
For direct app integration with Apple Pay. Need to pass in Method =
app.
9
TxnChannelExt
10
Payment Response Parameters (PG to Merchant)
Payment gateway will return a response in json format to the merchant. Please take note that this is NOT
the payment status result.
TxnData
No Field Name Data Type M/O/C Description
(Size)
Note: RequestType RESPONSE is the final result of that payment and no further action required.
11
SAMPLE - Payment Response
12
ERROR CODES
Please refer to API Spec for Merchant (section ERROR CODES)
13
Payment Status Notification
Please refer to the same section name in the official API document. Merchants will need to
implement at least 2 endpoints (notification URL and callback URL, both with IPN or ACK
function). Tokenized card/DDA data will be returned in extraP parameter.
WARNING: Please note that multiple payment notifications (either from return URL, notification
URL or callback URL) for a single transaction is possible but this does not mean that the buyer
has paid twice or multiple times. Kindly ensure the IDEMPOTENT of your API design.
14
Enabling Apple Pay
Requirements
1) Merchant needs to create a directory path called .well-known. Download and place the
file (apple-developer-merchantid-domain-association) at the following directory
a) Request the file from our operation team [email protected]
b) Download from RMS merchant portal: https://portal.merchant.razer.com/[TBA]
c) Download from RMS github: https://github.com/RazerMS/[TBA]
2) Kindly do not alter the filename and follow the following path example:
https://www.example.com/.well-known/apple-developer-merchantid-domain-association
3) Apple will verify the following path in order for us to successfully onboard you as a
merchant
4) Kindly check with operation that your merchantID has already been onboarded and
enabled to use Apple Pay
5) Follow the example below to begin an Apple Pay session by including the necessary
JavaScript library and HTML attributes
a) Must include these JS files
i) https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js
ii) https://pay.merchant.razer.com/RMS/ApplePay/xdk.js
b) Refer here this section for the available parameters to create a payment request.
6) Apple Pay is only accepted in iOS applications in iOS 10 and above, and on the web in
Safari starting with iOS 10 or macOS Sierra
15
Examples
Frontend example to display the Apple Pay button
<?php
// vcode formula
$vcode = md5( $amount.$merchantID.$orderid.$verifykey );
?>
<script src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"></script>
<script src=”https://pay.merchant.razer.com/RMS/ApplePay/xdk.js”></script>
<style>
apple-pay-button {
--apple-pay-button-width: 240px;
--apple-pay-button-height: 40px;
--apple-pay-button-border-radius: 3px;
--apple-pay-button-padding: 0px 0px;
--apple-pay-button-box-sizing: border-box;
}
</style>
<script type="text/javascript">
if (window.ApplePaySession) {
var merchantIdentifier = 'merchant.comrazermerchant.pay';
16
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
17
Steps
2) Once a user clicks on the Apple Pay button, makePayment function will be triggered. User
will be authenticated and at the same time merchant validation will take place at the
backend.
3) After a successful user authentication, a payment authorization will take place via the
payment request endpoint.
4) Payment sheet will display a success or fail message based on the response of the
authorization.
5) User will be redirected back to the merchant's return page once the payment sheet closes.
18
Appendix A : Data Type Details
No Code Description
1 a Letter, A-Za-z
2 n Numbers, 0-9
1 M Mandatory field.
2 O Optional field.
3 C Conditional field.
19
Appendix C: Channel Details
Country, Currency, Type
Channel Value of request & Display Name RequestMethod Rcommended Min Amount
response RequestType
MY/SG, MYR/SGD, EW
MY, MYR, EW
20
Bcard Points POINT-BCARD BCARD POST REDIRECT > 1.00
MY/SG/ID/TH/VN/PH/CN, MYR/SGD/IDR/THB/VND/PHP/CNY, EW
MY/SG/CN, MYR/SGD/USD/RMB/CNY, EW
MY, MYR, IB
FPX SCB FPX_SCB Stand Chart Bank POST REDIRECT > 1.00
21
FPX_KFH FPX_KFH Kuwait Finance POST REDIRECT > 1.00
House
22
RPP_RTP_R RPP_RTP_RHB DuitNow OBW - RHB POST REDIRECT > 1.00
HB Bank
Affin Bank FPX_B2B_ABB Affin Bank (B2B) POST REDIRECT > 2.00
(B2B)
Alliance Bank FPX_B2B_ABMB Alliance Bank (B2B) POST REDIRECT > 2.00
(B2B)
Bank Islam FPX_B2B_BIMB Bank Islam (B2B) POST REDIRECT > 2.00
(B2B)
CIMB Bank FPX_B2B_CIMB CIMB Bank (B2B) POST REDIRECT > 2.00
(B2B)
OCBC Bank FPX_B2B_OCBC OCBC Bank (B2B) POST REDIRECT > 2.00
(B2B)
Public Bank FPX_B2B_PBB Public Bank (B2B) POST REDIRECT > 2.00
(B2B)
RHB Bank FPX_B2B_RHB RHB Bank (B2B) POST REDIRECT > 2.00
(B2B)
UOB Bank FPX_B2B_UOB UOB Bank (B2B) POST REDIRECT > 2.00
(B2B)
BNP Paribas FPX_B2B_BNP BNP Paribas Bank POST REDIRECT > 2.00
Bank (B2B) (B2B)
23
Agrobank FPX_B2B_AGROBANK Agrobank (B2B) POST REDIRECT > 2.00
(B2B)
24
Ambank-eBP AMBANK-eBPG-PW Visa/MasterCard POST REDIRECT > 1.00
G (Payment
Window)
TH, THB, IB
KTB (fees on KTB_IB_U Krung Thai Bank POST REDIRECT > 1.00
buyer)
KTB Bank via OMISE_KTB Krung Thai Bank GET REDIRECT > 20.00
OMISE
BBL Bank via OMISE_BBL Bangkok Bank GET REDIRECT > 20.00
OMISE
BAY Bank via OMISE_BAY Krungsri Bank GET REDIRECT > 20.00
OMISE
Prompt Pay KBANK_THQR_PAY Prompt Pay (QR POST REDIRECT > 1.00
(QR MENT presented)
presented)
TH, THB, EW
25
LinePay LinePay LinePay POST REDIRECT > 0.01
SG, SGD, IB
26
SAM Kiosk CASH-SAM SingPost SAM POST REDIRECT > 5.00
SG, SGD/USD/MYR, EW
SG, SGD/MYR/PHP/THB
VN, VND, IB
27
SHB
28
VTC-Pay VTCP_BVB VTC-Pay GET REDIRECT > 1000.00
BVB
29
DOKU BRI DK_BRI_VA DK_BRI_VA POST REDIRECT >= 10000
Virtual
Account
ID, IDR, IB
SALS : Sales, one time charge, for most of the payment method
AUTS : Authorize, pre-authorization or to hold the card payment only
IB : Internet Banking
OTC : Over the counter / Cash Payment / Kiosk Payment
ATM : ATM Transfer
CC : Credit Card
EW : E-wallet
_The_End_
30