Skip to main content

Mexico Transactions

SPEI

SPEI is the Mexican bank transfer payment method that allows you to send and receive money almost instantly. We will open a Mexican bank account (CLABE) and associate it with your Attrus internal account ID.

Receiving payments via SPEI is very simple. You just need to register your customers beforehand and share with them the CLABE from the account we opened for you. Once the payment is made, we will automatically create a transaction with status identified and send you a webhook notification.

Note: If you proceed without registering your customer, we won't be able to reconcile the payment, and the transaction will remain pending until you register your customer, even if they did the bank transfer.

SPEI (Dynamic CLABE)

Dynamic CLABE is a way for you to be able to accurately track each transaction made, you will share a specific CLABE number with the payer, so the payment will be connected to the same transaction you created. For use this feature, you'll need to request us to activate it in your account.

curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "MXN",
"exchange_currency": "MXN",
"value": "1000.00",
"from_bank_account_id": "your real MXN account id",
"to_bank_account_id": "your internal MXN cash-in id",
"subject_id": "Person or company id"
}
}'

For each MXN cash-in transaction created, a 'payment_info' object will be included. Inside this object, you will find the dynamic_clabe that is unique to that transaction. This way you can share this CLABE with your customer, since it is exclusively created for that transaction. You will need to create a transaction following the payload below.

This allows the correct transaction to be paid and reconciled. This feature is very useful for businesses where the payment is made by a third party.

200OK
{
"data": {
"value": "1000.00",
"to_bank_account": {
"routing_number": null,
"pix_info": null,
"owner_name": "Company's name",
"owner_document_number": "tax id test",
"owner_company": {
"social_name": "Company's name",
"id": "e336bdbf-4fee-4ecc-9f4b-56bdc092222e",
"document_type": "tax_id",
"document_number": "tax id test"
},
"nickname": null,
"internal": true,
"intermediary_bank_account": null,
"id": "6bfeabfb-e4ba-4967-b7d8-01c1cb13897a",
"iban": null,
"currency": "MXN",
"branch_number": null,
"branch_country": "MEX",
"bank": {
"swift": null,
"name": "Internal",
"ispb": null,
"id": "6facab8d-573e-44d0-a4bd-ce2600368263",
"country": "MEX",
"code": "032"
},
"account_type": "conta-corrente",
"account_number": null,
"aba": null
},
"subject_is_receiver": false,
"subject_id": "d082a457-608b-467a-a30d-89495b61a57f",
"subject": {
"updated_at": "2024-09-06T00:21:16.956245",
"status": "approved",
"social_name": "Mexican Person Test",
"rfc_pf": "PERP940807436",
"required_clearance_level": 1,
"references": [],
"phone_number": "997353481",
"net_monthly_average_income": "0.00",
"inserted_at": "2024-02-20T18:28:56.297935",
"id": "d082a457-608b-467a-a30d-89495b61a57f",
"fiscal_country": "Mexico",
"email": "[email protected]",
"document_type": "curp",
"document_number": "PERP940807HJCDSD00",
"clearance_level": 2,
"birth_date": null,
"address_street": "teste",
"address_state": "teste",
"address_postal_code": "4521215",
"address_number": "40",
"address_neighborhood": "teste",
"address_country": "Mexico",
"address_complement": "teste",
"address_city": "teste"
},
"status": "pending",
"source_name": "Mexican Person Test",
"source_document_type": "curp",
"source_document_number": "PERP940807HJCDSD00",
"payment_info": {
"dynamic_clabe": "646010366700010938"
},
"meta": {},
"inserted_at": "2024-09-06T00:21:16.947728",
"id": "11aea01c-e6f7-4b74-92a9-23f315048704",
"from_credit_card": null,
"from_bank_account": {
"routing_number": null,
"pix_info": null,
"owner_name": "FACILITA PAY",
"owner_document_number": "N/A",
"nickname": null,
"intermediary_bank_account_id": null,
"id": "cf7dae7b-410a-4cb8-a8ec-f9a145925526",
"iban": null,
"currency": "MXN",
"branch_number": null,
"branch_country": null,
"bank": {
"swift": null,
"name": "Sistema de Transferencias y Pagos STP, S.A. de C.V., SOFOM E.N.R.",
"ispb": null,
"id": "f4affad3-51a0-4d87-9c6e-97b0443e278b",
"country": "MEX",
"code": "646"
},
"account_type": "conta-corrente",
"account_number": "646180366700010004",
"aba": null
},
"for_exchange": false,
"exchanged_value": "1000.00",
"exchange_under_request": false,
"exchange_currency": "MXN",
"estimated_value_until_exchange": false,
"currency": "MXN",
"cleared": true
}
}

HTTP Request

POST /transactions

Body Parameters

ParameterDescriptionTypeRequired
transactionAn object containing all the required valuesobjecttrue
currencyFor SPEI Dynamic Clabe, use MXN currencystringtrue
exchange_currencyCurrency to be exchanged (ISO 4217 format). One of: MXN, USD, EURstringtrue
valueAmount to be sent to internal bank account balance or your international bank account with two decimal places. E.g: 1000.00stringtrue
from_bank_account_idThis field represents the ID of your FACILITA MXN bank account that we will open for youstringtrue
to_bank_account_idDestination bank account UUID. Its currency must match the currency informed on the exchange_currency attributestringtrue
subject_idUUID of the Mexican registered person/companystringtrue

Automatic expiration of Dynamic CLABEs

Dynamic CLABEs have configurable automatic expiration per partner:

  • Default: 30 days after the transaction is created.

When a pending transaction expires:

  1. The transaction is automatically canceled with reason "SPEI dynamic CLABE expired"
  2. The CLABE is released back to the pool for reuse
  3. A payment_expired webhook is sent to the partner

For transactions that have already been processed (identified, exchanged, wired), only the CLABE is unlinked — the transaction is NOT canceled.

If a payment is made after expiration, STP rejects it and returns the funds to the payer.

Payout (MXN)

After registering your customer bank account with us, you will be able to pay them locally using the following endpoint. We will use the CLABE details you registered with us.

The payout transactions can be initiated within your foreign currency cash-out account or your Mexican cash-out account.

*If you prefer to do a payout with the full value already in local currency, please refer to the Reverse Exchange section.

curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "USD or MXN",
"exchange_currency": "MXN",
"value": "500.00",
"from_bank_account_id": "your USD/MXN cash-out internal account id",
"to_bank_account_id": "the id of your customer bank account",
"subject_id": "your customer id"
}
}'
200OK
{
"data": {
"value": "500.00",
"to_bank_account": {
"routing_number": null,
"pix_info": null,
"owner_name": "Horacio",
"owner_document_type": "curp",
"owner_document_number": "SOMH031031HSRTRR04",
"nickname": null,
"intermediary_bank_account_id": null,
"id": "ec0101ea-4de2-413f-8f30-4dfef8608e0e",
"iban": null,
"currency": "MXN",
"branch_number": null,
"branch_country": null,
"bank": {
"swift": null,
"name": "IXE Banco, S.A",
"ispb": null,
"id": "9563453e-05fb-41e2-a915-15d7abe3fb08",
"country": "MEX",
"code": "032"
},
"account_type": "conta-corrente",
"account_number": "231056315610651",
"aba": null
},
"subject_is_receiver": true,
"subject_id": "ac3bf8d8-e299-4fe9-8565-2ff6fe7c2dec",
"status": "identified",
"source_name": "Horacio Soto Morales",
"source_document_type": "curp",
"source_document_number": "SOMH031031HSRTRR04",
"meta": null,
"inserted_at": "2025-07-10T17:27:53.250740",
"id": "5417d353-62d1-4d70-976d-b385817f6c51",
"from_credit_card_id": null,
"from_bank_account": {
"routing_number": null,
"pix_info": null,
"owner_name": "Biriweb Serviços de Internet Ltd",
"owner_document_type": null,
"owner_document_number": "21958642819",
"nickname": null,
"internal": true,
"intermediary_bank_account_id": null,
"id": "97c29459-e087-4358-bbaf-5597a76b3b80",
"iban": null,
"currency": "MXN",
"branch_number": null,
"branch_country": "MEX",
"bank": {
"swift": null,
"name": "Internal",
"ispb": null,
"id": "6facab8d-573e-44d0-a4bd-ce2600368263",
"country": "BRA",
"code": "999"
},
"account_type": "conta-corrente",
"account_number": null,
"aba": null
},
"for_exchange": false,
"exchanged_value": "500.00",
"exchange_under_request": false,
"exchange_currency": "MXN",
"estimated_value_until_exchange": false,
"currency": "MXN",
"cleared": true,
"bank_transaction": {
"wire_id": null,
"value": "500.0",
"spei_reference": null,
"spei_concepto_de_pago": null,
"source_type": "SPEI-PRE",
"source_name": "Horacio Soto Morales",
"source_id": "5417d353-62d1-4d70-976d-b385817f6c51",
"source_document_type": "curp",
"source_document_number": "SOMH031031HSRTRR04",
"source_description": "CREDITO POR SPEI ANTECIPADO",
"source_branch": null,
"source_bank_ispb": null,
"source_bank": null,
"source_account": null,
"movement_date": "2025-07-10",
"iof_value": "0.00",
"inserted_at": "2025-07-10T17:27:53.269976",
"id": "38c8053b-cf35-4cac-aee3-8e260af87d28",
"exchanged_value": "500.00",
"exchange_rate_spot": null,
"exchange_rate": "1.0",
"exchange_id": "1562226e-b9e9-4928-ae79-f50fed77af88",
"exchange_currency": "MXN",
"exchange_approved": true,
"currency": "MXN"
}
}
}

HTTP Request

POST /transactions

Body Parameters

ParameterDescriptionTypeRequired
transactionAn object containing all the required valuesobjecttrue
currencyCurrency of your internal bank accountstringtrue
exchange_currencyFor SPEI, always use MXNstringtrue
valueAmount to be sent to Attrus or deducted from an internal bank account balancestringtrue
from_bank_account_idUUID of your internal bank account. Its currency must match the currency informed on the currency attributestringtrue
to_bank_account_idDestination bank account UUID. This bank account must be from your Mexican customerstringtrue
subject_idUUID of your customer, i.e. the owner of the to_bank_account_idstringtrue