Merchants, platform developer docs. NewPay Online payments, Code scanning, refund, Order Query, callback, Signature verification Business codedescription
No matching content found. Try searching an API name, field name or business keyword.
Integration Overview
After merchant onboarding is approved, NewPay provides application-level and merchant-level integration information. Complete API requests, signing, signature verification, order status queries and callback handling on the server side.
Integration Process
1
Obtain integration materials appId, merchantId / mchId, merchant platform. Used for request signatures, responses or callbacks
2
payment scenarios Choose online checkout, H5 payment, WeChat mini-program payment, NewPay App payment or in-store reverse-scan acceptance according to the business scenario.
3
Integrate core APIs Unified order creation, Order Query, refund, Refund Query Callback notifications
4
Pre-launch joint testing Go live only after completing signature verification, callback idempotency, fallback order status queries and exception handling.
V2 API
V2 is the currently recommended API group. All APIs use JSON requests, with core fields including appId, mchId, order number, amount, currency and sign.
Used to obtain checkout URLs or payment reference information. After receiving payReference, merchants can guide users into the corresponding payment flow.
Used to query payment order status. At least one of newpayOrderNo and mchOrderNo must be provided, and this is recommended as a fallback query after callbacks.
For traditional in-store merchants. After cashier equipment reads the user's payment code, the merchant server creates an acceptance order and confirms the result through callbacks and queries.
H5 scenarios require user identity synchronization, order construction, payUrl retrieval, native payment page invocation and final order status query after the user returns.
H5 Integration
1
User identity synchronization business userToken / userId NewPay Users
2
Create order Get payUrl Unified order creationAPI, NewPay address
3
Invoke payment page Open the native payment module through the protocol specified by NewPay and pass in redirectUrl.
4
query status After the user returns to the merchant page, the merchant system should query order status and handle SUCCESS, PENDING, FAIL or CANCEL.
signature, callback
All production APIs should complete signing and signature verification on the server side. The sign field is excluded from the string to be signed; non-empty fields are sorted lexicographically, concatenated and signed with SHA256withRSA.
Security and signature verification
Item
Rule
Recommendation
requestsignature
Sort non-empty parameters lexicographically, concatenate them as param1=val1¶m2=val2, then sign with the merchant private key.
Complete this on the server side and do not expose the private key.
Response signature verification
Rule responsefield, Use NewPay platform
businessorder
Payment callback
callback payStatus, orderType, amount, Order number, sign
mchOrderNo / newpayOrderNo
refundcallback
refund callback address
Recommendation Refund QueryAPI
Business code order status
API responses include success, message, code, timestamp and data. Order status fields are used to determine business results such as payment, refunds and timeouts.
Business code
Status value
Meaning
Business handling recommendation
0
create
The order has been created and is waiting for payment.
1
paying
Payment is processing; polling query is available.
3
success
Success, flow
4 / 5 / 6
refunding / partial refund / refunded
Refunding, Partially refundedorRefunded.
7 / 8 / 9 / 10
cancel / expired / cancelled / failed
orderCancel, orFailed, Users
API Catalog and Interface Index
Cover V1 deprecated APIs, WeChat Pay APIs, common APIs, payment capabilities, signature verification, business codes and contact information for easier modular lookup by partners.
API Index
Basic Chapters
What NewPay is, the integration process and payment capabilities, covering NewPay overview, application flow, website payment and app payment capabilities.
appIdmerchantIdprivateKeypublicKey
V1 API ( )
POST
/api/open/converge/pay/v1/createOrder
V1 aggregated payment API for website and mobile createOrder. V2 is recommended.
Cover WeChat mini-program order creation, payment information retrieval, flowcharts and examples. Laos scenarios are subject to WeChat official limitations and require mini-program capabilities.
envVersionwxCodeprepay_idwx.requestPayment
Common APIs
POST
Common APIs include payment queries, refunds, refund queries, prepayment, user queries, transfers, transfer order queries and order confirmation.
Provide partners with complete API references, including API paths, field descriptions, tables, code examples, flow diagrams and business codes for development, joint testing and launch checks.
API documentation
1. What is NewPay
NewPay is a compliant payment and cross-border acquiring service platform for the Laos market. It provides merchants, platforms and institutional partners with QR payments, online checkout, cross-border wallet acceptance, transaction management, settlement reconciliation, refunds and risk-compliance services.
The Developer Documentation focuses on technical guidance for payment integration, orders, refunds, callbacks, signature verification and business codes.
Descriptions unrelated to the current payment business have been removed from this page.
2. Integration process
1. Overview
2. description
Merchant application materials for the NewPay merchant platform.
NewPay merchant platform materials and merchant API information.
developer API Merchants materials, Merchants
3. API materials
Name
description
appId
Merchants Application ID
merchantId
Merchants ID
privateKey
Used for requestParameters signature Merchants
publicKey
Used for Response message signature platform
3. payment capabilities
1. Overview
To support websites, mobile apps, merchant platforms and offline payment scenarios, NewPay provides the following payment capabilities for faster merchant integration.
2. description
2.1 payment capabilities
Payment Methods
Use Cases
Payment tool
Payment currency
NewPay
Merchants can use NewPay payment capabilities, while users pay with the NewPay App or merchant QR codes.
4.2. WeChat Pay APIAccording to WeChat official restrictions, WeChat Pay in Laos is only supported inside mini programs. Merchants therefore need to prepare their own mini program. For special requirements, contact NewPay.
Converge Payment supports WeChat Pay mini program scenarios. 4.2. WeChat Pay API
1. Overview
Use this API to obtain the checkout page URL. After obtaining it, redirect the user to the checkout page to complete payment.
2. requestdescription
Method: post
API path
HTML
For Website: https://prod-openapi.newpay.la/api/open/converge/pay/v1/createOrder
For Mobile: https://prod-openapi.newpay.la/api/open/converge/pay/v1/m/createOrder
2.1 request
Key
Value
Content-Type
application/json
version
1.0
2.2 requestParameters
Name
description
Type
Required
appId
Unique identifier of the third-party application platform
API path: https://prod-openapi.newpay.la/api/open/converge/pay/v2/createOpenMini
2.1 request
Key
Value
Content-Type
application/json
version
1.0
2.2 requestParameters
Name
description
Type
Required
appId
Unique identifier of the third-party application platform
String
true
timestamp
request timestamp
Long
true
currency
Payment currency, LAK/USD
String
true
orderAmt
Payment amount. USD supports two decimal places; LAK is an integer.
String
true
merchantId
Unique identifier of the third-party merchant
String
true
orderNo
Order number assigned by the merchant to identify one payment request.
String
true
subject
Product title
String
false
callBackUrl
payment result URL
String
true
envVersion
Mini program version: release / trial. Note: the trial version is only supported outside the WeChat environment. Trial redirect tool:http://47.108.185.11:19000/
Use this API to obtain the prepayment checkout page URL. After obtaining it, redirect the user to the checkout page to complete prepayment.
2. requestdescription
Method: post
API path
text
For Website:
https://prod-openapi.newpay.la/api/open/converge/pay/v1/createOrderPrePayment
For Mobile:
https://prod-openapi.newpay.la/api/open/converge/pay/v1/m/createOrderPrePayment
2.1 request
Key
Value
Content-Type
application/json
version
1.0
2.2 requestParameters
Name
description
Type
Required
appId
Unique identifier of the third-party application platform
When payment processing reaches a final state such as success or failure, NewPay sends the payment result to the merchant through callBackUrl. The merchant should proceed with its own order processing based on the payment result.
Note: if the merchant responds with { "transResult": "SUCCESS" }, callback notifications stop. Otherwise, the system retries every 5 minutes and stops after 3 retries.
When refund processing reaches a final state such as success or failure, NewPay sends the refund result to the merchant through callBackUrl. The merchant should proceed with its own order processing based on the refund result.
Note: if the merchant responds with { "transResult": "SUCCESS" }, callback notifications stop. Otherwise, the system retries every 5 minutes and stops after 3 retries.
Unique identifier of the third-party application platform
string
> nickName
User nickname
string
> userMobile
User mobile number
string
> userId
NewPay platform Users ID
long
> sign
Data signature
string
5.6 Callback
1. Payment callback
1.1. Overview
When payment processing reaches a final state such as success or failure, NewPay sends the payment result to the merchant through callBackUrl. The merchant should proceed with its own order processing based on the payment result.
Note: if the merchant responds with { "transResult": "SUCCESS" }, callback notifications stop. Otherwise, the system retries after 10 seconds, 5 minutes and 30 minutes, then stops after 3 retries.
When refund processing reaches a final state such as success or failure, NewPay sends the refund result to the merchant through the callback URL. The merchant should proceed with its own order processing based on the refund result.
Note: if the merchant responds with { "transResult": "SUCCESS" }, callback notifications stop. Otherwise, the system retries after 10 seconds, 5 minutes and 30 minutes, then stops after 3 retries.
When NewPay App opens the merchant H5 page, it automatically appends the following parameters to the URL query. The merchant needs to parse and save these parameters for subsequent requests.
Parameters
Type
description
Example
userToken
String
Used for Users token
Users Query User API get
eyJh...
userId
String
NewPay platform Users ID, Create order Use
100234
lang
String
Locale (for example zh-CN, en-US)
en-US
The merchant needs to use userId Establish the cross-platform user association and provide the user identifier when creating the order.
steps 2: Create order Get payUrl
Merchants H5 Merchants API
Merchant calls the NewPay Payment Gateway (API call).
Get payUrl(payReference in the API response), returned by NewPay.
payUrl "newpay://"
newpay://openApi/?orderNo={orderNo}&type={type}.
Step 3: Invoke the native payment page
Get payUrl Merchants H5 Use urltool protocol to redirect the user and ensure the native payment module is invoked correctly.
steps 4: query order status
Users Merchants redirectUrl the merchant system needs to query order status and decide subsequent business handling accordingly.
Query order status: the merchant H5 / backend calls its own service, which then queries NewPay Order Query API.
Branch handling logic:
SUCCESS: continue fulfillment, such as showing a payment success page or issuing digital content.
PENDING: show a processing page and poll the status again after several seconds.
FAIL/CANCEL: Users
4. Parameter reference
Parameters (NewPayAppOpenApiPage)
field
Required
description
payUrl
Yes
The original payment URL obtained through the API.
redirectUrl
Yes
flow Merchants URL (Success/Fail/Cancel)
8. signature
1. Data signaturedescription
Sort non-empty parameters lexicographically; sign is excluded from signing.
After sorting, concatenate in the format param1=val1¶m2=val2... to obtain string1.
Use SHA256withRSA Merchants signature
Parameters signature; val Parameters Parameters
2. description
Sort non-empty parameters lexicographically; sign is excluded from signing.
After sorting, concatenate in the format param1=val1¶m2=val2... to obtain string1.
Use SHA256withRSA platform
Only non-empty parameters participate in signature verification; parameters whose val is an empty string are also treated as valid.
9. Business code
Response code
Code
description
0
Success
E9008
Order information does not exist
E9999
Unknown error
B11095
Invalid request
Z00001
appid field
Z00003
appid field
Z00004
timestamp field
Z00005
sign field
Z00007
sign field Failed
Z00011
payMethod field
Z00013
extra field
Z00016
currency field
Z00018
orderAmt field
Z00020
orderAmt field (currency LAK )
Z00021
merchantId field
Z00023
orderNo field
Z00025
subject field
Z00032
callBackUrl field
Z00035
successPageUrl field
Z00038
failurePageUrl field
Z00039
transactionFailed
Z00043
cancelPageUrl field
Z00044
merchantId field
Z00046
Whitelist authentication failed
Z00047
Payment channel not supported
Z00048
The payMethod of this order currently does not support refunds
Z00049
refundOrderNo field
Z00051
Order information does not exist
Z00053
refundOrderAmt field
Z00055
refundOrderAmt field (currency LAK )
Z01002
Protocol error
Z01004
acceptance
Z01005
Abnormal account status
Z01008
Order completed
Z01009
Order expired
Z01010
order Failed
Z01011
Order canceled
Z01012
appId or merchantId
Z01017
Posted orders do not support refunds
Z01018
Promotional orders do not support partial refunds
Z01020
refund amount Payment amount
Z01022
storestatus
Z01023
Abnormal account status
Z01026
refundOrder number
Z01028
Order number unavailable; please use another one
order status
status
description
0
Created
1
Paying
3
Success
4
Refunding
5
Partially refunded
6
Refunded
7
Cancel
8
Expired
9
Canceled
10
Failed
10. Contact Details
address
Nongbone Road, Number 298, Unit18, Phonxay Village, Xaysettha District, Vientiane capital Laos
The following content helps partners quickly understand integration priorities; detailed fields, tables, code examples and flowcharts can be reviewed item by item in the API documentation directory.
Integration Preparation
After merchant activation, obtain appId, merchant ID and key information for API requests, signing and signature verification.
payment capabilities
Support multiple integration methods for websites, apps, H5, WeChat-related scenarios and NewPay App payments.
API Catalog
Focus on V2 APIs, covering unified order creation, order queries, refunds, refund queries and user information queries.
security callback
APIrequestUse SHA256withRSA signature, payment result refund Callback notifications