/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. 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. 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
| Item | Value |
|---|---|
| Method | POST |
| Path | /cashin/pix/refund-partner |
| Content-Type | application/json |
| Purpose | Initiate a refund for a payment order |
Access Requirements
Request Fields
For authentication headers, see Authentication; they are not listed in the table below.
| Field | Location | Type | Length | Required | Description |
|---|---|---|---|---|---|
subMerchantNo | Body | string | 64 | Yes | Partner-specific. Sub-merchant ID. |
platOrderNo | Body | string | 32 | Either | Platform 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. |
mchOrderNo | Body | string | 32 | Either | Merchant order number of the original cashin order, i.e. the mchOrderNo passed at cashin ordering; provide at least one of this and platOrderNo. |
refundSn | Body | string | 64 | Yes | Merchant refund number, defined by the partner; must be unique within the same merchant scope and is also the refund idempotency key. |
amount | Body | decimal(25,2) | 25,2 | Yes | Refund 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. |
information | Body | string | 128 | No | Refund description (refund reason), filled in by the partner. |
refund | Body | string | 16 | No | Refund reason category. |
Request Example
Request header example:
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:
{
"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., 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. is the refund status.
| Field | Type | Length | Returned | Description |
|---|---|---|---|---|
status | int | 4 | Yes | Response code. |
msg | string | 128 | Yes | Message corresponding to status; sucesso on success. |
data | object | N/A | No | Refund response data; may be omitted when the request fails at signature verification or protocol parsing. |
data. | string | 64 | Yes | Partner-specific. Sub-merchant ID, identical to the subMerchantNo in the request. |
data. | string | 64 | Yes | Platform refund ID, used to track this refund later. |
data. | string | 64 | Yes | Merchant refund number, echoed from the request. |
data. | string | 64 | Yes | Platform 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. | string | 64 | No | Original merchant order number. |
data. | string | 128 | Yes | Refund description, echoed from the request. |
data. | decimal(25,2) | 25,2 | Yes | Refund amount requested this time, echoed from amount in the request. |
data. | string | 16 | Yes | Refund status; see the enum below. |
data. | decimal(25,2) | 25,2 | No | Principal successfully refunded this time, excluding fees; the fee refunded this time is in data.. |
data. | decimal(25,2) | 25,2 | No | Fee amount refunded this time; 0 when no fee is refunded. |
data. | decimal(25,2) | 25,2 | No | Original cashin order amount. |
data. | decimal(25,2) | 25,2 | No | Cumulative principal successfully refunded on the original cashin order so far, excluding fees. |
data. | decimal(25,2) | 25,2 | No | Cumulative fee successfully refunded on the original cashin order so far, excluding refund principal. |
data. | string | 64 | No | Pix end-to-end transaction ID of the refund transaction; may be empty while the channel has not returned it. |
data. | int | 19 | No | Refund time, Unix timestamp in seconds. |
data.status Enum
| Value | Description | Final state |
|---|---|---|
PENDING | Refund in progress; the request has been accepted but fund processing is not complete — keep querying or wait for the asynchronous notification. | No |
SUCCESS | Refund succeeded; fund processing is complete. | Yes |
FAILED | Refund 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.
{
"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
}
}