MyMoney API

My Money API Description
MyMoney API

MyMoney alipay and wechat pay API

MyMoney API

Option Description
Current Version 1.0
Author Mymoney LTD
Created At 2019-06-11

API Content

  1. Alipay API
API Name Description version
single_trade_query Obtain the information of a particular transaction 1.0
forex_rate_file Obtain the exchange rate from Alipay. 1.0
forex_refund Refund a alipay transaction. 1.0
create_forex_trade_pc Initiate a website payment request. 1.0
create_forex_trade_wap Initiate a wap payment request. 1.0
iOS Integration ios intergration alipay 1.0
  1. WechatPay API
API Name Description version
native_order create an advance transaction in the WeChat by QR Code 1.0
query_order Obtain the information of orders made from WeChat 1.0
jsapi_order create an advance transaction in the WeChat by QR Code 1.0
refund Refund a wechat transaction. 1.0
query_refund After submitting Submit Refund, to check the refund status. 1.0
query_exchage_rates Obtain the exchange rate from Wechat. 1.0
Wechat
POST /wechat/query_order
POST /wechat/native_order
POST /wechat/jsapi_order
POST /wechat/refund
POST /wechat/query_refund
POST /wechat/query_exchage_rates
transaction_id
string optional

Specifies the WeChat payment order id number

out_refund_no
string required

Specifies the internal refund number, which is unique in the system. A single transaction can be processed as multiple partial refunds, with the total sum of the partial refunds being equal to the original one.

Max length: 32
refund_fee
string required

Specifies the total refund amount for a transaction. The units are expressed in cents and shall be an integer

Example:
1
total_fee
string required

Specifies the total order amount. The units are expressed in cents and must be an integer.

Example:
1
rate

The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign

string

The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign

Example 1
886930000
return_msg

If not empty, this is the error description Signature failure Parameter format checking error

string

If not empty, this is the error description Signature failure Parameter format checking error

Example 1
OK
return_code

Specifies communicating label instead of transaction label. The status of a transaction is determined by the value oftrade_state.

string

Specifies communicating label instead of transaction label. The status of a transaction is determined by the value oftrade_state.

Example 1
SUCCESS
trade_state
  1. SUCCESS: Payment successful
  2. REFUND: Order to be refunded
  3. NOTPAY: Order not paid
  4. CLOSED: Order closed
  5. REVOKED: Order revoked
  6. USERPAYING: Awaiting user to pay
string
Enumeration:
SUCCESS

Payment successful

REFUND

Order to be refunded

NOTPAY

Order not paid

CLOSED

Order closed

REVOKED

Order revoked

USERPAYING

Awaiting user to pay

Example 1
SUCCESS
query_order
POST /wechat/query_order

Request parameters

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
sign
string required

Verification signature generated using API key.Signature Verification

transaction_id
string optional

Specifies the WeChat payment order id number

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object
return_code

Specifies communicating label instead of transaction label. The status of a transaction is determined by the value oftrade_state.

return_msg

If not empty, this is the error description Signature failure Parameter format checking error

result_code
string

SUCCESS or FAIL

Example:
SUCCESS
openid
string

Specifies the user id of the Payer provided by the WeChat system, it is unique to each appid instance

Example:
oeGOQxGMLoOe6_t3SZG3LQqd7YU8
is_subscribe
string

Specifies whether the payer follows the associated official account or not, with Y meaning ‘follows’ and N meaning ’not follows’.

Example:
N
trade_type
string

Set to JSAPI, NATIVE, MICROPAY or APP

Example:
MICROPAY
bank_type
string
Example:
LQT
total_fee
string
Example:
1
fee_type
string
Example:
GBP
transaction_id
string
Example:
4200000322201905103771992121
out_trade_no
string
Example:
mm_00000069_20190510181700001
attach
Object
time_end
string
Example:
20190510163909
trade_state
Example:
SUCCESS
cash_fee
string
Example:
8
trade_state_desc
string
Example:
支付成功
cash_fee_type
string
Example:
CNY
rate
string

The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign

Example:
650000000
sign
string
Example:
41f7149bd8ae68abd21856b859e7ea62
Example 1
{
    "is_success": "T",
    "msg": {
        "return_code": "SUCCESS",
        "return_msg": "OK",
        "result_code": "SUCCESS",
        "openid": "oeGOQxGMLoOe6_t3SZG3LQqd7YU8",
        "is_subscribe": "N",
        "trade_type": "MICROPAY",
        "bank_type": "LQT",
        "total_fee": "1",
        "fee_type": "GBP",
        "transaction_id": "4200000322201905103771992121",
        "out_trade_no": "mm_00000069_20190510181700001",
        "attach": {},
        "time_end": "20190510163909",
        "trade_state": "SUCCESS",
        "cash_fee": "8",
        "trade_state_desc": "支付成功",
        "cash_fee_type": "CNY",
        "rate": "886930000"
    },
    "sign": "41f7149bd8ae68abd21856b859e7ea62"
}
native_order
POST /wechat/native_order

Request parameters

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
trade_type
string required
Example:
JSAPI
total_fee
string required

Specifies the total order amount. The units are expressed in cents and must be an integer.

Example:
1

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object
return_code
string
Example:
SUCCESS
return_msg
string
Example:
OK
result_code
string
Example:
SUCCESS
prepay_id
string
Example:
wx061954047638834d2ec92b811599997900
trade_type
string
Example:
NATIVE
code_url
string
Example:
weixin://wxpay/bizpayurl?pr=W6acyUf
sign
string
Example:
32878c40f7787f68ba8360be32f5c0a2
Example 1
{
    "is_success": "T",
    "msg": {
        "return_code": "SUCCESS",
        "return_msg": "OK",
        "result_code": "SUCCESS",
        "prepay_id": "wx061954047638834d2ec92b811599997900",
        "trade_type": "NATIVE",
        "code_url": "weixin://wxpay/bizpayurl?pr=W6acyUf"
    },
    "sign": "32878c40f7787f68ba8360be32f5c0a2"
}
jsapi_order
POST /wechat/jsapi_order

Request parameters

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
body
string required
Max length: 32
Example:
iPad Mini in white with 16G memory
detail
string optional

Detailed product list described in JSON format. Please use CDATA tag to protect the JSON string when generating signature. goods_detail []: └ goods_id String Required 32 Goods ID └ wxpay_goods_id String Optional 32 The unified goods ID defined by WeChat └ goods_name String Required 256 Goods name └quantity Int Required Goods amount └ price Int Required Goods price, unit as cent Note: The goods price should be less than total_fee and it should be the favorable price.

Example:
{ "goods_detail":[ { "goods_id":"iphone6s_16G", "wxpay_goods_id":"1001", "goods_name":"iPhone6s 16G", "goods_num":1, "price":528800, "goods_category":"123456", "body":"苹果手机" }, { "goods_id":"iphone6s_32G", "wxpay_goods_id":"1002", "goods_name":"iPhone6s 32G", "quantity":1, "price":608800, "goods_category":"123789","body":"苹果手机" } ] }
attach
string optional

Allow vendors an additional field to be returned in the payment notification after submitting a payment to the Query Order API

Max length: 128
Example:
Additional description
fee_type
string optional

ISO-4217 standard compliant and be described by three characters based code.

Max length: 16
Example:
GBP
total_fee
integer optional

Specifies the total order amount. The units are expressed in cents and must be an integer.

Example:
1
device_info
string optional

Specifies the terminal device ID assigned by WeChat Payment. This field is defined by the Vendor. Note: If the payment is performed based on PC web page or WeChatWeb-based page, please submit the field value as WEB.

Max length: 32
Example:
013467007045764
time_start
string optional

Specifies the transaction creation time in the format yyyyMMddHHmmss, such as 20091225091010 for Dec 25, 2009 09:10:10 (UTC+08).

Max length: 14
Example:
20190603181818
time_expire
string optional

Specifies the transaction end time in the format yyyyMMddHHmmss, such as 20091227091010 for Dec 27, 2009 09:10:10 (UTC+08).

Example:
20190610181818
goods_tag
string optional

Specifies the label of goods, which is a parameter in the coupon feature for businesses.

Max length: 32
Example:
My money
total_fee
string required

Specifies the total order amount. The units are expressed in cents and must be an integer.

Example:
1
trade_type
string required

Set to JSAPI

Example:
JSAPI
openid
string optional

This field is only required when trade_type is JSAPI. It is the only user identification under the current appid. About how to get openid, please refer to

Max length: 128
sub_openid
string optional

This field is only required when trade_type is JSAPI. It is the only user identification under the current appid. Choose one of openid or sub_openid to submit, if sub_openid is chosen, sub_appid also need to be submitted.

Max length: 128
Example:
oUpF8uMuAJO_M2pxb1Q9zNjWeS6o

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object
return_code
string

SUCCESS or FAIL Specifies communicating label instead of transaction label. The status of the transaction is determined by the value of the result_code field.

Example:
SUCCESS
return_msg
string

If not empty, the returned info is the error description. Signature failure Parameter format checking error

Example:
OK
result_code
string

Service Result SUCCESS or FAIL

Example:
SUCCESS
prepay_id
string

Specifies the advance transaction ID created by WeChat. It is used to call the WeChat Payment API later.

Example:
wx06195846571889a145b71e381147349800
trade_type
string

The transaction type submitted. The value could be JSAPI, NATIVE, or APP

Example:
JSAPI
sign
string
Example:
e0b10e161f9bb0f0aeb0ed2700694b22
Example 1
{
    "is_success": "T",
    "msg": {
        "return_code": "SUCCESS",
        "return_msg": "OK",
        "prepay_id": "wx06195846571889a145b71e381147349800",
        "trade_type": "JSAPI",
    }
    "sign": "e0b10e161f9bb0f0aeb0ed2700694b22"
}
refund
POST /wechat/refund

Request parameters

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
total_fee
string required

Specifies the total order amount. The units are expressed in cents and must be an integer.

Example:
1
refund_fee
string required

Specifies the total refund amount for a transaction. The units are expressed in cents and shall be an integer

Example:
1
refund_fee_type
string optional

ISO-4217 standard compliant and be described by three characters based code. The refund currency type must be same with the bid currency type.

Example:
GBP
refund_desc
string optional

It will inform the shoppers the refund reason once merchants submit this field value.

Max length: 80
Example:
Products sold out
out_refund_no
string required

Specifies the internal refund number, which is unique in the system. A single transaction can be processed as multiple partial refunds, with the total sum of the partial refunds being equal to the original one.

Max length: 32
transaction_id
string optional

Specifies the WeChat payment order id number

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object
Example:
{
    "return_code": "SUCCESS",
    "return_msg": "OK",
    "result_code": "SUCCESS",
    "transaction_id": "4008450740201411110005820873",
    "out_trade_no": "1415757673",
    "out_refund_no": "1415701182",
    "refund_id": "2008450740201411110000174436",
    "refund_fee": "1"
}
return_code
string
Example:
SUCCESS
return_msg
string
Example:
OK
result_code
string
Example:
SUCCESS
transaction_id
string
Example:
4008450740201411110005820873
out_trade_no
string
Example:
1415757673
out_refund_no
string
Example:
1415701182
refund_id
string
Example:
2008450740201411110000174436
refund_fee
string
Example:
1
sign
string
Example:
e0b10e161f9bb0f0aeb0ed2700694b22
Example 1
{
    "return_code": "SUCCESS",
    "return_msg": "OK",
    "result_code": "SUCCESS",
    "transaction_id": "4008450740201411110005820873",
    "out_trade_no": "1415757673",
    "out_refund_no": "1415701182",
    "refund_id": "2008450740201411110000174436",
    "refund_fee": "1"
}
query_refund
POST /wechat/query_refund

Request parameters

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
sign
string required

Verification signature generated using API key.Signature Verification

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
transaction_id
string optional

Specifies the WeChat payment order id number

out_refund_no
string required

Specifies the internal refund number, which is unique in the system. A single transaction can be processed as multiple partial refunds, with the total sum of the partial refunds being equal to the original one.

Max length: 32
refund_id
string optional

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object
return_code
string
Example:
SUCCESS
return_msg
string
Example:
OK
result_code
string
Example:
SUCCESS
transaction_id
string

Specifies the WeChat payment order id number

Example:
1217752501201407033233368018
out_trade_no
string

Specifies an internal order number created by the Vendor’s system

Example:
1217752501201407033233368018
total_fee
string

Specifies the total order amount expressed in cents and must be an integer

Example:
100
fee_type
string

ISO-4217 standard compliant and be described by three characters based code.

Example:
GBP
cash_fee
string

Specifies the cash payment amount expressed in cents and must be an integer.

Example:
100
cash_fee_type
string

Complies with ISO 4217 standards and uses CNY (Chinese yuan) by default. For more information

Example:
CNY
refund_count
integer

Specifies recorded refund counts

Example:
1
out_refund_no_$n
string

Vendor Refund Number

Example:
1217752501201407033233368018
refund_id_$n
string

WeChat Refund Number

Example:
1217752501201407033233368018
refund_channel_$n
string

ORIGINAL: Refund to original payment account BALANCE: Refund to Balance OTHER_BALANCE: Refund to balance of other WeChat account since the original account is abnormal OTHER_BANKCARD: Refund to other bank card since the original bank card is abnormal

Example:
ORIGINAL
refund_fee_$n
string

Specifies the total refund amount expressed in cents and must be an integer A refund can be processed as multiple partial refunds.

Example:
100
refund_status_$n
string

Refund Status: SUCCESS: Refunded successfully REFUNDCLOSE: Refund closed PROCESSING: Refund is pending CHANGE: Refund can’t be processed as the Payer’s bank card is either revoked or blocked. As a consequence, the refund will be transferred to the Vendor’s cash account. In this case, the refund must be processed offline via the help of the

Enumeration:
SUCCESS

Refunded successfully

REFUNDCLOSE

Refund closed

PROCESSING

Refund is pending

CHANGE

Refund can’t be processed as the Payer’s bank card is either revoked or blocked.

refund_recv_accout_$n
string

The account which finally received the refund: 1.Back to bankcard: {bank name}{bank type}{tail numbers} 2.Back to balance: 支付用户零钱 3.Back to merchant 商户基本账户Merchants’ basic account 商户结算银行账户Merchants’ bank account

Example:
招商银行信用卡0403
refund_success_time_$n
string

Refund success time, only returned when the refund the successfully complete.

Example:
2016-07-25 15:26:26
rate
string

The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign currency to RMB is 6.5, the value will be 650000000

Example:
650000000
sign
string
Example:
e0b10e161f9bb0f0aeb0ed2700694b22
Example 1
{
    "is_success": "T",
    "msg": {
        "return_code": "SUCCESS",
        "return_msg": "OK",
        "result_code": "SUCCESS",
        "transaction_id": "1217752501201407033233368018",
        "out_trade_no": "1217752501201407033233368018",
        "total_fee": "100",
        "fee_type": "GBP",
        "cash_fee": "100",
        "cash_fee_type": "CNY",
        "refund_count": 1,
        "out_refund_no_$n": "1217752501201407033233368018",
        "refund_id_$n":"1217752501201407033233368018",
        "refund_channel_$n": "ORIGINAL",
        "refund_fee_$n": "100",
        "refund_status_$n": "SUCCESS"
    },
    "sign": "e0b10e161f9bb0f0aeb0ed2700694b22"
}
query_exchage_rates
POST /wechat/query_exchage_rates

Request parameters

sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
fee_type
string optional

Foreign currency type. ISO-4217 standard compliant and be described by three characters based code.

Example:
GBP
rate_date
string optional

In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).

Example:
20150807

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Object

If not empty, this is the error description Signature failure Parameter format checking error

return_code
string

SUCCESS or FAIL Specifies communicating label instead of transaction label. The status of a transaction is determined by the value of result_code.

Example:
SUCCESS
return_msg
string
Example:
OK
fee_type
string

Foreign currency type. ISO-4217 standard compliant and be described by three characters based code.

Example:
GBP
rate_time
string

In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).

Example:
20190506
rate
string

The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign currency to RMB is 6.5, the value will be 650000000

Example:
894600000
sign
string
Example:
354817357aeb36616d485a1ed1555ebe
Example 1
{
    "is_success": "T",
    "msg": {
        "return_code": "SUCCESS",
        "return_msg": "OK",
        "fee_type": "GBP",
        "rate_time": "20190506",
        "rate": "894600000"
    },
    "sign": "354817357aeb36616d485a1ed1555ebe"
}
Alipay
Alipay Online
POST /api/v1/alipay/online/single_trade_query
POST /api/v1/alipay/online/forex_rate_file
POST /api/v1/alipay/online/forex_refund
POST /api/v1/alipay/online/create_forex_trade_pc
POST /api/v1/alipay/online/create_forex_trade_wap
trade_information
string optional

Information about the trade industry. See trade_information for details.

Max length: 6,000
Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
rmb_fee
number optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
timeout_rule
string optional

The default value is 12h. Contact Alipay Technical Support if you need to use other values. This parameter specifies the valid time from login to completion.

Max length: 10
Example:
12h
supplier
string optional

Supplier name, for page display purpose.

Max length: 16
product_code
string optional

The code of the Alipay product you use. In this case, the value of this field is NEW_WAP_OVERSEAS_SELLER.

Enumeration:
NEW_WAP_OVERSEAS_SELLER
split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail Info

Max length: 1,600
Example:
[{"transIn":"2088101126708402","amount":"0.10","currency":"USD","desc":" Split _test1"},{"transIn":"2088101126707869","amount":"0.10","currency":"USD","desc":"SampleInsuranceFee=10usd|RelevantTax=10usd|DeliveryFee=10usd|AnyOtherFees=10usd"}]
total_fee
number optional

A floating number in the range of 0.01~1000000.00. If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the exchange rate.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
trade_no
string optional

A unique transaction ID assigned by Alipay, with maximum length of 64 bytes and minimum length of 16 bytes. If both trade_no and out_trade_no appear, trade_no takes precedence. This parameter is required when out_trade_no is not provided.

Allow empty value: true
Max length: 64
Example:
2019060422001399141043411250
split_fund_info
string optional

The refund split detail is in JSON format, and includes the following parameters:Refund Split Detail Info

Example:
[{"transOut":"2088101126708402", "amount":"0.10", "currency":"USD", "desc":"test1"}, {" transOut ":"2088101126708402", "amount":"0.30", "currency":"USD", "desc":"test2"}]
currency
string required

Settlement currency code that the merchant specifies in the contract. Use upper case. Supported Currency List for details.

Example:
GBP
secondary_merchant_id
string required

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for partners.

Max length: 64
single_trade_query
POST /api/v1/alipay/online/single_trade_query

Authentication

Open

The merchant can use this API to obtain the information of a particular transaction, such as the transaction ID, out_trade_no, and transaction status.

Request parameters

out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
sign
string required

Verification signature generated using API key.Signature Verification

trade_no
string optional

A unique transaction ID assigned by Alipay, with maximum length of 64 bytes and minimum length of 16 bytes. If both trade_no and out_trade_no appear, trade_no takes precedence. This parameter is required when out_trade_no is not provided.

Allow empty value: true
Max length: 64
Example:
2019060422001399141043411250
store_id
string optional

线上商户对应的ID

Example:
mm_2_001

Responses

200 OK
Body
Object
is_success
string

The status of the API call can be: T: success F: failed

Example:
T
msg
Object
trade
Object
body
string

Merchandise description. Special characters are not supported.

Example:
test body
buyer_email
string

Buyer’s Alipay account

Example:
614***@qq.com
buyer_id
string

A unique buyer ID assigned by Alipay

Example:
2088802975799141
discount
number

The discount amount

flag_trade_locked
string

This parameter indicates whether the trade transaction is locked. 1: the transaction is locked. 0: the transaction is not locked.

Example:
0
gmt_create
string

The time when the transaction is created. Format: yyyy-MM-dd HH:mm:ss. Use GMT+8.

Example:
2019-06-04 15:19:06
gmt_last_modified_time
string
Example:
2019-06-04 15:19:25
gmt_payment
string

The time when the transaction is paid by the buyer. Format: yyyy-MM-dd HH:mm:ss. Use GMT+8.

Example:
2019-06-04 15:19:25
is_total_fee_adjust
string
Example:
F
operator_role
string

The operator role can be: B: Buyer S: Seller

Example:
B
out_trade_no
string

A unique transaction ID

Example:
mm_19_001-201960414430000000000002
payment_type
string

The payment type. See Payment Type for details.

Example:
100
price
number

The merchandise price in CNY. Value range: 0.01 - 100000000.00, accurate to two decimal places

quantity
number

The quantity of merchandises

subject
string

Merchandise title. Special characters are not supported.

Example:
test
to_buyer_fee
string

The accumulative refunded amount paid to the buyer

Example:
0.00
to_seller_fee
string

The accumulative amount paid to the seller

Example:
0.09
total_fee
string

Transaction amount in CNY. It is the exact amount that the buyer has paid. Accurate to two decimal places

Example:
0.09
trade_no
string

A unique transaction ID assigned by Alipay, with a maximum length of 64 bytes and minimum length of 16 bytes. If both trade_no and out_trade_no appear, trade_no takes precedence.

Example:
2019060422001399141043411250
trade_status
string

Transaction status, the value can be: TRADE_FINISHED WAIT_BUYER_PAY TRADE_CLOSED

Example:
TRADE_FINISHED
use_coupon
string

This parameter indicates whether the Alipay coupon is used in the transaction. T: True F: False

Example:
F
sign
string
Example:
ced5aac2665180341c047e548f396c57
Order details
Merchant not exist
ILLEGAL_SIGN
{
    "is_success": "T",
    "msg": {
        "trade": {
            "body": "test body",
            "buyer_email": "614***@qq.com",
            "buyer_id": "2088802975799141",
            "discount": "0.00",
            "flag_trade_locked": "0",
            "gmt_create": "2019-06-04 15:19:06",
            "gmt_last_modified_time": "2019-06-04 15:19:25",
            "gmt_payment": "2019-06-04 15:19:25",
            "is_total_fee_adjust": "F",
            "operator_role": "B",
            "out_trade_no": "mm_19_001-201960414430000000000002",
            "payment_type": "100",
            "price": "0.09",
            "quantity": "1",
            "subject": "test",
            "to_buyer_fee": "0.00",
            "to_seller_fee": "0.09",
            "total_fee": "0.09",
            "trade_no": "2019060422001399141043411250",
            "trade_status": "TRADE_FINISHED",
            "use_coupon": "F"
        }
    },
    "sign": "ced5aac2665180341c047e548f396c57"
}
{
    "error": "merchant not exist",
    "is_success": "F"
}
{
    "error": "ILLEGAL_SIGN",
    "is_success": "F"
}
forex_rate_file
POST /api/v1/alipay/online/forex_rate_file

The merchant can call this API to obtain the exchange rate from MyMoney. The exchange rate changes once a day between 9:00 and 11:00 GMT+8. In addition, you can call this interface for a maximum of 100 times each day.

Request parameters

sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
store_id
string optional

线上商户对应的ID

Example:
mm_2_001

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
Array
Object
date
string

Rate releasing date: YYYYMMDD

Example:
20190605
time
string

Rate releasing time: HHMMSS

Example:
100510
currency
string

Abbreviated currency names.

Example:
GBP
rate
string

Rate

Example:
8.863120
string
sign
string
Rate info
{
    "is_success": "T",
    "msg": [
        {
            "date": "20190605",
            "time": "100510",
            "currency": "GBP",
            "rate": "8.863120"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "PHP",
            "rate": "0.133981"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "DKK",
            "rate": "1.047000"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "HKD",
            "rate": "0.883300"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "CAD",
            "rate": "5.185700"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "LKR",
            "rate": "0.039341"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "THB",
            "rate": "0.220994"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "ZAR",
            "rate": "0.474500"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "SGD",
            "rate": "5.081400"
        },
        {
            "date": "20190605",
            "time": "093006",
            "currency": "MYR",
            "rate": "1.668869"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "SEK",
            "rate": "0.735900"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "JPY",
            "rate": "0.064210"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "EUR",
            "rate": "7.817900"
        },
        {
            "date": "20190605",
            "time": "093006",
            "currency": "IDR",
            "rate": "0.000487"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "CZK",
            "rate": "0.303993"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "MOP",
            "rate": "0.857400"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "USD",
            "rate": "6.928700"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "AUD",
            "rate": "4.857700"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "AED",
            "rate": "1.889362"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "NZD",
            "rate": "4.596900"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "KRW",
            "rate": "0.006050"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "NOK",
            "rate": "0.798700"
        },
        {
            "date": "20190605",
            "time": "112011",
            "currency": "TWD",
            "rate": "0.222216"
        },
        {
            "date": "20190605",
            "time": "100510",
            "currency": "CHF",
            "rate": "7.005300"
        },
        {
            "date": "20190605",
            "time": "093007",
            "currency": "RUB",
            "rate": "0.106539"
        }
    ],
    "sign": "6a77e0df72f579ad3bc29c976bdc7c46"
}
forex_refund
POST /api/v1/alipay/online/forex_refund

Call this interface to refund a transaction.

Request parameters

sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
out_return_no
string required

The unique refund ID for refund request

Max length: 64
return_amount
string optional

The amount to refund in settlement currency. The value is in the range of 0.01 – 1000000, with at most 2 digits after the decimal point. One of the following two parameters must be specified: return_amount return_rmb_amount

return_rmb_amount
string optional

Use this field to refund in CNY. The value is in the range of 0.01 – 1000000, with at most 2 digits after the decimal point. One of the following two parameters must be specified: return_amount return_rmb_amount

currency
string required

Currency code. Even when the return_rmb_amount parameter is not null, currency is still the foreign currency, not CNY. Use upper case. See Supported Currency List for details.

gmt_return
string optional

Refund transaction time. Format: YYYYMMDDHHMMSS, Beijing Time

reason
string optional

Reason for the refund

product_code
string optional

Product code, which is NEW_OVERSEAS_SELLER for website payment refund, and is NEW_WAP_OVERSEAS_SELLER for WAP or APP payment refund

is_sync
string optional

To indicate that the refund request is processed synchronously or asynchronously with a value of Y or N. The default value is N, which means an asynchronous response from Alipay is returned to the merchant if the merchant has set the value of the notify_url field when sending the refund request. If the value is set as Y, it means only a synchronous response is returned to the merchant.

split_fund_info
string optional

The refund split detail is in JSON format, and includes the following parameters:Refund Split Detail Info

Example:
[{"transOut":"2088101126708402", "amount":"0.10", "currency":"USD", "desc":"test1"}, {" transOut ":"2088101126708402", "amount":"0.30", "currency":"USD", "desc":"test2"}]
create_forex_trade_pc
POST /api/v1/alipay/online/create_forex_trade_pc

The merchant can use this interface to initiate a website payment request.

Request parameters

sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
subject
string required

Brief description of the transaction. Special characters are not supported. Note: The value of this field will be displayed to customers.

body
string optional

Detailed description about the goods. Special characters are not supported.

Max length: 400
out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
currency
string required

Settlement currency code that the merchant specifies in the contract. Use upper case. Supported Currency List for details.

Example:
GBP
return_url
string optional

After the payment is completed, the result is sent to this URL through URL redirect.

Max length: 200
timeout_rule
string optional

The default value is 12h. Contact Alipay Technical Support if you need to use other values. This parameter specifies the valid time from login to completion.

Max length: 10
Example:
12h
order_gmt_create
string optional

YYYY-MM-DD HH:MM:SS Use Beijing time to synchronize with Alipay system. This parameter can only be used with order_valid_time together to control the valid time from redirection to login

Example:
2019-06-06 06:06:06
order_valid_time
string optional

Order valid time in seconds. Max value is 2592000. This parameter can only be used with the order_gmt_create parameter to control the valid time. If the current time passes the time of order_gmt_create plus order_valid_time, the payment transaction will be closed.

Max length: 5
Example:
2592000
secondary_merchant_id
string required

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for partners.

Max length: 64
secondary_merchant_industry
string required

Industry classification identifier of sub-merchant which assigned by Alipay. For example: catering industry: 5812 department stores: 5311 lodging industry: 7011 taxi industry: 4121 For more details, see secondary merchant industry list. This parameter is required for partners. See more mcc code : MCC Code

Example:
5311
secondary_merchant_name
string required

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Note: This parameter is required for partners.

Max length: 64
refer_url
string optional

Website of the secondary merchant

Max length: 200
product_code
string optional

Product code. The value is fixed as NEW_OVERSEAS_SELLER in this interface

Max length: 32
Example:
NEW_OVERSEAS_SELLER
split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail info

Max length: 1,600
trade_information
string optional

Information about the trade industry. See trade_information for details.

Max length: 6,000
Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
trade_information
string optional

Information about the trade industry. See trade_information for details.

Max length: 6,000
Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
total_fee
number optional

A floating number in the range of 0.01~1000000.00. If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the exchange rate.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
rmb_fee
number optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
supplier
string optional

Supplier name, for page display purpose.

Max length: 16
store_id
string optional

线上商户对应的ID

Example:
mm_2_001

Responses

201 Created
Body
Object
is_success
string
Example:
T
msg
string
Example:
https://mapi.alipay.com/gateway.do?service=create_forex_trade&_input_charset=UTF-8&partner=2088431618698950&notify_url=http://8.208.9.37/~mymoney/api/v1/alipay/alipay_online_wap_notify&return_url=localhost/my_money_pay0506/api/v1/alipay_wap_return_url&subject=test&body=test body&out_trade_no=mm_19_001-201960414430000000000002&currency=GBP&total_fee=0.01&rmb_fee=&timeout_rule=&auth_token=&supplier=&order_gmt_create=&order_valid_time=&product_code=NEW_OVERSEAS_SELLER&split_fund_info=&secondary_merchant_id=mm_19_001&secondary_merchant_name=Test LTD&secondary_merchant_industry=5311&sign_type=MD5&sign=dd3223abc04c1a4f2bd5672e94ac8389
sign
string
Example:
5b75b4d59f78c2b3ddd2c900971b9753
Example 1
{
    "is_success": "T",
    "msg": "https://mapi.alipay.com/gateway.do?service=create_forex_trade&_input_charset=UTF-8&partner=2088431618698950&notify_url=http://8.208.9.37/~mymoney/api/v1/alipay/alipay_online_wap_notify&return_url=localhost/my_money_pay0506/api/v1/alipay_wap_return_url&subject=test&body=test body&out_trade_no=mm_19_001-201960414430000000000002&currency=GBP&total_fee=0.01&rmb_fee=&timeout_rule=&auth_token=&supplier=&order_gmt_create=&order_valid_time=&product_code=NEW_OVERSEAS_SELLER&split_fund_info=&secondary_merchant_id=mm_19_001&secondary_merchant_name=Test LTD&secondary_merchant_industry=5311&sign_type=MD5&sign=dd3223abc04c1a4f2bd5672e94ac8389",
    "sign": "5b75b4d59f78c2b3ddd2c900971b9753"
}
create_forex_trade_wap
POST /api/v1/alipay/online/create_forex_trade_wap

Request parameters

sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
return_url
string optional

After the payment is completed, the result is sent to this URL through URL redirect.

Max length: 200
subject
string optional

Brief description of the transaction. Special characters are not supported. Note: The value of this field will be displayed to customers.

Max length: 255
body
string optional

Detailed description about the goods. Special characters are not supported.

Max length: 400
out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
currency
string required

Settlement currency code that the merchant specifies in the contract. Use upper case. Supported Currency List for details.

Example:
GBP
total_fee
number optional

A floating number in the range of 0.01~1000000.00. If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the exchange rate.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
rmb_fee
number optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

Number(8,2)
Min: 0.01
Max: 1,000,000
Example:
0.01
timeout_rule
string optional

The default value is 12h. Contact Alipay Technical Support if you need to use other values. This parameter specifies the valid time from login to completion.

Max length: 10
Example:
12h
supplier
string optional

Supplier name, for page display purpose.

Max length: 16
secondary_merchant_id
string required

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for partners.

Max length: 64
secondary_merchant_name
string required

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Note: This parameter is required for partners.

Max length: 64
secondary_merchant_industry
string required

Industry classification identifier of sub-merchant which assigned by Alipay. For example: catering industry: 5812 department stores: 5311 lodging industry: 7011 taxi industry: 4121 For more details, see secondary merchant industry list. This parameter is required for partners. See more mcc code : MCC Code

Example:
5311
refer_url
string optional

Website of the secondary merchant

Max length: 200
split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail Info

Max length: 1,600
Example:
[{"transIn":"2088101126708402","amount":"0.10","currency":"USD","desc":" Split _test1"},{"transIn":"2088101126707869","amount":"0.10","currency":"USD","desc":"SampleInsuranceFee=10usd|RelevantTax=10usd|DeliveryFee=10usd|AnyOtherFees=10usd"}]
app_pay
string optional

The flag that is used to identify whether the transaction activates Alipay wallet app to process the payment. If Alipay wallet app is not installed, the payment will be processed by WAP page.

Enumeration:
N
Y
Example:
Y
trade_information
string optional

Information about the trade industry. See trade_information for details.

Max length: 6,000
Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
split_fund_info
string optional

The refund split detail is in JSON format, and includes the following parameters:Refund Split Detail Info

Example:
[{"transOut":"2088101126708402", "amount":"0.10", "currency":"USD", "desc":"test1"}, {" transOut ":"2088101126708402", "amount":"0.30", "currency":"USD", "desc":"test2"}]
store_id
string optional

线上商户对应的ID

Example:
mm_2_001

Responses

200 OK
Body
Object
is_success
string
Example:
T
msg
string
Example:
https://mapi.alipay.com/gateway.do?service=create_forex_trade_wap&_input_charset=UTF-8&partner=2088431618698950&notify_url=http://8.208.9.37/~mymoney/api/v1/alipay/alipay_online_wap_notify&return_url=localhost/my_money_pay0506/api/v1/alipay_wap_return_url&subject=test&body=test body&out_trade_no=mm_19_001-201960414430000000000001&currency=GBP&total_fee=0.01&timeout_rule=12&supplier=&product_code=NEW_WAP_OVERSEAS_SELLER&app_pay=Y&secondary_merchant_id=mm_19_001&secondary_merchant_name=Test LTD&secondary_merchant_industry=5311&sign_type=MD5&sign=1fb3a650f722c2ca25553b61766d4383
sign
string
Example:
d62356af2f7e6e1431015ef6187b3cd3
secondary_merchant_industry
string required

Industry classification identifier of sub-merchant which assigned by Alipay. For example: catering industry: 5812 department stores: 5311 lodging industry: 7011 taxi industry: 4121 For more details, see secondary merchant industry list. This parameter is required for partners. See more mcc code : MCC Code

Example:
5311
store_id
string optional

线上商户对应的ID

Example:
mm_2_001
secondary_merchant_name
string required

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Note: This parameter is required for partners.

Max length: 64
What currencies does Mymoney support?

Alipay supports currencies in the following table:

Abbreviation Currency Decimal numbe
GBP Great Britain Pound 2
HKD Hong Kong Dollar 2
USD U.S. Dollar 2
CHF Confederation Helvetica Franc 2
SGD Singapore Dollar 2
SEK Swedish Krona 2
DKK Danish Krone 2
NOK Norwegian Krone 2
JPY Japanese Yen 0
CAD Canada Dollar 2
AUD Australian Dollar 2
EUR Euro 2
NZD New Zealand Dollar 2
KRW Korea Won 0
THB Thai Baht 2
What is MCC?

What is MCC?

The Merchant Category Code (MCC) is a four-digit number assigned to describe a merchant’s primary business. For an Alipay payment transaction, if secondary_merchant_industry is passed in, the parameter value must be one of the following MCC numbers. Otherwise, the payment transaction will be blocked.

The following table lists the MCCs used in Alipay:

MCC Description
0742 Veterinary services
0743 Wine producers
0744 Champagne producers
0780 Landscaping and horticultural services
1711 Heating, plumbing and air-conditioning contractors
1731 Electrical contractors
1740 Masonry, stonework, tile setting, plastering and insulation contractors
1750 Carpentry contractors
1761 Roofing, siding and sheet metal work contractors
1771 Concrete work contractors
1799 Special trade contractors - not elsewhere classified
2741 Miscellaneous publishing and printing services
2791 Typesetting, platemaking and related services
2842 Speciality cleaning, polishing and sanitation preparations
4011 Railroads
4111 Local and suburban commuter passenger transportation, including ferries
4112 Passenger railways
4119 Ambulance services
4121 Taxi-cabs and limousines
4131 Bus lines
4214 Motor freight carriers and trucking - local and long distance, moving and storage companies and local delivery
4215 Courier services - air and ground and freight forwarders
4225 Public warehousing and storage - farm products, refrigerated goods and household goods
4411 Steamships and cruise lines
4457 Boat rentals and leasing
4468 Marinas, marine service and supplies
4511 Airlines and air carriers
4582 Airports, flying fields and airport terminals
4722 Travel agencies and tour operators
4784 Tolls and bridge fees
4789 Transportation services - not elsewhere classified
4812 Telecommunication equipment and telephone sales
4814 Telecommunication services
4815 Monthly summary telephone charges
4816 Computer network information services
4821 Telegraph services
4899 Cable and other pay television services
4900 Utilities - electric, gas, water and sanitary
5013 Motor vehicle supplies and new parts
5021 Office and commercial furniture
5039 Construction materials - not elsewhere classified
5044 Office, photographic, photocopy and microfilm equipment
5045 Computers, computer peripheral equipment - not elsewhere classified
5046 Commercial equipment - not elsewhere classified
5047 Dental laboratory medical ophthalmic hospital equipment and supplies
5051 Metal service centres and offices
5065 Electrical parts and equipment
5072 Hardware equipment and supplies
5074 Plumbing and heating equipment and supplies
5085 Industrial supplies - not elsewhere classified
5094 Precious stones and metals, watches and jewellery
5099 Durable goods - not elsewhere classified
5111 Stationery, office supplies and printing and writing paper
5122 Drugs, drug proprietors
5131 Piece goods, notions and other dry goods
5137 Men’s, women’s and children’s uniforms and commercial clothing
5139 Commercial footwear
5169 Chemicals and allied products - not elsewhere classified
5192 Books, periodicals and newspapers
5193 Florists’ supplies, nursery stock and flowers
5198 Paints, varnishes and supplies
5199 Non-durable goods - not elsewhere classified
5200 Home supply warehouse outlets
5211 Lumber and building materials outlets
5231 Glass, paint and wallpaper shops
5251 Hardware shops
5261 Lawn and garden supplies outlets, including nurseries
5271 Mobile home dealers
5300 Wholesale clubs
5309 Duty-free shops
5310 Discount shops
5311 Department stores
5331 Variety stores
5399 Miscellaneous general merchandise
5411 Groceries and supermarkets
5422 Freezer and locker meat provisioners
5441 Candy, nut and confectionery shops
5451 Dairies
5462 Bakeries
5499 Miscellaneous food shops - convenience and speciality retail outlets
5511 Car and truck dealers (new and used) sales, services, repairs, parts and leasing
5521 Car and truck dealers (used only) sales, service, repairs, parts and leasing
5531 Auto and home supply outlets
5532 Automotive tyre outlets
5533 Automotive parts and accessories outlets
5541 Service stations (with or without ancillary services)
5542 Automated fuel dispensers
5551 Boat dealers
5561 Camper, recreational and utility trailer dealers
5571 Motorcycle shops and dealers
5592 Motor home dealers
5598 Snowmobile dealers
5599 Miscellaneous automotive, aircraft and farm equipment dealers -not elsewhere classified
5611 Men’s and boys’ clothing and accessory shops
5621 Women’s ready-to-wear shops
5631 Women’s accessory and speciality shops
5641 Children’s and infants’ wear shops
5651 Family clothing shops
5655 Sports and riding apparel shops
5661 Shoe shops
5681 Furriers and fur shops
5691 Men’s and women’s clothing shops
5697 Tailors, seamstresses, mending and alterations
5698 Wig and toupee shops
5699 Miscellaneous apparel and accessory shops
5712 Furniture, home furnishings and equipment shops and manufacturers, except appliances
5713 Floor covering services
5714 Drapery, window covering and upholstery shops
5715 Alcoholic beverage wholesalers
5718 Fireplaces, fireplace screens and accessories shops
5719 Miscellaneous home furnishing speciality shops
5722 Household appliance shops
5732 Electronics shops
5733 Music shops - musical instruments, pianos and sheet music
5734 Computer software outlets
5735 Record shops
5811 Caterers
5812 Eating places and restaurants
5813 Drinking places (alcoholic beverages) - bars, taverns, night-clubs, cocktail lounges and discothèques
5814 Fast food restaurants
5815 Digital Goods-Media, Books, Movies, Music
5816 Digital Goods-Games
5817 Furriers and fur shopsDigital Goods-Software Applications (excluding games)
5818 Digital Goods-Multi-Category
5912 Drug stores and pharmacies
5921 Package shops - beer, wine and liquor
5931 Used merchandise and second-hand shops
5935 Wrecking and salvage yards
5937 Antique reproduction shops
5940 Bicycle shops - sales and service
5941 Sporting goods shops
5942 Bookshops
5943 Stationery, office and school supply shops
5944 Jewellery, watch, clock and silverware shops
5945 Hobby, toy and game shops
5946 Camera and photographic supply shops
5947 Gift, card, novelty and souvenir shops
5948 Luggage and leather goods shops
5949 Sewing, needlework, fabric and piece goods shops
5950 Glassware and crystal shops
5962 Telemarketing - travel-related arrangement services
5963 Door-to-door sales
5964 Direct marketing - catalogue merchants
5965 Direct marketing - combination catalogue and retail merchants
5966 Direct marketing - outbound telemarketing merchants
5967 Direct marketing - inbound telemarketing merchants
5968 Direct marketing - continuity subscription merchants
5969 Direct marketing direct marketers - not elsewhere classified
5970 Artist supply and craft shops
5971 Art dealers and galleries
5972 Stamp and coin shops
5973 Religious goods and shops
5975 Hearing aids - sales, service and supplies
5976 Orthopaedic goods and prosthetic devices
5977 Cosmetic shops
5978 Typewriter outlets - sales, service and rentals
5983 Fuel dealers - fuel oil, wood, coal and liquefied petroleum
5992 Florists
5993 Cigar shops and stands
5994 Newsagents and news-stands
5995 Pet shops, pet food and supplies
5996 Swimming pools - sales, supplies and services
5997 Electric razor shops - sales and service
5998 Tent and awning shops
5999 Miscellaneous and speciality retail outlets
7011 Lodging - hotels, motels and resorts
7032 Sporting and recreational camps
7033 Trailer parks and camp-sites
7210 Laundry, cleaning and garment services
7211 Laundry services - family and commercial
7216 Dry cleaners
7217 Carpet and upholstery cleaning
7221 Photographic studios
7230 Beauty and barber shops
7251 Shoe repair shops, shoe shine parlours and hat cleaning shops
7261 Funeral services and crematoriums
7273 Dating and escort services
7278 Buying and shopping services and clubs
7295 Babysitting and housekeeping services
7296 Clothing rentals - costumes, uniforms and formal wear
7297 Massage parlours
7298 Health and beauty spas
7299 Miscellaneous personal services - not elsewhere classified
7311 Advertising services
7333 Commercial photography, art and graphics
7338 Quick copy, reproduction and blueprinting services
7339 Stenographic and secretarial support services
7342 Exterminating and disinfecting services
7349 Cleaning, maintenance and janitorial services
7361 Employment agencies and temporary help services
7372 Computer programming, data processing and integrated systems design services
7375 Information retrieval services
7379 Computer maintenance and repair services - not elsewhere classified
7392 Management, consulting and public relations services
7393 Detective agencies, protective agencies and security services, including armoured cars and guard dogs
7394 Equipment, tool, furniture and appliance rentals and leasing
7395 Photofinishing laboratories and photo developing
7399 Business services - not elsewhere classified
7511 Reserved for national use
7512 Automobile rentals
7513 Truck and utility trailer rentals
7519 Motor home and recreational vehicle rentals
7523 Parking lots and garages
7531 Automotive body repair shops
7534 Tyre retreading and repair shops
7535 Automotive paint shops
7538 Automotive service shops (non-dealer)
7542 Car washes
7549 Towing services
7622 Electronics repair shops
7623 Air conditioning and refrigeration repair shops
7629 Electrical and small appliance repair shops
7631 Watch, clock and jewellery repair shops
7641 Furniture reupholstery, repair and refinishing
7692 Welding services
7699 Miscellaneous repair shops and related services
7829 Motion picture and video tape production and distribution
7832 Motion picture theatres
7841 Video tape rentals
7911 Dance halls, studios and schools
7922 Theatrical producers (except motion pictures) and ticket agencies
7929 Bands, orchestras and miscellaneous entertainers - not elsewhere classified
7932 Billiard and pool establishments
7933 Bowling alleys
7941 Commercial sports, professional sports clubs, athletic fields and sports promoters
7991 Tourist attractions and exhibits
7992 Public golf courses
7993 Video amusement game supplies
7994 Video game arcades and establishments
7996 Amusement parks, circuses, carnivals and fortune tellers
7997 Membership clubs (sports, recreation, athletic), country clubs and private golf courses
7998 Aquariums, seaquariums and dolphinariums
7999 Recreation services - not elsewhere classified
8011 Doctors and physicians - not elsewhere classified
8021 Dentists and orthodontists
8031 Osteopaths
8041 Chiropractors
8042 Optometrists and ophthalmologists
8043 Opticians, optical goods and eyeglasses
8049 Podiatrists and chiropodists
8050 Nursing and personal care facilities
8062 Hospitals
8071 Medical and dental laboratories
8099 Medical services and health practitioners - not elsewhere classified
8111 Legal services and attorneys
8211 Elementary and secondary schools
8220 Colleges, universities, professional schools and junior colleges
8241 Correspondence schools
8244 Business and secretarial schools
8249 Trade and vocational schools
8299 Schools and educational services - not elsewhere classified
8351 Child care services
8641 Civic, social and fraternal associations
8675 Automobile associations
8699 Membership organizations - not elsewhere classified
8734 Testing laboratories (non-medical)
8911 Architectural, engineering and surveying services
8931 Accounting, auditing and bookkeeping services
8999 Professional services - not elsewhere classified
9399 Government Services - not elsewhere classified
Refund Split Detail Info

includes the following parameters:

Object
transOut
string

Alipay userID that Alipay account for transfer refund fee . Alipay userID that composed of 16 digits beginning with 2088.

Example:
2088101126708402
amount
string

Split Amount. The format must be correct to the currency.

Example:
0.10
currency
string

Split currency .The currency must be same with refund currency. If parameter (total_fee) was used, the split currency must be foreign currency and the same with settlement currency. If parameter (rmb_fee) was used, the split currency must be “CNY”. The parameter (total_fee and rmb_fee ) are mutual exclusive.

Example:
USD
desc
string

Split discretion

Example:
test1
Example 1
{
    "transOut": "2088101126708402",
    "amount": "0.10",
    "currency": "USD",
    "desc": "test1"
}
Split Detail Info
  • The split detail is in JSON format, and includes the following parameters:
  • You can own at most 10 domestic split accounts.
  • You must own a domestic split account that has contracted successfully with Alipay. The domestic split account need to be linked with the global primary account. To check whether the link is successfully built, contact Global Merchant Technical Support (overseas_support@service.alibaba.com).
Object
transIn
string required

Alipay userID that Alipay account for deposit. Alipay userID that composed of 16 digits beginning with 2088.

Example:
2088101126708402
amount
string required

Split Amount. The format must be correct to the currency.

Example:
0.10
currency
string required

Split currency. If parameter (total_fee) was used, the split currency must be foreign currency and the same with settlement currency. If parameter (rmb_fee) was used, the split currency must be “CNY”. The parameter (total_fee and rmb_fee ) are mutual exclusive.

Example:
USD
desc
string required
  1. Alipay can only accept 4 types of funds for settlement in your designated Chinese Alipay bank account: (i) insurance fee (relating to the delivery), (ii) relevant tax, (iii) any delivery fee for goods and services; and (iv) any other fees directly related to a transaction submitted to Alipay.
Example:
Split _test1
Trade Information

Notes:

  • In case a merchant wishes to price their products in RMB, the merchant can put the CNY payment amount in the rmb_fee field. In the same time, total_fee filed should be ignored. The payment amount will be displayed in RMB to the user.
    • The merchant should not change the value of the currency field, which is the settlement currency which Alipay will pay the merchant in.
    • The total_fee or rmb_fee fields are mutually exclusive. One and only one of them should be used.
  • For the amount of charge in total_fee or rmb_fee field, the number should be in the form with 2 digits after the decimal point, for example, 100.30 USD. But for Japanese and Korean currency, the number should be 0 digit after the decimal point, like 1000 KRW and 1000 JPY. The system will return with exception for numbers in other formats, for example, USD 101.999.
  • If both order_gmt_create + order_valid_time and timeout_rule are passed, order_gmt_create + order_valid_time will be used for order timeout control. Alipay suggests to use order_gmt_create + order_valid_time for order timeout control.
  • The merchant could not attach parameters to return_url, and hoping them be passed by Alipay. Alipay will remove all extra parameters in the return_url field.
Object
business_type
string

Business type. 5 types are supported. 1: Hotel 2: AIR 3: Overseas study consulting 4: Sales of goods 5: Others, including all the other business types that do not fall into the above 4 categories. For example, mobile data service recharge, airport pick up service, etc. If more than one type is involved, separate type values with vertical bar (|).

Example:
1|2|3|4|5 or 1
hotel_name
string

Hotel name that consists of numbers, letters, spaces, and special characters including ,.<>()[]/-,. If more than one hotel name exists, separate values with vertical bar (|). Specify this field only when business_type is 1 (Hotel).

Example:
zlidu, sluhg-987, 889utng
check_in_time
string

Check-in time. Format: yyyy-MM-dd. Timezone: GMT +8. Specify this field only when business_type is 1 (Hotel).

Example:
2018-10-20
check_out_time
string

Check-out time. Format: yyyy-MM-dd. Timezone: GMT +8. Specify this field only when business_type is 1 (Hotel).

Example:
2018-10-22
flight_number
string

Flight number. If flight transfer exists, separate flight numbers with vertical bar (|). Specify this field only when business_type is 2 (AIR).

Example:
NWS 996|TWF 8854
departure_time
string

Departure time. Format: yyyy-MM-dd HH:mm Timezone: GMT +8. If flight transfer exists, separate time values with vertical bar (|). Specify this field only when business_type is 2 (AIR).

Example:
2018-10-22 20:49
admission_notice_url
string

If business_type is 3 (Overseas study consulting), the URL of admission notice (image) must be specified.

Example:
https://www.iconfont.cn/search/index?test
goods_info
string

Goods information that includes SKU names and corresponding quantities, in the format of SKU_name^quantity. If more than one goods exists, separate values with vertical bar (|). Specify this field only when business_type is 4 (Sales of goods).

Example:
pencil^2|eraser^5|iPhone XS 256G^1
total_quantity
number

Total quantities of all goods in one order. Specify this field only when business_type is 4 (Sales of goods).

Example:
8
other_business_type
string

If business_type is 5 (Others), specify the business type in details.

Example:
Airport pick up service
Client-side integration

Client is responsible for calling Alipay payment API by using the order information sent by the server, and returning the result based on SDK’s synchronously generated payment result. More details are as below:

Android Integrate
android SDK overview

Order payment Obtain SDK version number

Express pay SDK API on Android platform is shown in the following table:

API name API description
PayTask SDK provides object APIs of payment and inquiry.

PayTask object mainly provides sellers with order payment function and obtains current SDK version number.

Order payment

Method name: payTask.pay Method prototype: PayTask payTask = new PayTask (activity); payTask.pay (orderInfo, true); Method function: payTask.pay provides sellers with order payment function. Method parameters: Examples using PayTask with parameter activity.

iOS Integration
SDK overview

The client-side SDK can facilitate your integration with Alipay.

API name: AlipaySDK Description: AlipaySDK provides payment function. Alipay API provides sellers with order payment function. Methods provided by API are detailed in table 1 below:

Method name Method description
+(Alipay *)defaultService; Obtain payment service examples.
-(BOOL)isLogined; Check whether or not the seller is logged in locally.
-(void)payOrder:(NSString )orderStr fromScheme:(NSString )schemeStr callback:(CompletionBlock)completionBlock; Pay and get result via callback.
  • Express order payment iOS
  • Processing Client Side Returned URL
  • Callback API

Express order payment iOS

  • Method name: Pay method
  • Method prototype: (void)payOrder:(NSString )orderStr fromScheme:(NSString )schemeStr callback:(CompletionBlock)completionBlock;
  • Method function: Pay method provides sellers with express order payment function.
Parameter Name Parameter Description
NSString* scheme URL protocol registered by seller program is for the use of seller callback program after payment has been completed.
(CompletionBlock)completionBlock Express pay SDK callback function returns with “no need to log in” and payment result. When the Alipay client side is not installed locally, or when the Alipay client side is not successfully called to make payment (via H5 cashier), it will return to payment result via completionBlock. Please refer to “synchronous response parameter” for more details on the relevant payment results.
NSString* orderStr Pay and get result via callback.

Payment parameters examples are shown below, see “Request Parameters Description” for parameters description:

partner="2088101568358171"&seller_id="xxx@alipay.com"&out_trade_no="0819145412-6177"&subject="test"&body="testtest"&total_fee="0.01"&currency="USD"&forex_biz="FP"&notify_url="http://notify.msp.hk/notify.htm"&service="mobile.securitypay.pay"&payment_type="1"&_input_charset="utf-8"&it_b_pay="30m"&sign="lBBK%2F0w5LOajrMrji7DUgEqNjIhQbidR13GovA5r3TgIbNqv231yC1NksLdw%2Ba3JnfHXoXuet6XNNHtn7VE%2BeCoRO1O%2BR1KugLrQEZMtG5jmJIe2pbjm%2F3kb%2FuGkpG%2BwYQYI51%2BhA3YBbvZHVQBYveBqK%2Bh8mUyb7GM1HxWs9k4%3D"&sign_type="RSA"&secondary_merchant_id="834945"&secondary_merchant_industry="3435"&secondary_merchant_name="holiday"

Processing client side returned URL

  • Method name: processing client method
  • Method prototype: -(void)processOrderWithPaymentResult:(NSURL*)resultUrl standbyCallback:(CompletionBlock)completionBlock;
  • Method function: Client side processing method processes the Alipay client side returned _url _when the device has installed Alipay app.
Note:

This method must be implemented, otherwise when Alipay app is installed, the payment result cannot be synchronously returned.

Parameter Name Parameter Description
NSURL *resultUrl url returned by Alipay client
CompletionBlock completionBlock When Alipay client is installed locally and Alipay client is successfully called to make payment, it will return payment result via completionBlock
Note:

Please call this method - (BOOL)application:(UIApplication )application openURL:(NSURL )url sourceApplication:(NSString )sourceApplication annotation:(id)annotation in APPDelegate. In iOS9.0 and above versions (including iOS9.0), please call this method in - (BOOL)application:(UIApplication )app openURL:(NSURL )url options:(NSDictionary )options . See Demo for details.

Callback API

After the payment is completed, it will return the payment result synchronously via callbackBlock. Result returned needs to use value of the resultStatus and result fields to determine the payment result. When verifications of resultStatus=9000 and success=“true”, as well as sign=“xxx” are passed, payment is confirmed to be successful, otherwise, it may be regarded as failure. For circumstances of low security level, payment result can be determined by checking resultStatus and success=“true” only. An example of a successful order payment is shown below:

{ memo = ""; result = "partner=\"2088101568358171\"&seller_id=\"xxx@alipay.com\"&out_trade_no=\"0819145412-6177\"&subject=\"test\"&body=\"testtest\"&total_fee=\"0.01\"&currency=\"USD\"&forex_biz=\"FP\"&notify_url=\"http://notify.msp.hk/notify.htm\"&service=\"mobile.securitypay.pay\"&payment_type=\"1\"&_input_charset=\"utf-8\"&it_b_pay=\"30m\"&success=\"true\"&sign_type=\"RSA\"&sign=\"hkFZr+zE9499nuqDNLZEF7W75RFFPsly876QuRSeN8WMaUgcdR00IKy5ZyBJ4eldhoJ/2zghqrD4E2G2mNjs3aE+HCLiBXrPDNdLKCZgSOIqmv46TfPTEqopYfhs+o5fZzXxt34fwdrzN4mX6S13cr3UwmEV4L3Ffir/02RBVtU=\""; resultStatus = "9000"; }
Note:

The extraction of payment result must be obtained via CompletionBlock, and it prohibits developers from analysing payment results returned URL without permission. Key of the obtained value corresponds to resultStatus, memo and result (developers can analyse the value in the result at their own discretion);

In order to ensure the functioning of the existing seller’s SDK, the initial letter of return parameter ResultStatus is capitalized. For new SDKs, the conversion from ResultStatus to resultStatus has been implemented by unified tool classes, sellers can obtain resultStatus from CompletionBlock.

iOS integration process

Decompress API compressed file (file name is WS_MOBILE_PAY_SDK_BASE.zip), find out iOS compressed file (file name is 支付宝钱包支付开发包标准版(iOS).zip). Perform the following steps to install and configure the SDK:

  1. Import code
  2. Remarks for Running Demo Code
  3. Configuration
  4. Example on logic of code

Import code

Step 1: Start the IDE such as Xcode, copy the files in the zip file into the folder and import them into the project.
AlipaySDK.bundle
AlipaySDK.framework
  • The following scenarios would need special attention:
  • If it is Xcode 7.0 and above,it needs to include libc++.tbd、libz.tbd;
  • If it is Xcode version below 7.0,it needs to include libc++.dylib, libz.dylib.
Step 2: Add import to where AlipaySDK is required
Step 3: If the app is based on 9.0 compilation, due to the limitation of App Transport Security(ATS) on http in iOS9.0, we need to add exception for alipay.com, alipayobjects.com. in info.list.
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>alipay.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSTemporaryExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>alipayobjects.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSTemporaryExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>
Step 4: Set up the payment request.
Alipay Instore
sign
string required

Verification signature generated using API key.Signature Verification

mm_merchant_id
string required

MyMoney merchant id

Example:
mm_00000019
out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
out_return_no
string required

The unique refund ID for refund request

Max length: 64
Signature Verification

Signatures (MD5 digests) are used to verify incoming API requests and sign outgoing asynchronous notifications. An API key is required to generate the signature. The API key can be requested from Mymoney customer service.

For example: For the following data set: $pararameters = {“f”:456, “a”:null, “d”: “”, “e”: “mymoney”};

  1. Parameters should be Rearranged alphabetically so the $parameters = {“a”:null, “d”:"", “e”:“mymoney”,“f”:456};
  2. Delete parameters with empty value, null value so the $parameters = {“e”:“mymoney”, “f”:456}
  3. connect rearranged parameters with &, Generate a pre_str $pre_str = “e=mymoney&f=456”
  4. Add API key to the end of the query string. $temp_str = “e=mymoney&f=456{$api_key}”
  5. Generate a MD5 sinature and user this as the value of the common parameter name “sign” $sign = md5($temp_str);
MyMoney Channel 上游通道对接Pos机
  1. 上游通道对接Pos主扫退款
  2. 按照统一要求,定义对应的接口
  3. 按照统一要求,返回一定格式的数据 实现的接口列表
  4. pos_pay_alipay
  5. pos_pay_wechat
  6. pos_refund_alipay
  7. pos_reufund_wechat
上游通道
上游通道对接POS机

对接支付宝

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

Alipay

对接支付宝

POST /pos_pay_alipay
POST /pos_refund_alipay
pos_pay_alipay
POST /pos_pay_alipay

Request parameters

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

partner_trans_id
string optional

The transaction ID in the partner system, can be a sale order id and payment order id. Note: Partners are required to ensure the uniqueness of this parameter in each call. This parameter is also the key parameter for issue investigation

trans_name
string optional

The name of the transaction, shown in the transaction record list.

currency
string optional

The pricing currency, used for labelling the price of the transaction. This currency is also the settlement currency Alipay settled to the partner. Use upper case.

trans_amount
string optional

The transaction amount in the pricing currency. The value is in the range of 0.01 - 100000000.00 and with two decimal places.

extend_info
string optional

Extended information, containing extended parameters and merchant business information. For more details, see extend_info

service_name
string optional

服务的名称:固定值

Example:
pos_pay_alipay
partner_id
string optional

Responses

200 OK
Body
Object
is_success
string

Status of the API call, used to indicate whether the request is accepted by Alipay gateway. T: accepted F: rejected

Example:
T
request
Object
param
Array
Example:
["20190730100951","OVERSEAS_MBARCODE_PAY","UTF-8","barcode","157e625bce792646a66bda8fe3a039fc","2088131906583189","TEST","0.01","{\"secondary_merchant_name\":\"\\u7687\\u671dRoyal China (Baker Street)\",\"secondary_merchant_id\":\"35\",\"secondary_merchant_industry\":\"5812\",\"store_id\":\"F1C0CD1410\",\"store_name\":\"\\u7687\\u671dRoyal China (Baker Street) store\"}","1640473864361077","2088131906583189","alipay.acquire.overseas.spot.pay","GBP","287961709634870096","MD5"]
string
Example:
20190730100951
response
Object
alipay
Object
alipay_buyer_login_id
string

Alipay login ID of the buyer, can be an email address or mobile number. The ID is partially masked for privacy.

Example:
614***@qq.*
alipay_buyer_user_id
string

Alipay account number starting with 2088, unique in Alipay system

Example:
2088802975799141
alipay_pay_time
string

The time that the transaction was paid. Format: YYYYMMDDHHMMSS

Example:
20190730170954
alipay_trans_id
string

On the partner payment request, the Alipay system creates a transaction ID to handle it. The alipay_trans_id has one-one association with partner + partner_trans_id

Example:
2019073022001499140520060405
currency
string

The currency used for labelling the price of the transaction

Example:
GBP
exchange_rate
string

Conversion rate of the currency given in the request to CNY. The conversion happens at the time when Alipay trade order is created.

Example:
8.40452347
partner_trans_id
string

Equal to the partner_trans_id given in the request

Example:
1640473864361077
result_code
string

Response status of a request. The value can be: SUCCESS: The payment succeeds. FAILED: The payment is failed. Merchants can show the corresponding failure result to the cashier. UNKNOW: The payment result is unknown. For offline mode, the partner system need to cancel this transaction immediately. For offline to online mode, the partner system is suggested to query the transaction status in a certain frequency until a clear status is returned, or merchants can cancel this transaction after a certain time.

Example:
SUCCESS
trans_amount
string

Transaction amount in the pricing currency. The value of this parameter is in the range of 0.01 - 100000000.00 and with two decimal places.

Example:
0.01
trans_amount_cny
string

Transaction amount in CNY. It is the exact amount that the buyer has paid.

Example:
0.08
sign
string

Sign value. Note: This field is not returned if the error code is ILLEGAL_SIGN.

Example:
07ae867bcc50d3ae1140606feb1a4aac
sign_type
string

Sign type. DSA, RSA, and MD5 are supported. Use uppercase. Note: This field is not returned if the error code is ILLEGAL_SIGN.

Example:
MD5
pos_refund_alipay
POST /pos_refund_alipay

Request parameters

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

service_name
string required

fix value

Example:
pos_refund_alipay
partner_trans_id
string optional

The original partner transaction id given in the payment request

partner_refund_id
string optional

The refund order id on partner system. partner_refund_id cannot be same as partner_transaction_id partner_refund_id together with partner identify a refund transaction

refund_amount
string optional

Less than or equal to the original transaction amount and the left transaction amount if ever refunded.

currency
string optional

The refund currency. Use upper case. See <a href="https://global.alipay.com/doc/integration/currency"target=_blank>Supported Currency List for details.

is_sync
string optional

The refund request is processed synchronously or asynchronously. Value: Y or N. Default value is N, which means an asynchronous response from Alipay is returned to the merchant if the merchant has set the value of the notify_url field when sending the refund request. If the value is set as Y, it means only a synchronous response is returned to the merchant.

partner_id
string optional

Responses

200 OK
Body
Object
is_success
string
Example:
T
request
Object
param
Array
Example:
["1640473864361077","2088131906583189","utf-8","alipay.acquire.overseas.spot.refund","3758e5e0c38f53e5595321389d88c375","0.01","GBP","1564478133","1640474222730505","MD5","1564478133"]
string
Example:
1640473864361077
response
Object
alipay
Object
alipay_trans_id
string

On the partner’s payment request, the alipay system creates a transaction id to handle it. The alipay_trans_id has one-one association with partner + partner_trans_id.

Example:
2019073022001499140520060405
currency
string

Refund currency

Example:
GBP
exchange_rate
string

The rate of conversion the currency given in the request to CNY. The conversion happens at the time when Alipay’s trade order is created

Example:
8.40452347
partner_refund_id
string

The refund order id on partner system. partner_refund_id together with partner identify a refund transaction

Example:
1640474222730505
partner_trans_id
string

Equal to the partner_trans_id given in the request

Example:
1640473864361077
refund_amount
string

Less than or equal to the original transaction amount and the left transaction amount if ever refunded.

Example:
0.01
refund_amount_cny
string

Refund amount in CNY. It is the exact amount that the Alipay has refunded.

Example:
0.08
result_code
string

To describe the response status of a request: SUCCESS, FAILED, UNKNOW.

Example:
SUCCESS
sign
string
Example:
43fb8239e603dbba26c4d76889bbc444
sign_type
string
Example:
MD5
extend_info
Option Description
secondary_merchant_id A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Max length: 64 bytes.
secondary_merchant_name Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Max length: 128 bytes.Note: This parameter is required for partners.
secondary_merchant_industry The industry classification identifier of sub-merchant is assigned by Alipay.For example:Catering industry: 5812 Department stores: 5311 Lodging industry: 7011 Taxi industry: 4121 For more details, see secondary merchant industry list. Note: This parameter is required for partners.
store_name Store name. The value of this parameter can be null only when the store information is verified.
store_id Store ID, used to identify the store of a merchant. The ID can only contain letters, numbers, and underscores.Max length: 64 bytes. If this parameter is not provided, the transaction is to be intercepted for risk control reasons.
partner_id
string optional
Wechat
POST /pos_pay_wechat
POST /pos_refund_wechat
pos_pay_wechat
POST /pos_pay_wechat

Request parameters

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

service_name
string optional

服务的名称-固定值:pos_pay_wechat

Example:
pos_pay_wechat
sub_mch_id
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
out_trade_no
string required

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no

Max length: 32
Example:
1217752501201407033233368018
auth_code
string required

扫码支付授权码,设备读取用户微信中的条码或者二维码信息 (注:用户付款码条形码规则:18位纯数字,以10、11、12、13、14、15开头)

body
string required

商品或支付单简要描述,格式要求:门店品牌名-城市分店名-实际商品名称

Example:
image形象店-深圳腾大- QQ公仔
fee_type
string optional

符合ISO 4217标准的三位字母代码,默认人民币:CNY,

Max length: 16
spbill_create_ip
string required

支持IPV4和IPV6两种格式的IP地址。调用微信支付API的机器IP

Example:
8.8.8.8

Responses

200 OK
Body
Object
return_code
return_code required

SUCCESS/FAIL 此字段是通信标识,非交易标识,交易是否成功需要查看result_code来判断

Example:
SUCCESS
return_msg
return_msg required

返回信息,如非空,为错误原因 签名失败 参数格式校验错误

appid
appid required

服务商商户的APPID

Example:
wx8888888888888888
mch_id
string required

调用接口提交的商户号

Example:
1480962562
sub_mch_id

调用接口提交的子商户号

Example:
1900000109
nonce_str

微信返回的随机字符串

Example:
5K8264ILTKCH16CQ2502SI8ZNMTM67VS
sign

微信返回的签名

Example:
C380BEC2BFD727A4B6845133519F3AD6
result_code

SUCCESS/FAIL

openid

用户在商户appid 下的唯一标识

is_subscribe
is_subscribe nullable

用户是否关注公众账号,仅在公众账号类型支付有效,取值范围:Y或N;Y-关注;N-未关注

trade_type
string

支付类型为MICROPAY(即扫码支付)

Example:
MICROPAY
bank_type
string

银行类型,采用字符串类型的银行标识,

Example:
LQT
total_fee

订单总金额,单位为分,只能为整数,

fee_type

符合ISO 4217标准的三位字母代码,默认人民币:CNY

transaction_id

微信支付订单号

out_trade_no

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*且在同一个商户号下唯一。

attach
Object nullable

商家数据包,原样返回

time_end
string

支付完成时间,订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。

Example:
20190730172454
cash_fee
string

现金支付金额订单现金支付金额

Example:
8
cash_fee_type
string

货币类型,符合ISO 4217标准的三位字母代码

Example:
CNY
rate
string

费率

Example:
840429900
version
string

版本号

Example:
1.0
pos_refund_wechat
POST /pos_refund_wechat

Request parameters

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

service_name
string optional

服务的名称固定值:pos_refund_wechat

Example:
pos_refund_wechat
sub_mch_id
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
out_trade_no
string required

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no

Max length: 32
Example:
1217752501201407033233368018
out_refund_no
string optional

商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。

Example:
1217752501201407033233368018
total_fee
string optional

订单总金额,单位为分,只能为整数

Example:
1
refund_fee
string optional

退款总金额,单位为分,只能为整数,可部分退款

Example:
1
transaction_id
string optional

微信订单号

Example:
1217752501201407033233368018

Responses

200 OK
Body
Object
return_code
string

SUCCESS/FAIL 此字段是通信标识,表示接口层的请求结果,并非退款状态。

Example:
SUCCESS
return_msg
string

返回信息,如非空,为错误原因 签名失败 参数格式校验错误

Example:
OK
appid
string

服务商商户的APPID

Example:
wxbd23a7ea75006f8b
mch_id
string

微信支付分配的商户号

Example:
1480962562
sub_mch_id
string

微信支付分配的子商户号

Example:
212693009
nonce_str
string

随机字符串,不长于32位

Example:
TH3NvUSaVMFVQ4oF
sign
string
Example:
768522E743EA7A5560B2D05996620976
result_code
string

SUCCESS/FAIL SUCCESS退款申请接收成功,结果通过退款查询接口查询 FAIL 提交业务失败

Example:
SUCCESS
transaction_id
string

微信订单号

Example:
4200000382201907303829649602
out_trade_no
string

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。

Example:
21269300920190730102453
out_refund_no
string

商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔

Example:
21269300920190730102914
refund_id
string

微信退款单号

Example:
50000200962019073011037592484
refund_channel
Object
refund_fee
string

退款总金额,单位为分,可以做部分退款

Example:
1
coupon_refund_fee
string

代金券退款金额<=退款金额,退款金额-代金券或立减优惠退款金额为现金

Example:
0
total_fee
string

订单总金额,单位为分,只能为整数,

Example:
1
cash_fee
string

现金支付金额,单位为分,只能为整数,

Example:
8
fee_type
string

订单金额货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY

Example:
GBP
coupon_refund_count
string

退款代金券使用数量

Example:
0
cash_refund_fee
string

现金退款金额,单位为分,只能为整数

Example:
8
refund_fee_type
string

退款货币类型,需与支付一致,或者不填。符合ISO 4217标准的三位字母代码,默认人民币:CNY,

Example:
GBP
cash_fee_type
string

现金类型

Example:
CNY
cash_refund_fee_type
string

现金退款类型

Example:
CNY
sub_mch_id
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
out_trade_no
string required

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no

Max length: 32
Example:
1217752501201407033233368018
return_code
string
Example 1
SUCCESS
return_msg

返回信息,如非空,为错误原因 签名失败 参数格式校验错误

string

返回信息,如非空,为错误原因 签名失败 参数格式校验错误

Example 1
OK
appid

服务商商户的APPID

string

服务商商户的APPID

Example 1
wxbd23a7ea75006f8b
sub_mch_id

调用接口提交的子商户号

string

调用接口提交的子商户号

Example:
212693009
sign

微信返回的签名

string

微信返回的签名

Example 1
B2FCA553DFB43D3310750733373D70FF
nonce_str

微信返回的随机字符串

string

微信返回的随机字符串

Example 1
12oXCYY3Q3ILvly7
result_code

SUCCESS/FAIL

string

SUCCESS/FAIL

Example 1
SUCCESS
openid

用户在商户appid 下的唯一标识

string

用户在商户appid 下的唯一标识

Example 1
oeGOQxGMLoOe6_t3SZG3LQqd7YU8
is_subscribe

用户是否关注公众账号,仅在公众账号类型支付有效,取值范围:Y或N;Y-关注;N-未关注

string

用户是否关注公众账号,仅在公众账号类型支付有效,取值范围:Y或N;Y-关注;N-未关注

Example 1
N
total_fee

订单总金额,单位为分,只能为整数,

string

订单总金额,单位为分,只能为整数,

Example 1
1
fee_type

符合ISO 4217标准的三位字母代码,默认人民币:CNY

string

符合ISO 4217标准的三位字母代码,默认人民币:CNY

Example 1
GBP
transaction_id

微信支付订单号

string

微信支付订单号

Example 1
4200000382201907303829649602
out_trade_no

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*且在同一个商户号下唯一。

string

商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*且在同一个商户号下唯一。

Example 1
21269300920190730102453
service_name
string required

服务的名称

上游通道对接微信API
POST /wechat_query_order
POST /wechat_query_refund
POST /wechat_unifiedorder
POST /wechat_refund_order
POST /wechat_queryexchagerates
wechat_query_order
POST /wechat_query_order

Request parameters

channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

wechat_merchant_no
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
transaction_id
string required

微信订单号,微信的订单号,优先使用 微信订单号和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
out_trade_no
string required

商户订单号,商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 微信订单号 和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018

Responses

200 OK
Body
Object
return_code
string

此字段是通信标识,非交易标识,交易是否成功需要查看trade_state来判断

Example:
SUCCESS
return_msg
string

返回信息,如非空,为错误原因 签名失败 参数格式校验错误

Example:
OK
appid
string

服务商商户的APPID

Example:
wxbd23a7ea75006f8b
mch_id
string

微信支付分配的商户号

Example:
1480962562
sub_mch_id
string

微信支付分配的子商户号 微信分配的子商户公众账号ID

Example:
212693009
nonce_str
string

随机字符串,不长于32位

Example:
bzFShsBYIxguyGO4
sign
string

签名

Example:
71423F57B39CD95CF5206BC7C72AC4B2
result_code
string

业务结果

Example:
SUCCESS
openid
string
Example:
oeGOQxGMLoOe6_t3SZG3LQqd7YU8
is_subscribe
string
Example:
N
trade_type
string
Example:
MICROPAY
bank_type
string

付款银行,银行类型,采用字符串类型的银行标识

Example:
LQT
total_fee
string
Example:
1
fee_type
string
Example:
GBP
transaction_id
string
Example:
4200000375201907195651889525
out_trade_no
string
Example:
21269300920190719124754
attach
Object
time_end
string

支付完成时间

Example:
20190719194756
trade_state
string
Example:
REFUND
cash_fee
string
Example:
8
trade_state_desc
string

交易状态描述,对当前查询订单状态的描述和下一步操作的指引

Enumeration:
SUCCESS

支付成功

REFUND

转入退款

NOTPAY

未支付

CLOSED

已关闭

REVOKED

已撤销(刷卡支付)

USERPAYING

用户支付中

PAYERROR

支付失败(其他原因,如银行返回失败)

cash_fee_type
string

现金支付货币类型,货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型

Example:
CNY
rate
string
Example:
864780900
wechat_merchant_no
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
transaction_id
string required

微信订单号,微信的订单号,优先使用 微信订单号和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
out_trade_no
string required

商户订单号,商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 微信订单号 和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
wechat_query_refund
POST /wechat_query_refund

Request parameters

wechat_merchant_no
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
transaction_id
string required

微信订单号,微信的订单号,优先使用 微信订单号和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
out_trade_no
string required

商户订单号,商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 微信订单号 和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
out_refund_no
string optional
refund_id
string optional
offset
string optional

Responses

200 OK
Body
Object
appid
string
Example:
wxbd23a7ea75006f8b
cash_fee
string
Example:
8
cash_fee_type
string
Example:
CNY
fee_type
string
Example:
GBP
mch_id
string
Example:
1480962562
nonce_str
string
Example:
lOS1mKHd8aRFukr6
out_refund_no_0
string
Example:
21269300920190719153611
out_trade_no
string
Example:
21269300920190719124754
rate
string
Example:
864780900
refund_account_0
string
Example:
REFUND_SOURCE_UNSETTLED_FUNDS
refund_channel_0
string
Example:
ORIGINAL
refund_count
string
Example:
1
refund_fee
string
Example:
1
refund_fee_0
string
Example:
1
refund_id_0
string
Example:
50000501202019071910744436255
refund_recv_accout_0
string
Example:
支付用户的零钱通
refund_status_0
string
Example:
SUCCESS
refund_success_time_0
string
Example:
2019-07-19 22:36:13
result_code
string
Example:
SUCCESS
return_code
string
Example:
SUCCESS
return_msg
string
Example:
OK
sign
string
Example:
217689420FF5FC2C82DD01C7CA5F691C
sub_mch_id
string
Example:
212693009
total_fee
string
Example:
1
transaction_id
string
Example:
4200000375201907195651889525
wechat_unifiedorder
POST /wechat_unifiedorder
wechat_refund_order
POST /wechat_refund_order

Request parameters

wechat_merchant_no
string required

微信支付分配的子商户号

Max length: 32
Example:
1900000109
out_trade_no
string required

商户订单号,商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 微信订单号 和商户订单号不能同时为空

Max length: 32
Example:
1217752501201407033233368018
out_refund_no
string optional
total_fee
string optional
refund_amount
string optional
refund_fee_type
string optional
refund_desc
string optional
refund_account
string optional
out_refund_no
string optional
refund_id
string optional
refund_id
string optional
wechat_queryexchagerates
POST /wechat_queryexchagerates

Responses

200 OK
Body
Object
return_code
string
Example:
SUCCESS
return_msg
string
Example:
OK
appid
string
Example:
wxbd23a7ea75006f8b
mch_id
string
Example:
1480962562
sub_mch_id
string
Example:
212693009
fee_type
string
Example:
GBP
rate_time
string
Example:
20190829
rate
string
Example:
877350000
sign
string
Example:
CAB126E582CF6B650AAD612FE646E3C1
上游通道对接Alipay Online
POST /alipay_online_single_trade_query
POST /alipay_online_create_forex_trade_wap
POST /alipay_online_create_forex_trade_pc
POST /alipay_online_mobile_securitypay_pay
POST /alipay_online_forex_refund
alipay_online_single_trade_query
POST /alipay_online_single_trade_query

Request parameters

trade_no
string optional
out_trade_no
string required

The payment ID for the original payment transaction

Max length: 64
Example:
mm_19_001-201960414430000000000002
partner
string optional

alipay online partner_id

Example:
2088431618698950
partner
string required

alipay online partner_id

Example:
2088431618698950

Responses

200 OK
Body
Object
is_success
string

The status of the API call can be:T: successF: failed Example:T

Example:
T
request
Object
param
Array
Example:
["mm_2_001-201908260000000000001","2088431618698950","single_trade_query","utf-8"]
string
Example:
mm_2_001-201908260000000000001
response
Object
trade
Object
body
string

Merchandise description. Special characters are not supported.

Example:
test body
buyer_email
string

Buyer’s Alipay account

Example:
614***@qq.com
buyer_id
string

A unique buyer ID assigned by Alipay

Example:
2088802975799141
discount
string

The discount amount

Example:
0.00
flag_trade_locked
string

This parameter indicates whether the trade transaction is locked.1: the transaction is locked.0: the transaction is not locked.

Example:
0
gmt_create
string

The time when the transaction is created. Format: yyyy-MM-dd HH:mm:ss. Use GMT+8.

Example:
2019-08-26 16:11:44
gmt_last_modified_time
string

The last time when the value of total_fee is modified. Format: yyyy-MM-dd HH:mm:ss. Use GMT +8

Example:
2019-08-26 16:11:55
gmt_payment
string

The time when the transaction is paid by the buyer. Format: yyyy-MM-dd HH:mm:ss. Use GMT+8.

Example:
2019-08-26 16:11:55
is_total_fee_adjust
string

is_total_fee_adjust

Example:
F
operator_role
string

The operator role can be:B: BuyerS: Seller

Example:
B
out_trade_no
string

A unique transaction ID assigned by the partner

Example:
mm_2_001-201908260000000000001
payment_type
string

The payment type. See Payment Type for details.

Example:
100
price
string

The merchandise price in CNY. Value range: 0.01 - 100000000.00, accurate to two decimal places

Example:
0.09
quantity
string

The quantity of merchandises

Example:
1
seller_email
string

Partner Alipay Account

Example:
inf***@mymoney.net
seller_id
string

A unique seller ID assigned by Alipay. This 16-digit number begins with 2088.

Example:
2088431618698950
subject
string

Merchandise title. Special characters are not supported.

Example:
test
to_buyer_fee
string

The accumulative refunded amount paid to the buyer

Example:
0.00
to_seller_fee
string

The accumulative amount paid to the seller

Example:
0.09
total_fee
string

Transaction amount in CNY. It is the exact amount that the buyer has paid. Accurate to two decimal places

Example:
0.09
trade_no
string

A unique transaction ID assigned by Alipay, with a maximum length of 64 bytes and minimum length of 16 bytes. If both trade_no and out_trade_no appear, trade_no takes precedence.

Example:
2019082622001399140540989091
trade_status
string

Transaction status, the value can be:TRADE_FINISHED WAIT_BUYER_PAY TRADE_CLOSED

Enumeration:
TRADE_FINISHED
WAIT_BUYER_PAY
TRADE_CLOSED
use_coupon
string

This parameter indicates whether the Alipay coupon is used in the transaction.T: TrueF: False

Example:
F
sign
string
Example:
6478eb5c6371998c376534dac8dbee50
sign_type
string
Example:
MD5
alipay_online_create_forex_trade_wap
POST /alipay_online_create_forex_trade_wap

Request parameters

notify_url
string optional

The URL for receiving asynchronous notifications after the payment is completed.

return_url
string optional

The URL for receiving asynchronous notifications after the payment is completed.

subject
string optional

Brief description of the transaction. Special characters are not supported.Note: The value of this field will be displayed to customers.

body
string optional

Detailed description about the goods. Special characters are not supported.

out_trade_no
string optional

Unique transaction ID specified by the merchant. If the ID is duplicated with the out_trade_no of a previous transaction, the payment fails and an error message is returned to indicate that the payment is duplicated.

currency
string optional

Settlement currency code that the merchant specifies in the contract.Use upper case. See Supported Currencies for details.

total_fee
string optional

A floating number in the range of 0.01~1000000.00. If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the exchange rate.

rmb_fee
string optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

timeout_rule
string optional

The default value is 12h. Contact Alipay Technical Support if you need to use other values. This parameter specifies the valid time from login to completion.

supplier
string optional

Supplier name, for page display purpose.

secondary_merchant_id
string optional

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_name
string optional

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant.Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_industry
string optional

Industry classification identifier of sub-merchant which assigned by Alipay. For example:catering industry: 5812department stores: 5311lodging industry: 7011taxi industry: 4121For more details, see secondary merchant industry list.Note: This parameter is required for acquirers and system integrators with secondary merchants.

refer_url
string optional

Website of the secondary merchant

product_code
string optional

The code of the Alipay product you use. In this case, the value of this field is NEW_WAP_OVERSEAS_SELLER.

Example:
NEW_WAP_OVERSEAS_SELLER
split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail info

app_pay
string optional

The flag that is used to identify whether the transaction activates Alipay wallet app to process the payment. If Alipay wallet app is not installed, the payment will be processed by WAP page.

Example:
Y
trade_information
string optional

Information about the trade industry. See trade_information for details.

Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
partner
string required

alipay online partner_id

Example:
2088431618698950

Responses

200 OK
Body
string
alipay_online_create_forex_trade_pc
POST /alipay_online_create_forex_trade_pc

Request parameters

notify_url
string optional

The URL for receiving asynchronous notifications after the payment is completed.

return_url
string optional

After the payment is completed, the result is sent to this URL through URL redirect.

subject
string optional

Brief description of the transaction. Special characters are not supported.Note: The value of this field will be displayed to customers.

body
string optional

Detailed description of the goods. Special characters are not supported.

out_trade_no
string optional

Unique transaction ID specified by the partner. If the ID is duplicated with an earlier transaction’s out_trade_no, the payment will fail with a error message indicating that the payment is duplicated.

currency
string optional

Settlement currency code that the merchant specifies in the contract.Use upper case. See Supported Currencies for details.

total_fee
string optional

A floating number in the range of 0.01 - 1000000.00.If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the

rmb_fee
string optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

timeout_rule
string optional

The default value is 12h. Contact Alipay Technical Support if you need to use other values. This parameter specifies the valid time from login to completion.

order_gmt_create
string optional

YYYY-MM-DD HH:MM:SS Use Beijing time to synchronize with Alipay system. This parameter can only be used with order_valid_time together to control the valid time from redirection to login.

order_valid_time
string optional

Order valid time in seconds.Max value is 2592000. This parameter can only be used with the order_gmt_create parameter to control the valid time. If the current time passes the time of order_gmt_create plus order_valid_time, the payment transaction will be closed.

supplier
string optional

Supplier name, for page display.

secondary_merchant_id
string optional

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_name
string optional

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_industry
string optional

Industry classification identifier of sub-merchant which is assigned by Alipay. For example:catering industry: 5812department stores: 5311lodging industry: 7011taxi industry: 4121 Note: This parameter is required for acquirers and system integrators with secondary merchants.

refer_url
string optional

Website of the secondary merchant

product_code
string optional

Product code. The value is fixed as NEW_OVERSEAS_SELLER in this interface

Example:
NEW_OVERSEAS_SELLER
split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail info

Example:
Split info in JSON format. For more details, see Split Detail info
trade_information
string optional

Information about the trade industry. [] See trade_information for details.

Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
partner
string required

alipay online partner_id

Example:
2088431618698950

Responses

200 OK
Body
string
Example:
https://intlmapi.alipay.com/gateway.do?service=create_forex_trade&_input_charset=UTF-8&partner=2088431618698950&notify_url=http%3A%2F%2F8.208.9.37%2F%7Emymoney%2Fapi%2Fv1%2Falipay%2Falipay_online_wap_notify&return_url=localhost%2Fmy_money_pay0506%2Fapi%2Fv1%2Falipay_wap_return_url&subject=test&body=test+body&out_trade_no=mm_2_001-201908260000000000001&currency=GBP&total_fee=0.01&supplier=UKDOTPRO+LTD&product_code=NEW_OVERSEAS_SELLER&secondary_merchant_id=mm_2_001&secondary_merchant_name=UKDOTPRO+LTD&secondary_merchant_industry=5734&refer_url=localhost%2Fmy_money_pay0506%2Ftest&trade_information=%7B%22business_type%22%3A4%2C%22goods_info%22%3A%22pencil%5E1%22%2C%22total_quantity%22%3A1%7D&sign_type=MD5&sign=31a37da9e517e385b3f7a3711485ca38"
alipay_online_mobile_securitypay_pay
POST /alipay_online_mobile_securitypay_pay

Request parameters

return_url
string optional

After the payment is completed, the web page is redirected to this URL

notify_url
string optional

The URL for receiving asynchronous notifications after the payment is completed.

Max length: 200
appenv
string optional

A string used to identify client source. Parameter value is agreed as follows:appenv=“system=client platform name ^version=business system version”, for example:appenv="system=iphoneversion=3.0.1.2"appenv=“system=ipadversion=4.0.1.1”

Example:
appenv="system=android^version=3.0.1.2"
out_trade_no
string optional

Unique transaction ID specified by the merchant. If the ID is duplicated with the out_trade_no of a previous transaction, the payment fails and an error message is returned to indicate that the payment is duplicated.

subject
string optional

Product title, transaction title, order title, or order keywords.

payment_type
string optional

Payment type. The default value is 1 ( stands for purchase of goods)

total_fee
string optional

A floating number in the range of 0.01 - 1000000.00.If total_fee is not null, it means the transaction uses foreign currency and the product price will be calculated in RMB based on the exchange rate.

rmb_fee
string optional

A floating number in the range of 0.01 - 1000000.00. This parameter is used to replace the total_fee parameter if partners want to price their product in RMB. If total_fee is used, don’t set the rmb_fee parameter because they are mutually exclusive.

body
string optional

Detailed description about the goods. Special characters are not supported.

currency
string optional

Use upper case. See Supported Currencies for details.

forex_biz
string optional

Specify FP to this field.

it_b_pay
string optional

Use this parameter to specify the expiration time of unpaid transactions. The transaction is automatically closed if the transaction expires.The value can be:A period of time after which the transaction is to be closed. The value is in the range of 1m - 15d, m for minute, h for hour, d for day, 1c represents the current day. When 1c is specified, the transaction is closed at 0:00 whenever the transaction was created.The demical number is not supported. Convert the demical number to a whole number. For example, 1.5h can be converted into 90m. A date in the format of YYYY-MM-DD HH:MM:SS, after which the transaction is to be closed. For example: 2018-06-13 16:00:00.Note: If this field is specified, Alipay needs to be advised to set the close time

extern_token
string optional

Token that includes account information, returned by open platform. With the authorization token, merchants can access some services of Alipay within a specified period.

secondary_merchant_id
string optional

A unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores. Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_name
string optional

Secondary merchant name, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Note: This parameter is required for acquirers and system integrators with secondary merchants.

secondary_merchant_industry
string optional

Industry classification identifier of sub-merchant which assigned by Alipay. For example:catering industry: 5812department stores: 5311lodging industry: 7011taxi industry: 4121 For more details, see secondary merchant industry list. Note: This parameter is required for acquirers and system integrators with secondary merchants.

refer_url
string optional

The link to download the merchant app.

product_code
string optional

Product code. The value is NEW_WAP_OVERSEAS_SELLER

split_fund_info
string optional

Split info in JSON format. For more details, see Split Detail info

trade_information
string optional
Example:
{"business_type":"1","hotel_name":"zlidu, sluhg-987, 889utng","check_in_time":"2018-10-20","check_out_time":"2018-10-22"}
partner
string required

alipay online partner_id

Example:
2088431618698950
alipay_online_forex_refund
POST /alipay_online_forex_refund

Request parameters

notify_url
string optional
out_return_no
string optional

The unique refund ID for refund request

out_trade_no
string optional

The payment ID for the original payment transaction

return_amount
string optional

The amount to refund in settlement currency. The value is in the range of 0.01 – 1000000, with at most 2 digits after the decimal point. One of the following two parameters must be specified: return_amount return_rmb_amount

return_rmb_amount
string optional

Use this field to refund in CNY. The value is in the range of 0.01 – 1000000, with at most 2 digits after the decimal point. One of the following two parameters must be specified: return_amount return_rmb_amount

currency
string optional

Currency code. Even when the return_rmb_amount parameter is not null, currency is still the foreign currency, not CNY.Use upper case.See Supported Currencies for details.

gmt_return
string optional

Refund transaction time. Format: YYYYMMDDHHMMSS, Beijing Time

reason
string optional

Reason for the refund

product_code
string optional

Product code, which is NEW_OVERSEAS_SELLER for website payment refund, and is NEW_WAP_OVERSEAS_SELLER for WAP or APP payment refund.

Enumeration:
NEW_OVERSEAS_SELLER
NEW_WAP_OVERSEAS_SELLER
is_sync
string optional

To indicate that the refund request is processed synchronously or asynchronously with a value of Y or N.The default value is N, which means an asynchronous response from Alipay is returned to the merchant if the merchant has set the value of the notify_url field when sending the refund request. If the value is set as Y, it means only a synchronous response is returned to the merchant

split_fund_info
string optional

Split info in JSON format. For more details, see Refund Split Detail Info.

Example:
[{"transOut":"2088101137935255","amount":"0.10","currency":"USD","desc":"test1"},{"transOut":"2088101126707869","amount":"0.10","currency":"USD","desc":"test2"}]
channel_code
string required

对接渠道的code

sign
string required

需要mymoney 生成secret 给上游通道对接人员使用,验证是否是由mymoney发送过去的数据,利于数据安全,验证签名

签名算法:Signature Verification

partner
string required

alipay online partner_id

Example:
2088431618698950

Responses

200 OK
Body
Object
is_success
string

Status of the API call, with a value of T or F

Example:
T
partner
string required

alipay online partner_id

Example:
2088431618698950
上游通道对接Alipay Instore
POST /alipay_instore_precreate
POST /alipay_instore_query_order
POST /alipay_instore_refund_order
alipay_instore_precreate
POST /alipay_instore_precreate

Request parameters

out_trade_no
string optional
subject
string optional
total_fee
string optional
seller_id
string optional
currency
string optional
trans_currency
string optional
extend_params
string optional
notify_url
string optional
seller_email
string optional
body
string optional
show_url
string optional
price
string optional
quantity
string optional
goods_detail
string optional
partner_id
string optional

partner id

alipay_instore_query_order
POST /alipay_instore_query_order

Request parameters

out_trade_no
string optional
alipay_trans_id
string optional
partner_id
string optional

partner id

Responses

201 Created
Body
Object
is_success
string

It indicates that a request is accepted by Alipay gateway.T for accepted

Example:
T
request
Object
param
Array
Example:
["1639381707879634","2088131906583189","utf-8","alipay.acquire.overseas.query","ec18a28ffd583bad90aae039aafc9317","1566981063","MD5","1566981063"]
string
Example:
1639381707879634
response
Object
alipay
Object
alipay_buyer_login_id
string

The buyer’s Alipay login Id, the id might be an email or mobile number.The id is partially masked for privacy.

Example:
614***@qq.*
alipay_buyer_user_id
string

This ID stands for each Alipay account number ,unique in Alipay system start with 2088.

Example:
2088802975799141
alipay_pay_time
string

The time of the transaction has been paid.Format: YYYYMMDDHHMMSS

Example:
20190718155032
alipay_trans_id
string

On the partner’s payment request, the alipay system creates a transaction id to handle it.The alipay_trans_id has one-one association with partner + partner_trans_id.

Example:
2019071822001499141051980452
alipay_trans_status
string

The value for this field can be one of the following items:WAIT_BUYER_PAY: the system is waiting for the user to enter the password or waiting for the user to add the fund source. You need to call the query API to query the transaction result until you get a result of TRADE_SUCCESS or TRADE_CLOSED. TRADE_SUCCESS: the transaction succeeds. You can update your system with the latest transaction status.TRADE_CLOSED: the transaction was closed and in a status of non-success, caused by time out or a cancel request. You can close the transaction in your system.

Enumeration:
TRADE_SUCCESS
TRADE_CLOSED
currency
string

The currency used for labeling the price of the transaction;

Example:
GBP
exchange_rate
string

The rate of conversion the currency given in the request to CNY.The conversion happens at the time when Alipay’s trade order is created.

Example:
8.57190000
out_trade_no
string
Example:
1639381707879634
partner_trans_id
string
Example:
1639381707879634
result_code
string

To describe the response status of a request:SUCCESS, FAIL

Example:
SUCCESS
trans_amount
string

the transaction amount in the currency given above;Range: 0.01-100000000.00. Two digits after decimal point.

Example:
0.01
trans_amount_cny
string

Transaction amount in CNY.It is the exact amount that the buyer has paid

Example:
0.09
sign
string
Example:
bb8f0933d6e931985403ab02a72d186d
sign_type
string
Example:
MD5
alipay_instore_refund_order
POST /alipay_instore_refund_order

Request parameters

out_trade_no
string optional
refund_id
string optional
refund_amount
string optional
currency
string optional
refund_reason
string optional
alipay_trans_id
string optional
is_sync
string optional
partner_id
string optional

partner id

Responses

200 OK
Body
Object
is_success
string
Example:
T
request
Object
param
Array
Example:
["mm_1_001-2019082822270000000001","2088131906583189","utf-8","alipay.acquire.overseas.spot.refund","5560a751b065df894d367589d32822dc","0.01","GBP","test info","N","MD5"]
string
Example:
mm_1_001-2019082822270000000001
response
Object
alipay
Object
alipay_trans_id
string
Example:
2019082822001499140554715754
currency
string
Example:
GBP
exchange_rate
string
Example:
8.80577150
partner_refund_id
string
Example:
20190829000000020000000058257748
partner_trans_id
string
Example:
mm_1_001-2019082822270000000001
refund_amount
string
Example:
0.01
refund_amount_cny
string
Example:
0.09
result_code
string
Example:
SUCCESS
sign
string
Example:
060cffee810b89de8045124b930a3303
sign_type
string
Example:
MD5
partner_id
string optional

partner id