Payments

POST/business/v0/pagos/{id}/reembolsos

Refund a payment

Try it live ↓

Full (no monto) or partial, up to 30 days after the payment. It is the exact reversal: the customer gets their share back in the same wallet and currency they paid with (same rate), your share of the net is debited and Finanxis returns its share of the fee. You need balance in the charge currency (SALDO_INSUFICIENTE otherwise). We notify you with pago.reembolsado.

Endpoint URL#

POST https://sandbox.finanxis.net/business/v0/pagos/{id}/reembolsos

Headers#

NameRequiredDescription
Content-TypeYesapplication/json
X-Finanxis-KeyYesYour public key (pk_live_… or pk_test_…).
X-Finanxis-TimestampYesCurrent time in Unix seconds (UTC). ±5 minute window.
X-Finanxis-SignatureYeshex(HMAC_SHA256(secret, "${timestamp}.${METHOD}.${path_with_query}.${body}")). The body is the exact one you send (empty on GET). The code samples already compute it.
Idempotency-KeyYesUnique per operation. Retrying with the same key does not duplicate.. Up to 100 characters

Path parameters#

NameTypeRequiredDescription
idstringYesPayment id

Request body#

{
  "monto": 5000,
  "motivo": "Producto devuelto"
}
NameTypeRequiredDescription
montonumberNoGreater than 0, up to 1000000000
motivostringNoUp to 200 characters

Fields not listed above are rejected with VALIDACION.

Examples#

KEY="pk_test_..."; SECRET="sk_test_..."
RUTA="/business/v0/pagos/pag_4k9x/reembolsos"; TS=$(date +%s)
BODY='{"monto":5000,"motivo":"Producto devuelto"}'
FIRMA=$(printf '%s' "$TS.POST.$RUTA.$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $NF}')

curl -X POST "https://sandbox.finanxis.net$RUTA" \
  -H "X-Finanxis-Key: $KEY" \
  -H "X-Finanxis-Timestamp: $TS" \
  -H "X-Finanxis-Signature: $FIRMA" \
  -H "Idempotency-Key: TICKET-55821" \
  -H "Content-Type: application/json" \
  --data "$BODY"

Response codes#

CodeMeaning
201Success
500Error. Check `data.error.code` and `data.error.como_resolver`.
4xxError. Check `data.error.code` and `data.error.como_resolver`.

Every response has the shape { success, message, data }.

Response#

{
  "success": true,
  "message": "Reembolso hecho.",
  "data": {
    "id": "pag_4k9x",
    "estado": "COMPLETADO",
    "canal": "APP",
    "cobro": {
      "id": "cob_7d2c9a",
      "estado": "PAGADO",
      "caja_id": "caja_8x2k1m",
      "monto": 21000.5,
      "moneda": "VES",
      "referencia_externa": "TICKET-55821",
      "descripcion": "Compra en farmacia",
      "qr_url": "https://pay.finanxis.net/c/Qm9…",
      "expira_en": "2026-10-10T14:23:45Z",
      "pagado_en": "2026-10-10T14:21:30Z",
      "cancelado_en": null,
      "metadata": {
        "pedido": "A-1029"
      },
      "creado_en": "2026-10-10T14:20:45Z"
    },
    "monto": 21000.5,
    "moneda": "VES",
    "comision": 0,
    "monto_neto": 21000.5,
    "pagado_con": {
      "moneda": "USDT",
      "monto": 54.32,
      "tasa": 386.6
    },
    "monto_reembolsado": 5000,
    "reembolsable": 16000.5,
    "reembolsable_hasta": "2026-11-09T14:21:30Z",
    "reembolsos": [
      {
        "id": "rem_2p8w",
        "pago_id": "pag_4k9x",
        "monto": 5000,
        "moneda": "VES",
        "devuelto_al_cliente": {
          "moneda": "USDT",
          "monto": 12.93
        },
        "descontado_al_comercio": 5000,
        "comision_devuelta": 0,
        "motivo": "Producto devuelto",
        "canal": "API",
        "creado_en": "2026-10-11T10:00:00Z"
      }
    ],
    "pagado_en": "2026-10-10T14:21:30Z",
    "reembolso_id": "rem_2p8w"
  }
}

Errors#

Every error carries data.error.code, what happened and how to fix it.

HTTPcodeHow to fix it
500ERROR_INTERNOOcurrió un error interno.Reintenta con la misma Idempotency-Key. Si persiste, contáctanos indicando el request_id.
400VALIDACIONHay campos inválidos.Revisa data.error.campos: cada elemento dice qué campo falló, por qué y un ejemplo válido.
400IDEMPOTENCY_KEY_FALTANTEFalta el header Idempotency-Key.Envía Idempotency-Key con un valor único por operación (ej. el número de ticket o un UUID). Si reintentas, usa el mismo valor y no se duplicará.
409IDEMPOTENCY_CONFLICTOEsa Idempotency-Key ya se usó con datos distintos.Usa una Idempotency-Key nueva para una operación nueva. Repite la misma solo para reintentar exactamente la misma petición.
404NO_ENCONTRADOEl recurso no existe o no pertenece a tu comercio.Verifica el id. Solo puedes acceder a recursos de tu propio comercio.
409CONFLICTO_ESTADOLa operación no es posible en el estado actual del recurso.Consulta el recurso para ver su estado actual antes de reintentar.
400SALDO_INSUFICIENTENo tienes saldo suficiente para esta operación.Revisa tu saldo con GET /business/v0/saldos, recarga tu wallet de esa moneda o usa un monto menor.
401AUTH_HEADERS_FALTANTESFaltan headers de autenticación.Envía X-Finanxis-Key, X-Finanxis-Timestamp y X-Finanxis-Signature en cada petición.
401AUTH_FIRMA_INVALIDALa firma no coincide.Firma HMAC-SHA256 en hex, con tu secreto, sobre: ${timestamp}.${METODO}.${ruta_con_query}.${body_exacto}. Usa el body exactamente como lo envías (mismo orden y espacios) y body vacío en GET.
401AUTH_TIMESTAMP_INVALIDOEl timestamp no es válido o está fuera de la ventana permitida.X-Finanxis-Timestamp debe ser la hora actual en segundos Unix (UTC). Se aceptan ±5 minutos: sincroniza el reloj de tu servidor (NTP).
401AUTH_LLAVE_REVOCADALa llave fue revocada.Crea una llave nueva en business.finanxis.net → Llaves de API y actualiza tu integración.