Sandbox

POST/business/v0/sandbox/webhooks

Register a sandbox webhook endpoint

Try it live ↓

Sandbox only. Registers the https:// URL where you want sandbox events (up to 5). Store secreto (whsec_…): it is shown only once and you verify Finanxis-Signature with it. Use eventos: ["*"] to receive all of them.

Endpoint URL#

POST https://sandbox.finanxis.net/business/v0/sandbox/webhooks

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.

Request body#

{
  "url": "https://tu-servidor.com/webhooks/finanxis",
  "eventos": [
    "*"
  ]
}
NameTypeRequiredDescription
urlstringYesUp to 500 characters
eventos"cobro.creado" | "cobro.pagado" | "cobro.expirado" | "cobro.cancelado" | "cobro.rechazado" | "pago.reembolsado" | "payout.confirmado" | "payout.en_proceso" | "payout.pagado" | "payout.rechazado" | "payin.aprobado" | "payin.rechazado" | "tasa.actualizada" | "*"[]Yes—
descripcionstringNoUp to 120 characters

Fields not listed above are rejected with VALIDACION.

Examples#

KEY="pk_test_..."; SECRET="sk_test_..."
RUTA="/business/v0/sandbox/webhooks"; TS=$(date +%s)
BODY='{"url":"https://tu-servidor.com/webhooks/finanxis","eventos":["*"]}'
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 "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": "Endpoint creado. Copia el secreto ahora: no lo volverás a ver.",
  "data": {
    "id": "whk_5t1n",
    "url": "https://tu-servidor.com/webhooks/finanxis",
    "descripcion": null,
    "eventos": [
      "*"
    ],
    "activo": true,
    "secreto": "whsec_3kT…(se muestra una vez)",
    "creado_en": "2026-10-10T14:00:00Z"
  }
}

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.
409CONFLICTO_ESTADOLa operación no es posible en el estado actual del recurso.Consulta el recurso para ver su estado actual antes de reintentar.
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.