5.1 Unified Order

1. Overview

Use this API to get the cashier page address. After getting the cashier page address, you can redirect the user to the cashier page to make a payment.

2. Request Info

  • Method: post

  • Path: https://prod-openapi-v2.newpay.la/beta/pay/unifiedOrder

2.1 Request Header

Key
Value

Content-Type

application/json

2.2 Request Data

Name
Description
Type
Required

appId

Unique identifier assigned to a third-party application platform

string

true

mchId

Unique identifier assigned to a third-party merchant

string

true

mchOrderNo

Order number in the third party merchant

string

true

channel

WECHAT_ONLINE: 微信线上支付

WECHAT_APP: 微信APP支付

WECHAT_MINI_APP: 微信小程序支付

ALIPAY_ONLINE: 阿里线上支付 LAP_NET_ONLINE: LAO QR 动态码 WECHAT_DYNAMIC : 微信动态码 ALIPAY_DYNAMIC :阿里线下动态码 NEWPAY_ONLINE: NewPay App 支付

string

true

currency

CNY: 人民币 USD: 美元 LAK: 老挝币

string

true

orderAmt

Payment amount

string

true

subject

Commodity title

string

false

callBackUrl

Payment result notification URL

string

true

redirect

redirect url after payment successfully

string

false

attach

Third party order supplementary fields

string

false

extraParam

Additional parameters. For wechat Mini app payment:

Scene 1, inside wechat: it is "wxCode -> xxxxxx", the payReference in the response is like "prepay_id = xxxxxx, signType=rsa, paySign=xxxxx", you can use these info call payment directly ; Scene 2, outside wechat: it is null, the payReference in the response is the scheme of the mini app, user can scan the scheme by wechat, and use getMinPayment method to payment;

Scene 3, for DEV env: it is "envVersion -> trial". Ref Doc: 1, JSAPI payarrow-up-right; 2, Request Payment.arrow-up-right

For NewPay H5 Payment Integration: {"agentReference":"true","userId":"100234"}

json

false

sign

string

true

2.3 Response Data

Name
Description
Type

success

Success flag: true/false

boolean

message

Response message

string

code

string

timestamp

Response timestamp

long

data

Result

object

> appId

Unique identifier assigned to a third-party application platform

string

> payStatus

SUCCESS/FAIL/EXPIRED/PROCESSING

string

> orderAmt

Payment amount and currency

json

>> value

amount value

string

>> currency

CNY: 人民币 USD: 美元 LAK: 老挝币

string

> newpayOrderNo

NewPay order number

string

> mchOrderNo

Order number in the third party merchant

string

> payMethod

PAY_METHOD_WECHAT/

PAY_METHOD_ALIPAY_PLUS

string

> orderType

DYNAMIC_CODE: 动态收款码 STATIC_CODE: 静态收款码 APP: 线上APP MINI_APP: 线上小程序 ONLINE: 线上支付

string

> payReference

Payment address

string

> sign

Data signature

string

Last updated