alipay.intl.acquiring.offline.notify.pay

Alipay sends a notification to the merchant after the order is paid successfully or unsuccessfully.

Request

Request parameters

Header

No

Name

Description

Type

Length

Required

Remarks

Sample

1

version

SPI version

string

8

ME

As per the respective SPI reference.

2.0.0

2

function

SPI interface

string

128

ME

According to specifications defined by each business domain.

alipay.intl.function

3

clientId

Client ID

string

32

ME

Provided by Alipay, used to identify partner and application system.

2014000014442

4

reqTime

Request time

datetime

/

M

DateTime with timezone, which follows the ISO-8601 standard. 
Refer to: RFC 3339 Section 5.6

2001-07-04T12:08:56+05:30

5

reqMsgId

Request message ID

string

64

ME

Each request will be assigned with a unique ID (uuid).
The reqMsgId identifies a unique system request, it is not used to identify a unique business request.

1234567asdfasdf1123fda

6

reserve

Reserved for future implementation

string

256

O

Key/Value

{}

Body

No

Name

Description

Type

Length

Required

Remarks

Sample

1

resultInfo

Result information

ResultInfo

/

M

Result information

{
"resultStatus": "S",
"resultCodeId": "00000000",
"resultCode":"SUCCESS",
"resultMsg": "result message"
}

2

acquirementId

Unique Alipay transaction ID.

Note: This field is required when resultInfo.resultCode is SUCCESS.

string

64

C

2015032412007101547201352747

3

merchantTransId 

Unique merchant transaction ID.

string

64

M

The unique merchant transaction ID, copied from the original payment request.

51051001000000000002

4

orderAmount

Order amount.

Note: This field is required when resultInfo.resultCode is SUCCESS.

Money

/

C

The transaction amount, copied from the original payment request.
The  orderAmount should be provided in the smallest common currency unit. For example, to create a charge for $1.00, you would set orderAmount.value as 100 (100 cents).

{"value":"10000", "currency":"USD" }

5

payAmount

User actual paid amount.

Note: This field is required when resultInfo.resultCode is SUCCESS and payCurrencyDifferentWithOrderCurrency is true.

Money

/

C

May have different currency with orderAmount.

{"currency":"CNY", "value":"1481"}

6

conversionRate

The conversion rate.

Note: This field is required when resultInfo.resultCode is SUCCESS and payCurrencyDifferentWithOrderCurrency is true.

ExchangeRate

/

C

The exchage rate between orderAmount and payAmount.

{
"baseCurrency":"USD",
"exchangeCurrency":"CNY",
"rate":"6.9123"
}

7

paymentTime 

The payment time of the transaction.

Note: This field is required when resultInfo.resultCode is SUCCESS.

datetime

/

C

DateTime with timezone, which follows the ISO-8601 standard. 
Refer to: RFC 3339 Section 5.6

2016-07-04T12:08:56+05:30

8

userId

User ID.

Note: This field is required when resultInfo.resultCode is SUCCESS.

string

64

C

2088455609687485

9

loginId

Masked login ID.

Note: This field is required when resultInfo.resultCode is SUCCESS.

string

64

C

cao***@126.com

10

extendInfo

Reserved for extended information

string

2048

O

Key/Value

{}

Request sample

copy
{
    "request":{
        "head":{
            "version":"2.0.0",
            "function":"alipay.intl.acquiring.offline.notify.pay",
            "clientId":"2014000014442",
            "reqTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"1234567asdfasdf1123fda",
            "reserve":"{}"
        },
        "body":{
            "resultInfo":{
                "resultStatus":"S",
                "resultCodeId":"00000000",
                "resultCode":"SUCCESS",
                "resultMsg":"success"
            },
            "acquirementId":"2015032412007101547201352747",
            "merchantTransId":"51051001000000000002",
            "orderAmount":{
                "currency":"USD",
                "value":"239"
            },
            "paymentTime":"2016-07-04T12:08:56+05:30",
            "userId":"2088455609687485",
            "loginId":"cao***@126.com",
            "extendInfo":"{}"
        }
    },
    "signature":"signature string"
}

Response

Response parameters

Header

No

Name

Description

Type

Length

Required

Remarks

Sample

1

version

SPI version

string

8

ME

As per the respective SPI reference.

2.0.0

2

function

SPI interface

string

128

ME

According to specifications defined by each business domain.

alipay.intl.function

3

clientId

Client ID

string

32

ME

Provided by Alipay, used to identify partner and application system.

2014000014442

4

respTime

Response time

datetime

/

M

DateTime with timezone, which follows the ISO-8601 standard. 
Refer to: RFC 3339 Section 5.6

2001-07-04T12:08:56+05:30

5

reqMsgId

Request message ID

string

64

ME

Each request will be assigned with a unique ID (uuid).

1234567asdfasdf1123fda

6

reserve

Reserved for future implementation

string

256

O

Key/Value

{}

Body

No

Name

Description

Type

Length

Required

Sample

1

resultInfo

Result information

ResultInfo

/

M


"resultStatus": "S", 
"resultCodeId": "00000000", 
"resultCode":"SUCCESS", 
"resultMsg": "result message" 
}

Response sample

copy
{
    "request":{
        "head":{
            "version":"2.0.0",
            "function":"alipay.intl.acquiring.offline.notify.pay",
            "clientId":"2014000014442",
            "reqTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"1234567asdfasdf1123fda",
            "reserve":"{}"
        },
        "body":{
            "resultInfo":{
                "resultStatus":"S",
                "resultCodeId":"00000000",
                "resultCode":"SUCCESS",
                "resultMsg":"success"
            },
            "acquirementId":"2015032412007101547201352747",
            "merchantTransId":"51051001000000000002",
            "orderAmount":{
                "currency":"USD",
                "value":"239"
            },
            "paymentTime":"2016-07-04T12:08:56+05:30",
            "userId":"2088455609687485",
            "loginId":"cao***@126.com",
            "extendInfo":"{}"
        }
    },
    "signature":"signature string"
}

Result codes

No

ResultCodeId

ResultCode

ResultStatus

Remarks

1

00000000

SUCCESS

S

success

2

00000901

UNKNOWN_EXCEPTION

U

API failed due to unknown reasons.

3

00000004

PARAM_ILLEGAL

F

Illegal parameters. For example, non-numeric input, invalid date.

4

00000007

INVALID_SIGNATURE

F

The signature is invalid.