Documentation/API Reference

API REFERENCE

Refund Query

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Refund Query

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters2

Required fields first

Refund Query

Optional parameters 2
refund_idAt least onestringdata.refund_idYabandPay refund order numberOptional (one must be included)
m_refund_idAt least onestringdata.m_refund_idMerchant refund order numberOptional (one must be included)

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.QueryRefundOrderRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
refund_idStringYabandPay refund order numberOptional (one must be included)
m_refund_idStringMerchant refund order numberOptional (one must be included)

Signature example:

Sorted parameters concatenated into a URL-style query string

"method=v3.QueryRefundOrder&time=1728566835&refund_id=3841510a-4d18-4a61-808d-431a45006de2&user=YOUR_CASHIER_UID"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.QueryRefundOrder",
    "time": 1728566835,
    "data": {
        "refund_id": "3841510a-4d18-4a61-808d-431a45006de2"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {

            "transaction_id": "20240903153820059756",
            "refund_id": "20240903154342497308",
            "m_refund_id": null,
            "refund_time": "1725349422",
            "state": "refunded",
            "refund_amount": "0.01",
            "refund_currency": "EUR",
            "refund_description": "gary",
            "notify_url": "null",
            "demo": "",
            "settlement_refund_amount": "0.01",
            "settlement_refund_currency": "EUR",
            "merchant_cost": "0.1",
            "yb_transaction_id": "c07859aa-3d12-69d4-ef2f-a9556d9c4d33"
        },
    "message": ""
}

Additional information:

Response result:
  1. A successful request returns "status": true.

  2. A failed request returns "status": false.

Refund status:
CodeStateMessage
20to-be-approvalAwaiting administrator approval.
21refund pendingThe current balance is insufficient. The refund is submitted automatically when sufficient funds are available.
22refund processingThe refund request has been submitted and is being processed by the system.
23refundedThe refund has completed successfully.
24refund failedThe refund failed. Please try again.
25refund errorThe refund failed. Please contact our online customer support.
26refund cancelledThe refund order has been cancelled.