Endpoints
List payments
GET
/api/v1/paymentsList the shop's transactions with optional filters.
GET
/api/v1/paymentssecret keyList the authenticated shop's transactions, paginated + filterable. Each tx returns `paymentMethodId` (the same 4-digit id you sent when creating it) — you can use it as a filter to fetch only the txs of a specific retailer (e.g. `?paymentMethodId=1003` for Walmart only). The legacy path `GET /api/v1/transactions` still works identically.
Body parameters
limitinteger1–100. Default 50.offsetintegerDefault 0.statusstringcompleted · pending · failed · refunded · expired · chargeback.paymentMethodIdstring4-digit id from GET /api/v1/payment-methods. Filters to the exact retailer / bank / native method (e.g. "1003" returns only Walmart MEX).countrystringPayer's country. ISO-3 or ISO-2 interchangeably.merchantOrderIdstringYour own id saved when creating the charge — useful for disaster-recovery if you lose the txId.methodstringLegacy. Bucket slug (pix, spei, voucher, …). Use `paymentMethodId` for per-retailer precision.
Request
curl "https://sandbox.key2pay.ai/api/v1/payments?limit=20&status=completed&paymentMethodId=1001" \ -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y"
Response
{
"data": [
{
"id": "TXN-MVZQXW7B-A4F2",
"amount": 50.00,
"currency": "USD",
"amountLocal": 882.17,
"currencyLocal": "MXN",
"paymentMethodId": "1001",
"paymentMethod": "spei",
"status": "completed",
"country": "MEX",
"fees": { "platform": 1.45, "provider": 0, "network": 0, "total": 1.45 },
"timestamps": { "created": "2026-05-12T15:50:00Z" },
"merchantOrderId": "ORD-12345"
}
],
"pagination": { "total": 1, "limit": 20, "offset": 0, "pages": 1 }
}