Set up a JIT funding gateway URL in the Marqeta dashboard or via the program API; this is an HTTPS endpoint you control that Marqeta will call synchronously during each authorization
When an authorization occurs, Marqeta POSTs a JIT funding message to your gateway with transaction details (amount, merchant, card token, user token) within the required sub-second response window
Your gateway evaluates the authorization in real time (check available balance in your ledger, run spend controls, evaluate fraud signals) and responds with a JSON body: approved=true/false and optionally a custom error code if declined
If approved, immediately debit the user's balance in your internal ledger for the authorized amount; when the clearing transaction arrives (typically 1–3 days later) reconcile the cleared amount against the authorization hold
Handle authorization reversals and partial-clearing: when clearing amount differs from auth amount, release or capture the difference in your ledger
Configure timeout behavior — if your JIT gateway does not respond within Marqeta's timeout, Marqeta can be configured to auto-approve or auto-decline; choose based on your fraud vs. availability tradeoff
Known gotchas
Your JIT gateway must respond within Marqeta's strict SLA (typically under 2 seconds); use a low-latency in-memory balance store, not a database round-trip, as your balance check
JIT funding ties your uptime directly to card transaction approval rates; any downtime in your gateway results in declined transactions for cardholders — implement redundancy and a circuit-breaker fallback policy
Marqeta sends both authorization and clearing messages; only charge the user on clearing, not on the initial auth message, to avoid double-charging when auth and clear amounts differ
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp