BonusPay Documents
English
English
  • Welcome
  • Get Started
  • Basic Fee Structure
  • API Rules
  • Creating an RSA Key
  • Products
  • Crypto TOPUP
    • Parameters
    • getAddress
    • queryCustomerDepositOrderPage
    • getCustomerDepositOrder
    • Notification (Callback)
  • Order Payment by API
    • Parameters
    • Place Order
    • Cancel Order
    • Accept Order
    • Get Order
    • Get PaymentEventList
    • Refund
    • Get Refund Order
    • Notification (Callback)
  • Order Payment by Checkout
    • Parameters
    • Place Order
    • Cancel Order
    • Accept Order
    • Get Order
    • Get PaymentEventList
    • Refund
    • Get Refund Order
    • Notification (Callback)
  • Withdraw
    • Parameters
    • Place Order
    • Get Order
    • Get Networks
    • Notification (Callback)
  • Transfer
    • Parameters
    • Place Order
    • Get Order
    • Get Networks
    • Notification (Callback)
  • Fx Rate
    • Parameters
    • getFxrate
  • Get Account Balance
    • Parameters
    • getAccountList
  • No Code Production
  • Fiat Settlement
    • Parameters
    • Place Order
    • Get Order
    • Notification (Callback)
  • Plug-and-Play
    • WooCommerce
Powered by GitBook
On this page
  • RefundOrderStatus
  • Request Parameters
  • Request Example
  • Response Parameters
  • Response Example
  1. Order Payment by Checkout

Refund

Refund

PreviousGet PaymentEventListNextGet Refund Order

Last updated 1 year ago

When a refund is needed due to the buyer's or seller's reason after an order has been placed for some time, the seller can refund the payment to the buyer through the refund interface. After receiving and verifying the refund request, BonusPay will initiate the refund to the refund address according to the refund rules, and an additional refund fee will be charged.

Interface Address

Sandbox URL:

Production URL:

RefundOrderStatus

Status
Description

CREATED

Created

SUCCESS

Refunded successfully

FAILURE

Refund failed

Request Parameters

Http Header

Field Name
Variable Name
Required
Type
Example
Description

Language

Content-Language

Optional

String(10)

en

en-English

Signature

sign

Required

String

Merchant ID

Partner-Id

Required

String(12)

Http Body

Field Name
Variable Name
Required
Type
Example
Description

Request Time

requestTime

Required

Timestamp(3)

1581493898000

Business Content

bizContent

Required

PlaceRefundOrderRequest

-

Business Content

PlaceRefundOrderRequest

Field Name
Variable Name
Required
Type
Example
Description

Refund Merchant Order No

refundMerchantOrderNo

Required

String(64)

Me23484

-

Original Merchant Order No

originMerchantOrderNo

Optional

String(64)

-

Either originMerchantOrderNo or originOrderNo is required, and they cannot be empty or have values at the same time

Original BonusPay Order No

originOrderNo

Optional

String(32)

22000000000001

Refund Amount

amount

Required

Money

-

Backend Callback URL

notifyUrl

Optional

String(200)

-

Operator Name for Refund

operatorName

Optional

String(200)

-

Refund Reason

reason

Optional

String(64)

-

Chain Code

chainCode

Optional

String(32)

ETH

This parameter is required for chain payment

Refund Address

refundAddress

Optional

String(128)

This parameter is required for chain payment

Reserved Field

reserved

Optional

String(200)

Merchant reserved field, the returned content will be same with the content submitted by the merchant

Request Example

Http Header
{
    "Content-Language": "en",
    "Content-Type": "application/json",
    "sign": "aMs582GhLeRv4fL3xqw7nN4dlzWS+ZVzdsNXT6rKwPpj7qOM4Y7qZBP3Yl6HogILy4IyX1tp8M7D92rK37hUgJg814odd1INIuy4l+KTRPA1Y3F8y0hVGXak0ddeVcOM3XNN+YEhvPClBx4EpmfWVqY3A2qNJTo3ugwr6uZiVGA38OjHRLZthGa+5nea0DtLaZYQnOGWaCI6fPIBZ7qr9HTiVkIsAp3N4m4cHR+3Rvpdbzu2TZoScA358D9wGmF5UOkbHCjwNV03I3O8HzaKUqMe4jnXZ+lJ0TMmxmqLrcMyMztJjZMQB9S4lXMW2+TqMrdNgLQv3GLiQ9IFvhUVEg==",
    "Partner-Id": "200000000888"
}

Http Body
{
  "requestTime": 1581405399656,
  "bizContent": {
    "merchantOrderNo": "M818494241569",
    "originMerchantOrderNo": "M965739182419",
    "amount": {
      "currency": "BUSD",
      "amount": 0.01
    },
    "chainCode": "ETH",
    "refundAddress": "123332313",
    "operatorName": "zxy",
    "reason": "refund",
    "reserved": "order desc"
  }
}

Response Parameters

Http Header

Field Name
Variable Name
Required
Type
Example
Description

Signature

sign

Required

String

-

The body field in Http Body is only returned when applyStatus is SUCCESS and code is 0.

Http Body

Field Name
Variable Name
Required
Type
Example
Description

Response Header

head

Required

ResponseHeader

-

Response Body

body

Optional

PlaceRefundOrderResponse

-

PlaceRefundOrderResponse

Field Name
Variable Name
Required
Type
Example
Description

Refund Order

refundOrder

Optional

RefundOrder

-

Refund Summary

refundSummary

Optional

RefundSummary

-

Response Example

Http Header
{
  "sign": "nDdClX1tAyV3qcX/Epay6AXFNRGSsWd8ysWO9SgwPrNTetSePLA9C39mGp6qRbjJeqXLEnYLwSkBu5eKdtyVX3tflGLiV2kvRjVfYpTCjXdVL2Pcnv2w+ghjHe2jL988iklk7q5AjAgdtXNphpHcTes9pk6W3bVCbvijH6at0fExUtZ91L1LrnPGELT1IJm/lFW3w4KLh0Gxs7FzDPI9RDfUemObNlRzV8kCtkWahwPgs/hBnS69GyYDKN7ihQX2UiLuP239wl6IA+VG/ZZKHPhLs8bbuOS+LKWORIp6jRt+JsAx7c/Ot1RNyOnHKxPRKJ8bVTohEp39yUz/HwG8oA=="
}

Http Body
{
  "head": {
    "applyStatus": "SUCCESS",
    "code": "0",
    "msg": "SUCCESS"
  },
  "body": {
    "refundOrder": {
      "refundMerchantOrderNo": "M818494241569",
      "orderNo": "191405406113002297",
      "originMerchantOrderNo": "M965739182419",
      "status": "SUCCESS",
      "amount": {
        "currency": "BUSD",
        "amount": 0.01
      },
      "chainCode": "ETH",
      "refundAddress": "123332313",
      "reason": "refund",
      "reserved": "order desc"
    },
    "refundSummary": {
      "acquireAmount": {
        "currency": "BUSD",
        "amount": 1.01
      },
      "remainRefundAmount": {
        "currency": "BUSD",
        "amount": 1
      }
    }
  } 
}

Return Codes

code
msg
reason
solution

0

SUCCESS

Success

400

INVALID_PARAMETER

Invalid parameter

Adjust request parameters

400

REQUESTTIME_TOO_EARLY

Request time is too early compared to the current time

Adjust request time

400

REQUESTTIME_TOO_LATER

Request time is too late compared to the current time

Adjust request time

402

RATE_LIMIT_REJECT

Request frequency is too high

Reduce request frequency

403

UNAUTHORIZED

Unauthorized API access

Contact BonusPay

404

SERVICE_NOT_AVAILABLE

API service is not available

Contact BonusPay

500

SYSTEM_ERROR

System error

Contact BonusPay, try again later

504

SERVICE_TIMEOUT

Service timeout

Try again later

601

RISK_FAIL

Risk verification failed

Adjust business

77002

ORDER_FAILURE

Failed orders cannot be refunded

Adjust merchant order number

77004

MERCHANT_ORDER_NO_NOT_EXIST

The order with the specified merchant order number does not exist

Adjust merchant order number

77005

REFUND_AMOUNT_EXCEEDED

The refund amount exceeds the amount available for refund Available refund amount is the original order amount minus refunded amount and amount in refund process

Adjust refund amount

77013

REFUND_MERCHANT_ORDER_NO_EXIST

A refund request with the same order number and different business parameters is made

Adjust refund merchant order number

77016

ORDER_NO_NOT_EXIST

The order with the specified BonusPay order number does not exist

Adjust BonusPay order number

77024

ORDER_NOT_PAID

A refund request is made for an unpaid order

Adjust business parameters

http://api.testbonuspay.network/sgs/api/crypto/refund/placeOrder
https://api.bonuspay.network/sgs/api/crypto/refund/placeOrder