Endpoints

Get payment

GET/api/v1/payments/{id}

Retrieve a transaction by ID.

GET/api/v1/payments/{id}secret key

Retrieve a transaction by ID. Useful to confirm the status after the checkout redirect. The `paymentMethodId` field in the response is the same 4-digit id you sent when creating it — a complete round-trip. The legacy path `GET /api/v1/transactions/{id}` still works identically.

Request
curl https://sandbox.key2pay.ai/api/v1/payments/TXN-MVZQXW7B-A4F2 \
  -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y"
Response
{
  "id": "TXN-MVZQXW7B-A4F2",
  "status": "completed",
  "amount": 50.00,
  "currency": "USD",
  "amountLocal": 882.17,
  "currencyLocal": "MXN",
  "paymentMethodId": "1001",
  "paymentMethod": "spei",
  "fees": { "platform": 1.45, "provider": 0, "network": 0, "total": 1.45 },
  "settlement": { "type": "delayed", "delay": "48h", "status": "pending" },
  "timestamps": { "created": "2026-05-12T15:50:00Z" }
}