Skip to content

/cashin/pix/refund-partner Create Refund ​

Background ​

/cashin/pix/refund-partner is the refund request API for payment orders, provided to partners. The partner can locate the original payment order by the original platform order number or the original merchant order number, and submit the refund amount, refund reason, and other information for this refund.

At least one of the original platform order number origPlatOrderNo and the original merchant order number origMerchantOrderNo must be provided. The refund principal refundAmount excludes the fee, the currency must match the original order's currency, and amounts are in the currency's major unit. The partner must ensure the merchant refund order number is unique within the same merchant scope; it is used for idempotency control of refund requests and for later tracking.

Refund window: a PIX original-route refund must be initiated within 90 calendar days after the original transaction completes; refunds are not allowed after 90 days. This 90-day window applies only to "PIX original-route refunds"; it is not a unified window for all refunds or for MED. After the window, the original transaction can no longer be returned through the PIX refund API; if funds still need to be returned to the customer, use a new payout flow instead. MED disputes follow their own regulatory time limits and processing rules.

Endpoint ​

ItemValue
MethodPOST
Path/cashin/pix/refund-partner
Content-Typeapplication/json
PurposeInitiate a refund for a payment order

Access Requirements ​

Request Fields ​

FieldLocationTypeLengthRequiredDescription
X-Merchant-IdHeaderstring64YesPrimary merchant ID, read from the request header.
X-TimestampHeaderint19YesUnix request timestamp in seconds, used to validate request freshness.
X-NonceHeaderstring64YesAnti-replay random string for the request.
DigestHeaderstring52YesRequest body digest in the format SHA-256=<Base64 digest>.
AuthorizationHeaderstring-YesES256 request signature information, where keyId is the partner key version.
subMerchantNoBodystring64YesSub-merchant ID.
origPlatOrderNoBodystring64EitherOriginal platform order number; provide at least one of this field or origMerchantOrderNo.
origMerchantOrderNoBodystring64EitherOriginal merchant order number; provide at least one of this field or origPlatOrderNo.
merchantOrderNoBodystring64YesMerchant refund order number; must be unique within the same merchant scope.
refundAmountBodydecimal25,2YesPrincipal amount to refund in this request, excluding the fee; must be greater than 0, and the currency must match the original order's currency. Multiple refunds are allowed; the accumulated refund principal must not exceed the original order's principal.
refundReasonBodystring128YesRefund reason.
refundReasonCategoryBodystring16NoRefund reason category.
notifyUrlBodystring255NoURL where the partner receives the refund result notification.

Request Example ​

Request header example:

http
POST /cashin/pix/refund-partner HTTP/1.1
Content-Type: application/json
X-Merchant-Id: 92315566000120
X-Timestamp: 1790200000
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>"

Request body example:

json
{
  "subMerchantNo": "SUB00000001",
  "origPlatOrderNo": "BAS202608160000000001",
  "origMerchantOrderNo": "CASHIN202608160001",
  "merchantOrderNo": "REFUND202608160001",
  "refundAmount": 50.00,
  "refundReason": "Refund agreed with the customer",
  "refundReasonCategory": "CUSTOMER_REQUEST",
  "notifyUrl": "https://merchant.example.com/callback/refund"
}

Response Fields ​

The API uses the standard status, msg, and data response structure. The final refund result is determined by orderStatus, the asynchronous notification, or a later query.

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesMessage corresponding to status
dataobjectN/ANoRefund response data; may be omitted when the request fails at signature verification or protocol parsing.
data.subMerchantNostring64YesSub-merchant ID, identical to the subMerchantNo in the request.
data.merchantOrderNostring64YesMerchant refund order number, echoed from the request.
data.platOrderNostring64ConditionalPlatform refund order number; returned after the refund order is created successfully.
data.amountdecimal(25,2)25,2YesPrincipal amount requested for refund in this request, excluding the fee; echoes refundAmount from the request.
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.origPlatOrderNostring64ConditionalOriginal platform order number.
data.origMerchantOrderNostring64ConditionalOriginal merchant order number.
data.origAmountdecimal25,2ConditionalOriginal merchant order amount.
data.origTotalRefundAmountdecimal(25,2)25,2ConditionalAccumulated principal successfully refunded so far for the original cashin order, excluding fees.
data.origTotalFeeRefundAmountdecimal(25,2)25,2ConditionalAccumulated fees successfully refunded so far for the original cashin order, excluding the refund principal.
data.e2eIdstring64NoPIX end-to-end transaction ID.
data.orderStatusstring16YesCurrent refund status.
data.refundTimeint19NoRefund time, Unix timestamp in seconds.

data.orderStatus Enum ​

ValueDescriptionFinal state
PENDINGRefund in progress.No
SUCCESSRefund succeeded.Yes
FAILEDRefund failed.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",
    "merchantOrderNo": "REFUND202608160001",
    "platOrderNo": "RFD202608160000000001",
    "amount": 50.00,
    "refundAmount": 50.00,
    "feeRefundAmount": 0.30,
    "origPlatOrderNo": "BAS202608160000000001",
    "origMerchantOrderNo": "CASHIN202608160001",
    "origAmount": 100.00,
    "origTotalRefundAmount": 50.00,
    "origTotalFeeRefundAmount": 0.30,
    "e2eId": "E1234567820260816000000000000001",
    "orderStatus": "SUCCESS",
    "refundTime": 1786887025
  }
}

Response Error Codes ​