Overview
SPEI cash-out sends an interbank transfer to a destination CLABE. The account balance is debited and NTX Pay processes the transfer on the SPEI network. Confirmation arrives on thecash_out webhook with the transaction.cash_out.settled event.
Endpoint
POST /api/spei/cash-out
Headers
Request
Response (201)
transactionId (UUID) is the unique transaction identifier — it is the same value delivered in webhooks; use it to correlate events and look up the transaction.
Response Fields
string
required
Unique transaction identifier (UUID). Same value delivered in webhooks.
string
required
Transaction status:
PENDING, CONFIRMED, FAILED or EXPIRED.string
required
Destination CLABE the payer must use for the SPEI transfer.
string
SPEI numeric reference, when available.
integer
required
Amount in MXN centavos.
string
Transaction creation time (ISO 8601).
Request Fields
integer
required
Amount in MXN centavos (minimum 1). E.g.
50000 = $500.00 MXN.string
Unique external identifier (up to 100 characters). Resending with the same
externalId returns the existing transfer (server-side idempotency).string
required
Destination CLABE — exactly 18 numeric digits (regex:
^\d{18}$).string
required
Beneficiary name (3–255 characters).
string
Beneficiary RFC/CURP (10–20 characters). Recommended for reconciliation.
string
Concept shown on the beneficiary’s statement (up to 40 characters — SPEI concepto limit).
Balance Validation
Before sending, validate the balance:States
On the webhook, the outcomes arrive as
transaction.cash_out.settled (LIQUIDATED) and transaction.cash_out.rejected (REJECTED) — see the full payload.
Return after settlement: if the counterparty’s bank returns the transfer, the balance is credited back and you receive transaction.cash_out.returned on the refund_out webhook.
Error Codes
Node.js Example with Retry
Testing in the Sandbox
In the sandbox, the full pipeline runs — balance debited, fee charged, statement generated — and settlement is simulated within seconds. Your account needs balance: do a cash-in first. Force rejection, return, and synchronous failures with theX-Sandbox-Scenario header — see the scenario catalog.
Next Steps
cash_out Webhook
Settlement webhook payload
refund_out Webhook
How cash-out returns arrive