{
  "info": {
    "name": "SPPay observed bank transactions",
    "description": "Read observed bank transactions with a merchant API key and payments.read. Only list/detail GET operations are public. No order creation, cancellation or payment-bank discovery. Connect accounts and configure bank_transaction.created webhooks in Portal. OUT observes debits only, never transfers or payouts. SPPay supports multiple banks; update timing and available transaction data vary by bank and connection. Verify webhook signatures on raw bytes and deduplicate event.id. Keep API keys out of shared exports.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{api_key}}", "type": "string" }]
  },
  "variable": [
    { "key": "base_url", "value": "https://api.sppay.vn/api/v1" },
    { "key": "api_key", "value": "" },
    { "key": "transaction_id", "value": "" }
  ],
  "item": [
    {
      "name": "List observed transactions",
      "request": {
        "method": "GET",
        "header": [{ "key": "Accept", "value": "application/json" }],
        "url": "{{base_url}}/payments?limit=20&direction=in",
        "description": "Optional filters: limit (1..100, default 20), starting_after (ID, max 40), direction (in/out; omit for both), bank_account_id (positive integer), bank_code (VietQR BIN, e.g. 970422 for MBBank), search (max 255), from/to (YYYY-MM-DD; inclusive local days, to >= from). Unknown or empty parameters are rejected. Use next_cursor as starting_after with the same filters; invalid/foreign/filtered-out cursor returns 422. Returns object=list, data, has_more, next_cursor. No page, total or PayIn status filters."
      }
    },
    {
      "name": "Get observed transaction",
      "request": {
        "method": "GET",
        "header": [{ "key": "Accept", "value": "application/json" }],
        "url": "{{base_url}}/payments/{{transaction_id}}",
        "description": "Set transaction_id to an id from the list, not a PayIn ID or bank reference. Returns a bare bank_transaction object. Missing or foreign transactions return 404 resource_missing. Both reads require payments.read; 401 authentication, 403 permission, 422 list validation, 429 rate limit and 500 internal errors use the error envelope."
      }
    }
  ]
}
