v1

latestOpenAPI 3.0.3Apache License Version 2.02026-07-2631211285.4 KB
Refund Services

Create Refund

Service responsible for requesting the return of an approved payment. The refund may be total or partial.

put/v1/payment/orders/{order_id}/refund

Path parameters

order_idstring required

Order ID returned by create payment service

Headers

Content-Typestring required

The Media type of the body of the request. Default value for payment provider protocol is application/json

Acceptstring required

Acceptable media type(s) for the response. Default value for payment provider protocol is application/json

Request body

Example request

{
  "transaction": {
    "reference_id": "REF0000001"
  },
  "amount": {
    "currency_code": "BRL",
    "value": 1500.56
  }
}

Response

Create refund response

refund_idstring required

Refund ID returned by create refund service

codestring

Standardized error code (applies only for error cases)

messagestring

Message associated with the error code (applies only for error cases)

Example response

{
  "refund_id": "455e9a73-37f6-464c-b09c-9c0048fdafef",
  "amount": {
    "currency_code": "BRL",
    "value": 1500.56
  },
  "status": {
    "error": {
      "code": "G01",
      "message": "Gateway, payment method not supported"
    }
  }
}