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 description, and other information for this refund.

The currency of the refund amount amount must match the original order's currency, and the amount unit is BRL; multiple partial refunds are allowed, and the accumulated refund principal must not exceed the original order's principal. The partner must ensure the merchant refund number refundSn is unique within the same merchant scope; it is used for idempotency control of refund requests and for later tracking. The final refund result is determined by data.status in the response, the asynchronous notification, or the Query Refund Detail result.

After a refund occurs, the status of the original cashin order moves from SUCCESS to REFUND. REFUND only means that a refund has occurred on the order, not that it has been fully refunded: an order can be partially refunded several times and its status is REFUND after a partial refund as well. The cumulative refunded principal is in data.refundTotalAmount of the response; compare it with the payAmount of the original order to check whether it has been fully refunded.

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 ​

For authentication headers, see Authentication; they are not listed in the table below.

FieldLocationTypeLengthRequiredDescription
subMerchantNoBodystring64YesPartner-specific. Sub-merchant ID.
platOrderNoBodystring32EitherPlatform order number of the original cashin order, i.e. the platOrderNo returned by cashin ordering or cashin query; provide at least one of this and mchOrderNo.
mchOrderNoBodystring32EitherMerchant order number of the original cashin order, i.e. the mchOrderNo passed at cashin ordering; provide at least one of this and platOrderNo.
refundSnBodystring64YesMerchant refund number, defined by the partner; must be unique within the same merchant scope and is also the refund idempotency key.
amountBodydecimal(25,2)25,2YesRefund amount for this request in BRL, at most two decimal places; the range per refund is 10 – 50000, and the currency matches the original order. Multiple refunds are allowed; the cumulative refunded principal must not exceed the original order principal.
informationBodystring128NoRefund description (refund reason), filled in by the partner.
refundReasonCategoryBodystring16NoRefund reason category.

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",
  "platOrderNo": "BAS202608160000000001",
  "refundSn": "REFUND202608160001",
  "amount": 50.00,
  "information": "Refund agreed with the customer",
  "refundReasonCategory": "CUSTOMER_REQUEST"
}

Response Fields ​

The API uses the standard status, msg, and data response structure. The final refund result is determined by data.status, the asynchronous notification, or a later query. Note the difference: the outermost status is the API response code (200 means the request was accepted), while data.status is the refund status.

FieldTypeLengthReturnedDescription
statusint4YesResponse code.
msgstring128YesMessage corresponding to status; sucesso on success.
dataobjectN/ANoRefund response data; may be omitted when the request fails at signature verification or protocol parsing.
data.subMerchantNostring64YesPartner-specific. Sub-merchant ID, identical to the subMerchantNo in the request.
data.refundIdstring64YesPlatform refund ID, used to track this refund later.
data.refundSnstring64YesMerchant refund number, echoed from the request.
data.platOrderNostring64YesPlatform order number of the original cashin order; echoed from the request when platOrderNo was sent, otherwise the platform order number matching the given mchOrderNo.
data.mchOrderNostring64NoOriginal merchant order number.
data.informationstring128YesRefund description, echoed from the request.
data.amountdecimal(25,2)25,2YesRefund amount requested this time, echoed from amount in the request.
data.statusstring16YesRefund status; see the enum below.
data.refundAmountdecimal(25,2)25,2NoPrincipal successfully refunded this time, excluding fees; the fee refunded this time is in data.feeRefundAmount.
data.feeRefundAmountdecimal(25,2)25,2NoFee amount refunded this time; 0 when no fee is refunded.
data.originAmountdecimal(25,2)25,2NoOriginal cashin order amount.
data.refundTotalAmountdecimal(25,2)25,2NoCumulative principal successfully refunded on the original cashin order so far, excluding fees.
data.feeRefundTotalAmountdecimal(25,2)25,2NoCumulative fee successfully refunded on the original cashin order so far, excluding refund principal.
data.e2eIdstring64NoPix end-to-end transaction ID of the refund transaction; may be empty while the channel has not returned it.
data.refundTimeint19NoRefund time, Unix timestamp in seconds.

data.status Enum ​

ValueDescriptionFinal state
PENDINGRefund in progress; the request has been accepted but fund processing is not complete — keep querying or wait for the asynchronous notification.No
SUCCESSRefund succeeded; fund processing is complete.Yes
FAILEDRefund failed; this refund has ended.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",
    "refundId": "313",
    "refundSn": "REFUND202608160001",
    "platOrderNo": "BAS202608160000000001",
    "mchOrderNo": "CASHIN202608160001",
    "information": "Refund agreed with the customer",
    "amount": 50.00,
    "status": "SUCCESS",
    "refundAmount": 50.00,
    "feeRefundAmount": 0.30,
    "originAmount": 100.00,
    "refundTotalAmount": 50.00,
    "feeRefundTotalAmount": 0.30,
    "e2eId": "D1234567820260816000000000000001",
    "refundTime": 1786887025
  }
}

Response Error Codes ​