Skip to content

/cashin/check-refund Query Refund Detail ​

Background ​

/cashin/check-refund is the cashin refund order query API provided to partners. Using the merchant refund order number merchantOrderNo or the platform refund order number platOrderNo, the partner can query a refund order's current status, refund amount, accumulated refund amount, refunded fees, and the original cashin order information.

At least one of merchantOrderNo and platOrderNo must be provided. If both are provided, they must refer to the same refund order. A successful refund query only means the system has returned the refund order's current information; it does not mean the refund has finally succeeded. The refund result is determined by orderStatus.

Endpoint ​

ItemValue
MethodGET
Path/cashin/check-refund
Content-Typeapplication/json
PurposeQuery a cashin refund order

Access Requirements ​

Request Fields ​

FieldLocationTypeLengthRequiredDescription
X-Merchant-IdHeaderstring64YesPrimary merchant ID, read from the request header; isolates the refund data of different partners.
X-TimestampHeaderint19YesUnix request timestamp in seconds, used to validate request freshness.
X-NonceHeaderstring64YesAnti-replay random string for the request.
DigestHeaderstring52YesRequest body digest; for a GET request without a body, computed over empty bytes, in the format SHA-256=<Base64 digest>.
AuthorizationHeaderstring-YesES256 request signature information, where keyId is the partner key version.
merchantOrderNoQuerystring64EitherMerchant refund order number; provide at least one of this field or platOrderNo.
platOrderNoQuerystring64EitherPlatform refund order number; provide at least one of this field 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 Example ​

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=<Base64 digest>
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 means the business call succeeded, in which case dataMsg = "SUCCESS". Any value other than 200 indicates a business error; see dataMsg for the reason.

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

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesMessage corresponding to status
dataobjectN/ANoRefund order query result; may be omitted when the request fails at signature verification, protocol parsing, parameter validation, or order lookup.
data.subMerchantNostring64YesSub-merchant ID.
data.attachstring128Yesattach value the partner submitted when placing the original payment order; returned as-is if it was submitted, 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.
data.origTotalRefundAmountdecimal(25,2)25,2YesAccumulated principal successfully refunded so far for the original cashin order, excluding fees.
data.origTotalFeeRefundAmountdecimal(25,2)25,2YesAccumulated fees successfully refunded so far for the original cashin order, excluding the refund principal.
data.amountdecimal(25,2)25,2YesPrincipal amount requested for refund in this request, excluding the fee.
data.refundAmountdecimal(25,2)25,2YesPrincipal amount successfully refunded in this request, excluding the fee; for the fee refunded, see data.feeRefundAmount.
data.feeRefundAmountdecimal(25,2)25,2YesFee amount refunded in this request; 0 when no fee is refunded.
data.currencystring3YesRefund currency, identical to the original order's 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.dataMsgstring128YesMessage corresponding to dataStatus

orderStatus Enum ​

ValueDescriptionFinal state
PENDINGRefund in progress; the refund request has been accepted and fund processing is not complete yet — keep querying or wait for the asynchronous notification.No
SUCCESSRefund succeeded; refund fund processing is complete.Yes
FAILEDRefund failed; this refund has ended. Check dataMsg for the failure reason.Yes

Response Example ​

The following example shows a first successful refund on the original order: principal 50.00 and fee 0.30 refunded; accumulated refund principal 50.00; accumulated refunded fees 0.30.

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

Integration Notes ​

  1. The query scope is limited to the primary merchant ID in the X-Merchant-Id request header; subMerchantNo is not required, and refund data of other partners cannot be queried by order number.
  2. orderStatus is the only business status field for judging the refund result; the API-level status = 200 must not be treated as refund success.
  3. The partner should process amounts with high-precision decimal types and verify the currency, original order amount, refund amount of this request, and accumulated refund amount.
  4. The refund query API covers synchronous timeouts, missed notifications, and status reconciliation. The final-state refund notification and proactive queries may arrive at the same time; the partner must apply idempotent processing keyed on the refund order number and status.

Response Error Codes ​