Skip to main content

Refund Request

The following set of endpoints is responsible for managing Refund Requests.


Create Refund Request​

Endpoint to create a refund request.

Only the debited participant can create a refund request.

POST /dict/refunds
Requires authorization for the scope: devolutionRequest.ind.writee


Request

{
"refund": {
"refundAmount": 100,
"refundDetails": "houve fraude confirmada na transação.",
"refundReason": "fraud",
"transactionId": "e9999901012341234123412345678900"
}
}

Responses

The responses below represent Success(201) from the consumption.

{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"refund": {
"contestedParticipant": "99999010",
"creationTime": "2020-01-17t10:00:00.000z",
"id": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"lastModified": "2020-01-17t10:00:00.000z",
"refundAmount": 200,
"refundDetails": "transação feita através de qr code falso em boleto",
"refundReason": "fraud",
"requestingParticipant": "99999011",
"status": "open",
"transactionId": "e9999901012341234123412345678900"
},
"responseTime": 0
}

List Refund Requests​

Endpoint to retrieve the list of refund requests in which the participant is involved.

The list is sorted in ascending order by the LastModified field.

GET /dict/refunds
Requires authorization for the scope: devolutionRequest.ind.read


Request

This endpoint allows the use of query parameters. The code example below illustrates how to consume the endpoint with some of the available optional parameters.

/dict/refunds?includeIndirectParticipants=false&status=open

Responses

The responses below represent Success(200) and Failures/errors in consumption.

{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"hasMoreElements": true,
"refunds": [
{
"analysisDetails": "valor totalmente extornado.",
"analysisResult": "totally_accepted",
"contestedParticipant": "99999010",
"creationTime": "2020-01-17t10:00:00.000z",
"id": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"lastModified": "2020-01-17t10:00:00.000z",
"refundAmount": 200,
"refundDetails": "transação feita através de qr code falso em boleto",
"refundReason": "fraud",
"refundTransactionId": "d9999901012341234123412345678900",
"requestingParticipant": "99999011",
"status": "closed",
"transactionId": "e9999901012341234123412345678900"
}
],
"responseTime": 0
}

Get Refund Request​

Endpoint to obtain details of a specific refund request.

GET /dict/refunds/:refundId
Requires authorization for the scope: devolutionRequest.ind.read


Request

The request sent to this endpoint does not require a body, only OAuth authorization headers, parameters, and the account certificate.

Responses

The responses below represent Success(200) and Failures/errors in consumption.

{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"refund": {
"contestedParticipant": "99999010",
"creationTime": "2020-01-17t10:00:00.000z",
"id": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"lastModified": "2020-01-17t10:00:00.000z",
"refundAmount": 200,
"refundDetails": "transação feita através de qr code falso em boleto",
"refundReason": "fraud",
"requestingParticipant": "99999011",
"status": "open",
"transactionId": "e9999901012341234123412345678900"
},
"responseTime": 0
}

Cancel Refund Request​

Endpoint to cancel a refund request.

Can only be performed by the participant who created the request.

A refund request cannot be canceled after it has been closed.

Idempotency

The operation is idempotent. If the request has already been canceled with the same parameters, a response equivalent to the first request will be returned.

POST /dict/refunds/:refundId/cancel
Requires authorization for the scope: devolutionRequest.ind.write


Request

{
"refundId": "91d65e98-97c0-4b0f-b577-73625da1f9fc"
}

Responses

The responses below represent Success(200) from the consumption.

{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"refund": {
"contestedParticipant": "99999010",
"creationTime": "2020-01-17t10:00:00.000z",
"id": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"lastModified": "2020-01-17t10:00:00.000z",
"refundAmount": 200,
"refundDetails": "transação feita através de qr code falso em boleto",
"refundReason": "fraud",
"requestingParticipant": "99999011",
"status": "cancelled",
"transactionId": "e9999901012341234123412345678900"
},
"responseTime": 0
}

Close Refund Request​

Endpoint to close a refund request.

The request can only be closed by the contested participant.

To close, the status must be OPEN.

Idempotency

The operation is idempotent. If the request has already been closed with the same parameters, a response equivalent to the first request will be returned.

POST /dict/refunds/:refundId/close
Requires authorization for the scope: devolutionRequest.ind.write


Request

{
"closeRefundRequest": {
"participant": "12345678",
"refundAnalysisDetails": "valor totalmente extornado ao demandante.",
"refundAnalysisResult": "totally_accepted",
"refundId": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"refundTransactionId": "d9999901012341234123412345678900"
}
}

Responses

The responses below represent Success(200) from the consumption.

{
"closeRefundResponse": {
"refund": {
"analysisDetails": "valor totalmente extornado ao demandante.",
"analysisResult": "totally_accepted",
"contestedParticipant": "99999010",
"creationTime": "2020-01-17T10:00:00.000Z",
"id": "91d65e98-97c0-4b0f-b577-73625da1f9fc",
"lastModified": "2020-01-17T10:00:00.000Z",
"refundAmount": 200,
"refundDetails": "transação feita através de qr code falso em boleto",
"refundReason": "fraud",
"requestingParticipant": "99999011",
"status": "closed",
"transactionId": "e9999901012341234123412345678900"
}
},
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"responseTime": 0
}