POST
getTransfers
Lista las transferencias SPEI de tu cuenta con filtros opcionales. Ordenadas por fecha de creación descendente.
Endpoint
POST
https://magicpay.b4a.io/functions/getTransfersHeaders
| Header | Valor |
|---|---|
| Content-Type | application/json |
| x-parse-application-id | YOUR_APP_ID |
| x-parse-rest-api-key | YOUR_REST_KEY |
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
| apiKey | string | Sí | Tu API key de merchant. |
| skip | number | No | Registros a saltar (paginación). Default: 0. |
| limit | number | No | Cantidad de registros. Default: 200, máximo: 1000. |
| status | select | No | Filtrar por estado. |
| transferId | string | No | Buscar por ID de transferencia (búsqueda parcial). |
| account | string | No | Filtrar por cuenta destino (búsqueda parcial). |
| bank | bank | No | Filtrar por banco (case insensitive). |
| owner | string | No | Filtrar por nombre del beneficiario (case insensitive). |
| amount | number | No | Filtrar por monto exacto. |
| numReference | string | No | Filtrar por referencia numérica (búsqueda parcial). |
| before | date | No | Transferencias antes de esta fecha. Formato: "YYYYMMDD" o timestamp en ms. |
| after | date | No | Transferencias después de esta fecha. Formato: "YYYYMMDD" o timestamp en ms. |
Ejemplo de Request
cURL
curl -X POST 'https://magicpay.b4a.io/functions/getTransfers' \
-H 'Content-Type: application/json' \
-H 'x-parse-application-id: YOUR_APP_ID' \
-H 'x-parse-rest-api-key: YOUR_REST_KEY' \
-d '{
"apiKey": "pk_live_xxxxxxxxxxxxx",
"limit": 50,
"status": "paid",
"after": "20240101"
}'JavaScript
const response = await fetch('https://magicpay.b4a.io/functions/getTransfers', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-parse-application-id': 'YOUR_APP_ID',
'x-parse-rest-api-key': 'YOUR_REST_KEY',
},
body: JSON.stringify({
"apiKey": "pk_live_xxxxxxxxxxxxx",
"limit": 50,
"status": "paid",
"after": "20240101"
}),
});
const data = await response.json();
console.log(data);Ejemplo de Respuesta
JSON
{
"result": [
{
"id": "abc123def456",
"transferId": "PAY20240115001",
"trackingId": "PAY20240115001",
"status": "paid",
"description": "Pago de servicio",
"account": "012180015025354012",
"numReference": "1234567",
"amount": 150.5,
"fee": 3.48,
"bank": "BBVA MEXICO",
"owner": "JUAN PEREZ LOPEZ",
"createdAt": 1705286400000,
"balance": 10000,
"ownerFullName": "JUAN PEREZ LOPEZ MARTINEZ",
"ownerRfc": "PELJ900101XXX"
}
]
}