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.
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
currency | For SPEI Dynamic Clabe, use MXN currency | string | true |
exchange_currency | Currency to be exchanged (ISO 4217 format). One of: MXN, USD, EUR | string | true |
value | Amount to be sent to internal bank account balance or your international bank account with two decimal places. E.g: 1000.00 | string | true |
from_bank_account_id | This field represents the ID of your FACILITA MXN bank account that we will open for you | string | true |
to_bank_account_id | Destination bank account UUID. Its currency must match the currency informed on the exchange_currency attribute | string | true |
subject_id | UUID of the Mexican registered person/company | string | true |
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:
- The transaction is automatically canceled with reason "SPEI dynamic CLABE expired"
- The CLABE is released back to the pool for reuse
- A
payment_expiredwebhook 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"
}
}'
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
currency | Currency of your internal bank account | string | true |
exchange_currency | For SPEI, always use MXN | string | true |
value | Amount to be sent to Attrus or deducted from an internal bank account balance | string | true |
from_bank_account_id | UUID of your internal bank account. Its currency must match the currency informed on the currency attribute | string | true |
to_bank_account_id | Destination bank account UUID. This bank account must be from your Mexican customer | string | true |
subject_id | UUID of your customer, i.e. the owner of the to_bank_account_id | string | true |