v1

latestOpenAPI 3.1.02026-07-24750514.9 KB

Criar estorno de pagamento

post/payments/{payment_id}/refunds

Path parameters

payment_idstring required

Identificador único do pagamento que deseja estornar. Formato PAYM_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Headers

Authorizationstring required

Token de autenticação. Deve ser enviado no formato Bearer <token>.

x-idempotency-keystring

Chave composta de caracteres alfanumérico, exceto caracteres especiais. As chaves são recicladas depois de um intervalo não específico. Com isso, é garantido sua eficiência por 48 horas (Max 200 caracteres).

Request body

Response

200

idstring
created_atstring
statusstring
typestring

Example response

{
  "id": "REFU_F5B60BD0-508F-4DA1-B73E-87CFF76478F4",
  "payment": {
    "id": "PAYM_CONTRACT-TEST-TEST-TEST-CONTRACT0006",
    "amount": {
      "value": 10,
      "currency": "BRL"
    }
  },
  "amount": {
    "value": 10,
    "currency": "BRL"
  },
  "created_at": "2021-05-20T08:59:41.222846-03:00",
  "status": "SUCCESS",
  "type": "FULL",
  "links": [
    {
      "rel": "SELF",
      "href": "https://sandbox.api.assinaturas.pagseguro.com/refunds",
      "media": "application/json",
      "type": "GET"
    }
  ]
}