Web SDK
Javascript SDK for NeoX Payment Gateway
Tutorial & Code sample: NeoX SDK(javascript)
Use
Methods
init
Initialize the necessary configurations for the SDK and UI
pay
Payment
close
Close payment popup
neopaySDK.init (neo_PaymmentBaseUrl, configUI, callbacks)
neo_PaymmentBaseUrl
Sandbox environment testing URL: https://sandbox-api.neopay.vn/pg
configUI
neo_HiddenHeader
boolean
false
Hide header
neo_HiddenFooter
boolean
false
Hide footer
neo_HiddenPaymentMethod
boolean
false
Hide payment method
neo_HiddenOrderInfo
boolean
false
Hide order information
neopaySDK.pay (config, hashKey)
neo_MerchantCode
string
Y
Merchant code is provided by NeoX
neo_Currency
string
VND
Y
Transaction currency, VND as default
neo_Locale
string
vi
Y
Language will display on the checkout page. Support: “vi”, “en”.
neopaySDK.pay (config, hashKey)
neo_MerchantCode
string
Y
Merchant code is provided by NeoX
neo_Currency
string
VND
Y
Transaction currency, VND as default
neo_Locale
string
vi
Y
Language will display on the checkout page. Support: “vi”, “en”.
neo_Version
string
1
Y
Payment gateway version, “1” as default
neo_Command
string
PAY
Y
“PAY” as default
neo_Amount
number
Y
Payment amount
neo_MerchantTxnID
string
Y
Unique - Transaction ID is provided by merchant
neo_OrderID
string
Y
Oder ID
neo_OrderInfo
string
Y
Oder information
neo_Title
string
Y
Thông tin tiêu đề sẽ hiển thị trên trang thanh toán
neo_ReturnURL
string
Y
The website URL of the merchant
neo_ViewType
string
"POPUP" / "REDIRECT"
Y
Choose to open payment gateway as popup or redirect
neo_PaymentMethod
string
["WALLET", "ATM", "CC", "QR"]
N
Allows to choose to display direct or list payment channels. If this field is not transmitted, all channels will be displayed.
Request sample
callback
onSuccess
The event occurs when payment is successful.
onFailure
The event occurs when payment fails.
onClose
The event occurs when the popup is closed.
Callback data from onSuccess and onFailure
neo_MerchantCode
string
Merchant code is provided by NeoX
neo_Currency
string
Transaction currency, VND as default
neo_Locale
string
Language will display on the checkout page. Support: “vi”, “en”.
neo_Version
string
Payment gateway version, “1” as default
neo_Command
string
“PAY” as default
neo_Amount
string
Payment amount
neo_MerchantTxnID
string
Unique - Transaction ID is provided by merchant
neo_OrderID
string
Oder ID
neo_OrderInfo
string
Oder Information
neo_TransactionID
string
Unique - Transaction ID is generated by the NeoX system, for reconciling.
neo_ResponseCode
number
The error code is returned by NeoX, indicates the transaction result.
neo_ResponseMsg
string
Error description.
neo_CustomerID
string
The customer ID on the merchant system.
neo_ResponseData
string
The data response of customer's payment.
neo_SecureHash
string
Use SHA256 to hash the above parameters (sort the key by Alphabet order) + Secret Key (will be provided by NeoX after actual integration)
Response sample
Last updated