Mexico withdrawals (MXN)
Withdraw funds to a registered bank account in Mexico in Mexican pesos.
All endpoints require authentication with Authorization: Bearer [TOKEN] and x-api-key.
General flow
Check bank codes
Get available bank list with GET /bank-codes/mxn.
Create recipient
Register beneficiary bank account with POST /recipients/mxn.
Execute withdrawal
Create SPEI withdrawal with POST /withdrawals/mxn/.
Bank codes
Gets available bank code list for a country. Required to register recipient accounts.
Bank codes
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
GEThttps://dev.backend.colurs.co/bank-codes/mxnRequired Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| country | string | Country code (e.g. 'mx', 'br', 'co') |
cURL Example
curl -X GET "https://dev.backend.colurs.co/bank-codes/mxn?country=mx" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]"Response
response.json
{
"code_transaction": "OK",
"data": [
{ "code": "40012", "name": "BBVA México"},
{ "code": "40014", "name": "Santander México"},
{ "code": "40021", "name": "HSBC México"},
{ "code": "40072", "name": "Banorte"},
{ "code": "40044", "name": "Scotiabank México"}
]
}💡
Save bank `code` to use when creating a recipient or withdrawal method.
Recipients
List recipients
Gets user’s registered recipient accounts. Can query from local DB or sync from external service.
List recipients
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
GEThttps://dev.backend.colurs.co/recipients/mxnRequired Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| currency | string | Currency (default: 'mxn') | |
| network | string | Network (e.g. 'spei') | |
| protocol | string | Protocol (e.g. 'clabe') | |
| source | string | 'db' (default) for local source, 'api' to sync with external service |
cURL Example
curl -X GET "https://dev.backend.colurs.co/recipients/mxn?currency=mxn" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]"Response
response.json
{
"code_transaction": "OK",
"data": [
{
"recipient_id": "rec_abc123",
"beneficiary_name": "María López",
"account_number": "646180157000000099",
"bank_code":
"40012"}
]
}Create recipient
Register a new bank account as recipient for MXN withdrawals.
Create recipient
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
POSThttps://dev.backend.colurs.co/recipients/mxnRequired Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| beneficiary_name | string | Beneficiary full name | |
| account_number | string | CLABE account number (18 digits) | |
| bank_code | string | Bank code (from /bank-codes/mxn) | |
| currency | string | Currency (e.g. 'mxn') | |
| network | string | Network (e.g. 'spei') | |
| protocol | string | Protocol (e.g. 'clabe') |
cURL Example
curl -X POST "https://dev.backend.colurs.co/recipients/mxn" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]" \
-H "Content-Type: application/json" \
-d '{"beneficiary_name":"María López","account_number":"646180157000000099","bank_code":"40012","currency":"mxn"}'Response
response.json
{
"code_transaction": "OK",
"recipient_id":
"rec_xyz789"}Possible Errors
| Code | Error | Description |
|---|---|---|
| 400 | BadRequest | Invalid account data or incorrect CLABE |
| 409 | Conflict | Recipient is already registered |
💡
Save `recipient_id` to use when creating withdrawals.
Withdrawal methods
List withdrawal methods
Gets user’s registered withdrawal methods (recipient accounts).
List withdrawal methods
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
GEThttps://dev.backend.colurs.co/withdrawal-methods/mxnRequired Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]cURL Example
curl -X GET "https://dev.backend.colurs.co/withdrawal-methods/mxn" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]"Response
response.json
{
"code_transaction": "OK",
"data": [
{
"recipient_id": "rec_abc123",
"beneficiary_name": "María López",
"account_number": "646180157000000099",
"bank_code":
"40012"},
{
"recipient_id": "rec_def456",
"beneficiary_name": "Carlos García",
"account_number": "014180605000000001",
"bank_code":
"40014"}
]
}Delete withdrawal method
Delete a registered recipient account.
Delete withdrawal method
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
DELETEhttps://dev.backend.colurs.co/withdrawal-methods/mxnRequired Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| recipient_id | string | Recipient ID to delete |
cURL Example
curl -X DELETE "https://dev.backend.colurs.co/withdrawal-methods/mxn?recipient_id=rec_abc123" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]"Response
response.json
{
"code_transaction": "OK",
"message":
"Recipient deleted successfully"}Possible Errors
| Code | Error | Description |
|---|---|---|
| 400 | BadRequest | recipient_id not provided |
| 404 | NotFound | Recipient not found |
Create SPEI withdrawal
Execute an MXN withdrawal via SPEI to a registered recipient account.
Create MXN withdrawal
Authorizations
Both
x-api-key and Authorization: Bearer <token> headers are required.Endpoint
POSThttps://dev.backend.colurs.co/withdrawals/mxn/Required Headers
Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| recipient_id | string | Registered recipient ID | |
| amount | string | Amount to withdraw in MXN (e.g. '10000.00') | |
| reference | string | Transfer reference | |
| concept | string | SPEI payment concept |
cURL Example
curl -X POST "https://dev.backend.colurs.co/withdrawals/mxn/" \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]" \
-H "Content-Type: application/json" \
-d '{"recipient_id":"rec_abc123","amount":"10000.00","concept":"Pago de servicios"}'Response
response.json
{
"code_transaction": "OK",
"withdraw_id": 12345,
"wid": "w_abc123xyz",
"amount": "10000.00",
"fee": "15.00",
"total": "10015.00",
"status":
"pending"}Possible Errors
| Code | Error | Description |
|---|---|---|
| 400 | BadRequest | Invalid data or amount out of range |
| 402 | InsufficientFunds | Insufficient balance for withdrawal |
| 404 | NotFound | Recipient not found |
⚠️
`fee` indicates charged commission. `total` is the amount deducted from balance (amount + fee).