Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

alipay.intl.acquiring.offline.notify.pay

Alipay will notify merchant’s website of the result data it processed through initiative notification from server after it completes the processing of request data of merchant. These result data are asynchronous notification parameters from server. As a merchant, you need to send a response to this request with the required parameters according to this document. 

Request header

ParameterDescription

version

String(8) Required

The API version 

Example:2.0.4

function

String(128) Required

The API name 

Example:alipay.intl.acquiring.offline.notify.pay

clientId

String(32) Required

The unique ID assigned by Alipay to identify a client that makes API calls 

Example:385xxxxxxxxx0001

reqTime

Date time Required

Request time. Date time with timezone, see RFC 3339 Section 5.6 for details 

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

reqMsgId

String(64) Required

Request message ID. The unique ID assigned by client to identify a request message 

Example:123xxxxxxxxxxxxxxx3fda

reserve

String(256)

Reserved parameter. Key-Value formatted parameter for future use 

Example:{key/value}

Request body

ParameterDescription

resultInfo

ResultInfo Required

Result info. See resultInfo for details 

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

merchantId

String(64)

The acquirer ID, assigned by Alipay. You can get this parameter with your Alipay account. Note: This parameter is returned only when resultInfo.resultCode is SUCCESS.

Example:211xxxxxxxxxxxxxx2999

acquirementId

String(64)

Alipay transaction ID. The unique transaction ID assigned by Alipay only when the transaction succeeds. Note: This parameter is returned only when resultInfo.resultCode is SUCCESS.

Example:201xxxxxxxxxxxxxxxxxxxxx2747

merchantTransId

String(64) Required

Merchant transaction ID. The unique ID assigned by the merchant to identify a transaction. Only when the transaction succeeds, this field is returned 

Example:510xxxxxxxxxxxxx1234

orderAmount

Money

Transaction amount. The value for this field must be the same as that of orderAmount passed in the payment request and need to be provided in the smallest common currency unit. For example, to create a charge for $1.00, set orderAmount.value=100 (100 cents).This parameter is returned only when resultInfo.resultCode is SUCCESS.See Money for details.

Example:{"currency":"USD", "value":"239"}

payAmount

Money

Payment amount, might have different currency with the transaction amount.This parameter is returned only when resultInfo.resultCode is SUCCESS and payCurrencyDifferentWithOrderCurrency is true. See Money for details. 

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

conversionRate

ExchangeRate

The exchage rate between the transaction amount and payment amount.This parameter is returned only when resultInfo.resultCodeis SUCCESS and payCurrencyDifferentWithOrderCurrency is true. See ExchangeRate for details. 

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

paymentTime

Date time

The time when the payment occurred. Date time with timezone, see RFC 3339 Section 5.6 for details.This parameter is returned only when resultInfo.resultCode is SUCCESS.

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

acquiringSite

String

Acquiring site.This parameter is returned only when resultInfo.resultCode is SUCCESS.See SiteEnum for details.

Example:ALIPAY_SG

userSite

String

Payment user site.This parameter is returned only when resultInfo.resultCode is SUCCESS.See SiteEnum for details.

Example:ALIPAY_CN

userId

String(64)

User ID.This parameter is returned only when resultInfo.resultCode is SUCCESS. 

Example:208xxxxxxxxx7485

userLoginId

String(64)

User login id in the payment site.This parameter is returned only when resultInfo.resultCode is SUCCESS.

Example:123***@gmail.com

createTime

Date time

The time when the transaction is created. Date time with timezone, see RFC 3339 Section 5.6 for details.This parameter is returned only when resultInfo.resultCode is SUCCESS.

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

settleOrder

SettleOrder

Settlement information. This parameter is returned only when orderCurrency is not the same as settleCurrency.See SettleOrder for details. 

Example:{"settleOrderAmount":{"currency":"USD","value":"239"},"settleExchangeRate":{"baseCurrency":"USD","exchangeCurrency":"CNY","rate":"6.9123"}}

extendInfo

String(2048)

Extended information. Key-Value formatted parameter for future use 

Example:{"isEnterpriseUser":"true"}

Response head

ParameterDescription

version

String(8) Required

The API version 

Example:2.0.4

function

String(128) Required

The API name 

Example:alipay.intl.acquiring.offline.notify.pay

clientId

String(32) Required

The unique ID assigned by Alipay to identify a client that makes API calls 

Example:385xxxxxxxxx0001

respTime

Date time Required

Response time. Date time with timezone, see RFC 3339 Section 5.6 for details 

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

reqMsgId

String(64) Required

Request message ID. The unique ID assigned by client to identify a request message 

Example:123xxxxxxxxxxxxxxx3fda

reserve

String(256)

Reserved parameter. Key-Value formatted parameter for future use 

Example:{key/value}

Response body

ParameterDescription

resultInfo

ResultInfo Required

Result info. See resultInfo for details 

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

Subparameters

resultInfo

ParameterDescription

resultStatus

String(2) Required

The request status can be:S: successF: failureU: unknown

Example:S

resultCodeId

String(8) Required

An 8-digit code that is used to identify a result. When resultStatus is S, the value must be 00000000. When resultStatus is F or U, the value can be other result ID specified by the interface 

Example:00000000

resultCode

String(64) Required

The result code 

Example:SUCCESS

resultMsg

String(256)

Result message. When resultCode is S, this value can be empty. When resultCode is F or U, the error description is required

Example:success

Money

ParameterDescription

currency

String(3) Required

The 3-letter currency code. See supported currencies for details 

Example:USD

value

Number(16) Required

The amount. This value must be provided in the smallest common currency unit. For example, to create a charge for $1.00, you can set orderAmount: value=100 (100 cents) 

Example:239

ExchangeRate

ParameterDescription

baseCurrency

String(3) Required

The base currency 

Example:USD

exchangeCurrency

String(3) Required

The exchange currency 

Example:CNY

rate

String(16) Required

The exchange rate of baseCurrency against exchangeCurrency

Example:6.9123

SiteEnum

Name

Type

Description

ALIPAY_CN

String

Alipay site for Chinese mainland

ALIPAY_HK

String

Alipay site for Hong Kong, China

ALIPAY_SG

String

Alipay Singapore site

KAKAOPAY

String

KakaoPay

SettleOrder

ParameterDescription

settleOrderAmount

Money Required 

Merchant settlement amount and currency.See Money for details.

Example:{ "currency":"USD", "value":"239" }

settleExchangeRate

ExchangeRate

Settlement exchange rate.This parameter is returned only when orderCurrency is not the same as settleCurrency. See ExchangeRate for details. 

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

extendInfo

String(2048)

Reserved for extended info 

Example:{key/value}

Result code

Basic result code

resultCodeId

resultCode

resultStatus

Remarks

00000000

SUCCESS

S

Success

00000901

UNKNOWN_EXCEPTION

U

API call failed because of unknown reasons.

00000004

PARAM_ILLEGAL

F

The parameter is incorrect.

00000007

INVALID_SIGNATURE

F

The signature is invalid.

Sample

Request sample

copy
{
    "request":{
        "head":{
            "version":"2.0.4",
            "function":"alipay.intl.acquiring.offline.notify.pay",
            "clientId":"385xxxxxxxxx0001",
            "reqTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"123xxxxxxxxxxxxxxx3fda",
            "reserve":"{}"
        },
        "body":{
            "resultInfo":{
                "resultStatus":"S",
                "resultCodeId":"00000000",
                "resultCode":"SUCCESS",
                "resultMsg":"success"
            },
            "merchantId":"211xxxxxxxxxxxxxx2999",
            "acquirementId":"201xxxxxxxxxxxxxxxxxxxxx2747",
            "merchantTransId":"510xxxxxxxxxxxxx1234",
            "orderAmount":{
                "currency":"USD",
                "value":"239"
            },
            "paymentTime":"2016-07-04T12:08:56+05:30",
            "acquiringSite":"ALIPAY_SG",
            "userSite":"ALIPAY_CN",
            "userId":"208xxxxxxxxx7485",
            "userLoginId":"123***@163.com",
            "createTime":"2016-07-04T12:08:56+05:30",
            "extendInfo":"{\"merchantNotifyUrl\":\"notifyUrl\"}"
        }
    },
    "signature":"signature string"
}

Response sample

copy
{
    "response":{
        "head":{
            "version":"2.0.4",
            "function":"alipay.intl.acquiring.offline.notify.pay",
            "clientId":"385xxxxxxxxx0001",
            "respTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"123xxxxxxxxxxxxxxx3fda",
            "reserve":"{}"
        },
        "body":{
            "resultInfo":{
                "resultStatus":"S",
                "resultCodeId":"00000000",
                "resultCode":"SUCCESS",
                "resultMsg":"success"
            }
        }
    },
    "signature":"signature string"
}