Refund

Refund

POST https://mapi.yuansfer.com/app-data-search/v3/refund

This API refunds the payment of a transaction.

Request Body

NameTypeDescription

merchantNo*

string

Merchant ID

storeNo *

string

Store ID

refundAmount*

string

The refund amount in price currency.

currency*

number

The supported transaction currency are "USD".

settleCurrency*

number

The supported settlement currency are "USD".

transactionNo

string

The Transaction ID in the Yuansfer system. Either transactionNo or reference is required.

reference

string

The Invoice Number of the transaction in the merchant's system. Either transactionNo or reference is required.

refundReference*

string

The ID of the refund transaction in the merchant's system.

verifySign*

string

The parameter signature.

{
    "result": {
        "amount": "0.01",
        "currency": "USD",
        "reference": "test20200101306",
        "refundAmount": "0.01",
        "refundReference": "refund2020101305",
        "refundTransactionNo": "297553638302358781",
        "settleCurrency": "USD",
        "status": "success",
        "transactionNo": "297553638301777927"
    },
    "ret_msg": "refund success ",
    "ret_code": "000100"
}

Response

Parameter

Type

Description

result

object

The result of the refund.

ret_msg

string

The response return message.

ret_code

string

The response return code. For more details, see here.

Result Object

Parameter

Type

Description

amount

number

The transaction amount.

refundAmount

number

The transaction refund amount. This parameter will be returned only when the payment order contains a 'Amount'.

currency

string

The supported transaction currencies are "USD" "CNY".

settleCurrency

string

The supported settlement currencies are "USD".

status

string

The status of the refund.

reference

string

The Invoice Number of the transaction in the merchant’s system.

refundReference

string

The ID of the refund transaction in the merchant’s system.

refundTransactionNo

string

The ID of the refund transaction in the Yuansfer system.

transactionNo

string

The Transaction ID in the Yuansfer system.

curl -XPOST -H "Content-type: application/json" -d '{
    "merchantNo": "200043",
    "storeNo": "300014",
    "verifySign": "dd81f7781603bec48ae2c6a9ac758bf2",
    "refundAmount": "0.01",
    "currency": "USD",
    "settleCurrency": "USD",
    "transactionNo": "297553638301777927",
    "refundReference": "refund2020101305"
}' 'https://mapi.yuansfer.com/app-data-search/v3/refund'

Last updated