Skip to main content
POST
/
api
/
v1
/
refunds
Criar reembolso
curl --request POST \
  --url https://besimplo.com/api/v1/refunds \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "refund": {
    "payment_intent": "pi_01h455vb4pex5vsknk084sn02q",
    "amount": 5000,
    "reason": "requested_by_customer"
  }
}
'
{ "id": "pi_01h455vb4pex5vsknk084sn02r", "object": "refund", "amount": 9990, "currency": "brl", "payment_intent": "pi_01h455vb4pex5vsknk084sn02q", "status": "refunded", "live_mode": true, "created": 1704672000 }

Documentation Index

Fetch the complete documentation index at: https://docs.besimplo.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

A chave de API usada para autenticar a requisição e identificar a sua conta.

Exemplo: Authorization: ApiKey my-secure-key

Body

application/json

Dados do reembolso a ser criado

refund
object
required

Response

Reembolso processado com sucesso (cartão de crédito)

id
string
required
read-only

ID do reembolso, no formato TypeID com prefixo pi_. Corresponde ao ID do payment_intent reembolsado (o reembolso compartilha o ID do payment_intent que ele afeta).

Pattern: ^pi_[0-9a-z]{26}$
Example:

"pi_01h455vb4pex5vsknk084sn02q"

object
enum<string>
required

Tipo do objeto. Sempre 'refund'.

Available options:
refund
Example:

"refund"

amount
integer
required

Valor em centavos. R$ 99,90 = 9990.

Example:

9990

currency
enum<string>
required

Moeda do valor. Sempre 'brl' (Real brasileiro).

Available options:
brl
Example:

"brl"

payment_intent
string
required

ID do payment_intent que foi reembolsado, no formato TypeID com prefixo pi_.

Pattern: ^pi_[0-9a-z]{26}$
Example:

"pi_01h455vb4pex5vsknk084sn02q"

status
enum<string>
required

Status atual do reembolso.

  • refunding: Reembolso em processamento (PIX).
  • refunded: Reembolso concluído com sucesso.
Available options:
refunding,
refunded
Example:

"refunded"

live_mode
boolean
required

Indica ambiente de produção (true) ou sandbox (false). Dados de sandbox são limpos periodicamente.

Example:

true

created
integer<int64>
required
read-only

Timestamp Unix de quando o reembolso foi criado.

Example:

1704672000