Skip to content

Query Refund Detail ​

Query refund detail by merchant refund SN.

Endpoint ​

GET /cashin/check-refund

Authentication ​

Merchant Credential. See Authentication.

Background ​

The merchant queries the current status, refund amount, cumulative refund amount, refunded fees, and original cashin order information of its own refund order by merchant refund order number merchantOrderNo or platform refund order number platOrderNo.

At least one of the two refund order numbers is required; if both are provided, they must refer to the same refund order. A successful query only means the current order information has been returned and does not mean the refund has finally succeeded — the refund result is determined by orderStatus. This API can be used for sync timeouts, missed notifications, or status reconciliation.

Request Fields ​

FieldLocationTypeLengthRequiredDescription
X-Merchant-IdHeaderstring64YesMerchant ID, read from the request header; used to isolate refund order data between merchants.
X-TimestampHeaderint19YesUnix request timestamp in seconds, used for request freshness validation.
X-NonceHeaderstring64YesRandom string for request anti-replay protection.
DigestHeaderstring52YesDigest of the request body; when a GET request has no body, it is computed over empty bytes. Format: SHA-256=<Base64Digest>.
AuthorizationHeaderstring-YesES256 request signature, where keyId is the merchant key version.
merchantOrderNoQuerystring64One of two requiredMerchant refund order number; fill in at least one of this or platOrderNo.
platOrderNoQuerystring64One of two requiredPlatform refund order number; fill in at least one of this or merchantOrderNo.

If merchantOrderNo and platOrderNo are both provided but do not refer to the same refund order, the API returns a parameter error and no order data.

Request Examples ​

http
GET /cashin/check-refund?merchantOrderNo=REFUND202608160001 HTTP/1.1
Content-Type: application/json
X-Merchant-Id: 92315566000120
X-Timestamp: 1786867200
X-Nonce: 550e8400-e29b-41d4-a716-446655440000
Digest: SHA-256=<Base64Digest>
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<ES256_SIGNATURE_BASE64>"

Response Fields ​

Business status: dataStatus is an integer; dataStatus = 200 indicates the business succeeded, in which case dataMsg = "SUCCESS". Any value other than 200 indicates a business error; see dataMsg for the reason.

The API uses a unified status, msg, data response structure. A successful API response does not mean the refund succeeded; while the refund is still being processed, the merchant should keep querying or wait for the asynchronous notification of the refund result.

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesCorresponds to status
dataobjectN/ANoRefund order query result; may be absent when the request fails at the signature verification, protocol parsing, parameter validation, or order query stage.
data.attachstring128YesThe attach value passed by the merchant when the original cashin order was created; returned as-is if provided at order creation, empty otherwise.
data.merchantOrderNostring64YesMerchant refund order number.
data.platOrderNostring64YesPlatform refund order number.
data.origMerchantOrderNostring64YesOriginal merchant cashin order number.
data.origPlatOrderNostring64YesOriginal platform cashin order number.
data.origAmountdecimal(25,2)25,2YesOriginal cashin order amount, in the major currency unit.
data.origTotalRefundAmountdecimal(25,2)25,2YesCumulative principal successfully refunded so far on the original cashin order, excluding fees.
data.origTotalFeeRefundAmountdecimal(25,2)25,2YesCumulative fee amount successfully refunded so far on the original cashin order, excluding the refunded principal.
data.amountdecimal(25,2)25,2YesPrincipal amount requested for this refund, excluding fees.
data.refundAmountdecimal(25,2)25,2YesPrincipal amount successfully refunded this time, excluding fees; see data.feeRefundAmount for the fee refunded this time.
data.feeRefundAmountdecimal(25,2)25,2YesFee amount refunded this time, in the major currency unit; 0 when no fee is refunded.
data.currencystring3YesRefund currency, same as the original order currency, for example BRL.
data.e2eIdstring64NoPix end-to-end transaction ID; may be empty when the channel has not returned it yet.
data.orderStatusstring16YesCurrent status of the refund order.
data.refundTimeint19NoRefund time, Unix timestamp in seconds.
data.dataStatusint-YesResponse code
data.dataMsgstring128YesCorresponds to dataStatus

orderStatus Enum ​

Enum ValueDescriptionFinal State
PENDINGRefund being processed; the refund request has been accepted but fund processing is not complete. Keep querying or wait for the asynchronous notification.No
SUCCESSRefund succeeded; refund fund processing is complete.Yes
FAILEDRefund failed; this refund has ended. See dataMsg for the failure reason.Yes

Response Examples ​

The following example shows the first successful refund on the original order: principal 50.00 and fee 0.30 refunded, cumulative refunded principal 50.00, and cumulative refunded fee 0.30.

json
{
  "status": 200,
  "msg": "sucesso",
  "data": {
    "attach": "order-source=checkout",
    "merchantOrderNo": "REFUND202608160001",
    "platOrderNo": "RFD202608160000000001",
    "origMerchantOrderNo": "CASHIN202608160001",
    "origPlatOrderNo": "BAS202608160000000001",
    "origAmount": 100,
    "origTotalRefundAmount": 50,
    "origTotalFeeRefundAmount": 0.30,
    "amount": 50,
    "refundAmount": 50,
    "feeRefundAmount": 0.3,
    "currency": "BRL",
    "e2eId": "E1234567820260816000000000000001",
    "orderStatus": "SUCCESS",
    "refundTime": 1786887025,
    "dataStatus": 200,
    "dataMsg": "SUCCESS"
  }
}