Skip to content

Refund Application

  • Endpoint: POST /aggregate-pay/api/gateway/refund
  • Tags: Collection Service

Description

The payment methods which support to refund refer to [Cashier Payment - Payment Method List] , Transactions are refundable within 180 days from the transaction date. The time user receive the refund money depends on the processing time of banks or institutions.

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

Parameter Examples

  • Content-Type: "application/json"
  • sign: "FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="

Request Body

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesAPI version. Current value: 1.5
keyVersionstringYesSignature Algorithm Version, Current value: 1
requestTimestringYesRequest time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
dataobjectNoRequest data body
data.outRefundNostringYesmaxLength: 64Merchant refund order id, uniquely identifying a refund application transaction
data.refundAmountnumberYesThe amount of the refund, the unit of the amount is Yuan, and it is sent according to the decimal point supported by the currency of each country.
data.refundCurrencystringYesmaxLength: 3Refund currency (original transaction currency)
data.outTradeNostringNomaxLength: 64Original Merchant Order No.Either outTradeNo or tradeToken must be provided.
data.tradeTokenstringNomaxLength: 64Trade token of the associated forward order. Either outTradeNo or tradeToken must be provided.
data.commentsstringNomaxLength: 512Refund Description (Reason for Merchant Refund)
data.refundNotifyUrlstringNomaxLength: 256Refund callback link, which can be configured in the background of the system,see【[https://docs-v2.payermax.com/en/doc-center/developer/config-settings.html)】

Example

json
{
  "version": "1.5",
  "keyVersion": "1",
  "requestTime": "2022-01-17T09:20:54.047+00:00",
  "appId": "3b242b56a8b64274bcc37dac281120e3",
  "merchantNo": "020213827212251",
  "data": {
    "outRefundNo": "R1642411016202",
    "refundAmount": 10000,
    "refundCurrency": "IDR",
    "outTradeNo": "P1642410680681",
    "tradeToken": "T2025020713159038685354",
    "comments": "20220117070423TI408900055079",
    "refundNotifyUrl": "https://www.refundNotifyUrl.example.com"
  }
}

Responses

200

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesReturn code, ‘APPLY_SUCCESS’ means success
msgstringYesReturn message, ‘Success.’
dataobjectYesReturn data body
data.outRefundNostringYesmaxLength: 64merchant refund order id
data.tradeOrderNostringYesmaxLength: 64Transaction order id
data.refundTradeNostringYesmaxLength: 64PayerMax refund no
data.statusstringYesmaxLength: 32Refund status:REFUND_PENDING, REFUND_FAILED

Response Example

json
{
  "code": "APPLY_SUCCESS",
  "msg": "",
  "data": {
    "outRefundNo": "R1642411016202",
    "tradeOrderNo": "20220117091121TI366100056090",
    "refundTradeNo": "20220117091657TI790000055087",
    "status": "REFUND_PENDING"
  }
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.