Saltar al contenido principal
POST
Refund a payment

Autorizaciones

x-api-key
string
header
requerido

Cuerpo

application/json
paymentId
string<uuid>
requerido

The sale to refund: any payment of your organization, whichever way it was charged (payment link, one-time payment, terminal, saved card).

amount
number

Optional. What to give back. Today every sale is refunded in full: send the payment's chargedAmount or omit the field. Any other amount is refused with PARTIAL_REFUND_NOT_SUPPORTED.

Ejemplo:

1150

Respuesta

Refunded.

A refund of a sale. Today a refund always gives back the whole charge (the sale and its tip).

id
string<uuid>
requerido
object
enum<string>
requerido
Opciones disponibles:
refund
paymentId
string<uuid>
requerido

The sale refunded, as GET /developer/v1/payment/{id} reads it.

amount
number
requerido

What went back to the customer, in MXN.

Ejemplo:

1150

currency
enum<string>
requerido
Opciones disponibles:
MXN
Ejemplo:

"MXN"

status
enum<string>
requerido

SUCCEEDED once the bank accepted it. PENDING while a bank transfer refund (SPEI) is on its way, FAILED if the bank refused it.

Opciones disponibles:
PENDING,
SUCCEEDED,
FAILED
failureReason
enum<string> | null
requerido

Why the refund failed: DECLINED when the bank declined the card refund, RETURN_FAILED when a transfer could not be sent back to the account it came from. null otherwise.

Opciones disponibles:
DECLINED,
RETURN_FAILED,
null
createdAt
string<date-time>
requerido
updatedAt
string<date-time>
requerido