top of page

POST/online/sales

Once got a valid response, merchants need to open a new page to the "paymentUrl"


REQUEST

apiKey

M

String

sign

M

String

use a key the encrypt

the timestamp

timestamp

M

Integer

current timestamp

(milliseconds)

server will expire the request

with very old timestamp

type

M

String

​payment type, from

/online/gateway

​e.g.: ALIPAYOS, ALIPAY,

WXPAY, FPSPAY

rrn

M

String

the unique transaction

ID

If the rrn is duplicated with

the previous transaction, the

payment fails and an error

message will be returned to

indicate that the payment is

duplicated.

storeCode

M

String

ST01

tillId

M

String

01

salesman

M

String

9999

txDateTime

M

String

format

yyyy-MM-dd'T'HH:mm

:ssZ

e.g.:2021-06-09T13:10:33+0

800

amt

M

Integer

payment amount, min currency

e.g.: 10 ($0.1)

ccy

M

String

currency code, ONLY support HKD now

e.g.: HKD

lang

M

String

language code, default: zh_hk

e.g.: zh_cn, zh_hk, en

extendParam

M/O

String

in jsonString format:

"{\"subject\":\"Water\",

\"seller\":\"Watsons

HK\"}"

​subject & seller

subject: description of sales

goods/items

seller: description of

merchant

returnUrl

M/O

String

the URL for PMS to

redirect after payment

- if returnUrl is empty. It will

redirect to default PMS

success/fail

(synchronous with

HTTP GET)

result page

- details see here

webhookUrl

M/O

String

the URL for PMS to

notify merchant, by

sending a http request

(asynchronous with

HTTP POST)

- if webhookUrl is empty,

there will be no notify to the

merchant.

- when to stop notifying?

1. notify will be sent

max 5 times, each 5

minutes

2. merchant responses

- notify will be sent with a

Http Request (POST with

JSON)

- details see here

remarks

O

String

cashier

O

String

RESPONSE

errorCode

M

String

details see ErrorCode

errorMessage

O

String

type

M

String

rrn

M

String

the unique transaction

ID

storeCode

O

String

tillId

O

String

txDateTime

M

String

amt

M

Integer

pay amount

ccy

M

String

paymentUrl

M

String

​- PMS renders a

payment page

(support PC desktop

and mobile-site,

details see Http

Headers)

e.g.:https://mapi.alipaydev.com

/gateway.do?subject=Beautylis

h+Order+%23TESTING+-+CH

ANGE+ME&sign_type=RSA&o

ut_trade_no=83159197356096

49&currency=USD&total_fee=1

00&partner=208810112213624

1&notify_url=http%3A%2F%2F

www.alipay.com&sendFormat=

normal&return_url=http%3A%2F%2Fwww.alipay.com&sign=Rb

n7JXjgG%2BWt%2FHK8ej1oov

8OTDrI7rxH%2FQmfNJ%2FyA

SGuayUVvD3NkoP0mLo5rmR

NF8qNrzH0lQ68U0EFcU4Z6p

CVavHI%2BML3lNUagkFQ3Yc

S6f9pY1WoyEUt02%2FC2Vyzx

iEDTM%2FS6o6YiDZaUUdS2E

PTHPBgvJLvghcafyMKTIo%3D

&_input_charset=UTF-8&secon

dary_merchant_id=834945&sec

ondary_merchant_industry=343

5&secondary_merchant_name

=holiday&service=create_forex

_trade

gwRefCode

O

String

gateway reference code

gwErrorCode

O

String

​gateway error code

gwErrorMessage

O

String

gateway error message

extendParam

O

String

​timeout

O

String


bottom of page