Refund Services

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

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

Request

  • Base URL
    https://api-sandbox.koin.com.br
  • URL
    https://api-sandbox.koin.com.br/v1/payment/orders/{order_id}/refund
  • Auth
    none declared. Required headers: Content-Type, Accept

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

Media type(s) that is/are acceptable 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"
    }
  }
}

Changes

    • warning

      changed the pattern of the request property / from ^\d{1,10}\.\d{2}$ to d{1,10}.d{2}

    • info

      the / response's property pattern was changed from ^\d{1,10}\.\d{2}$ to d{1,10}.d{2} for the status