Virtual SPEI
How to use Virtual SPEI to create a virtual account and receive payins by bank transfer in Mexico.
Create Virtual Account
https://gateway-test.luxtak.com/virtual-account/spei/create
This endpoint allows you to create a virtual SPEI account (CLABE) for a customer. Once created, the customer can transfer any amount to the returned account_number at any time to complete a payin; the account stays active and can be reused for multiple payments. Each buyer_id is bound to a unique virtual account.
Parameters
Header
| Parameter | Type | Description |
|---|---|---|
| Content-Type* | string | application/json; chartset=UTF-8 |
| Authorization* | string | Basic Base($app_id:$security_key) |
Body
| Parameter | Type | Description |
|---|---|---|
| app_id* | string | created app's id at dashboard - Max. 32 chars - |
| timestamp* | string | yyyy-MM-dd HH:mm:ss - Max. 19 chars - |
| notify_url* | string | Where luxtak will send notification to |
| customer.identify.type | string | RFC or CURP |
| customer.identify.number | string | RFC: 13 chars, e.g. MAMB780915969 CURP: 18 chars |
| customer.buyer_id* | string | merchant user's id |
| customer.name | string | customer's full name |
| customer.email | string | customer's email |
Responses
| 200 | create successfully |
{
"code": "10000",
"msg": "Success",
"account_id": "DLN**LWG",
"account_number": "72***69",
"buyer_id": "0123",
"provider": "TRANSFER DIRECT",
"status": "ACTIVE",
"beneficiary_name": "PULABE20 SA DE CV",
"notify_url": "https://your-notify-url.com"
}
| 400 | account pool run out |
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "account-pool-run-out",
"sub_msg": "account pool run out"
}
Tips
User payment tips
account_number is the CLABE the customer should transfer to; beneficiary_name is the name that will show as the receiver on the customer's bank app.
The account is reusable: it stays ACTIVE and can receive multiple transfers over time, unlike a one-time payin reference.
A notify_url callback will be sent by luxtak for each transfer received into the account.
Example
curl --location --request POST 'https://gateway-test.luxtak.com/virtual-account/spei/create' \
--header 'Authorization: Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "162************38",
"timestamp": "2025-03-20 11:11:11",
"notify_url": "https://your-notify-url.com",
"customer": {
"identify": {
"type": "RFC",
"number": "MAMB780915969"
},
"buyer_id": "buyer_0101_0001",
"name": "Test User Name",
"email": "test@luxtak.com"
}
}'
Tips
Note: 162********38 is luxtak's test app id for sandbox, and MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ== is authorization token associated with the test app id.
Warning
Please use your own app_id and generate your own authorization token when testing.
