Create a card product in the Marqeta dashboard or via POST /cardproducts, defining the funding source, JIT funding configuration (including your gateway URL), and card program settings.
Create a user by POSTing to /users with identifying details; receive a user_token.
Issue a card by POSTing to /cards with the user_token and card_product_token; for virtual cards the card is ready immediately, for physical cards it enters a fulfillment queue.
Implement your JIT funding webhook endpoint — Marqeta will POST an authorization request to your gateway_url for every transaction; respond within the required timeout (typically under 5 seconds) with a JSON body containing amount and a jit_funding object indicating approval or decline.
In your JIT gateway handler, check the user's available balance in your ledger, deduct the amount if sufficient, and return a 200 response with jit_funding.method=pgfs.authorization and the approved amount; return a decline code if insufficient.
Reconcile final transaction amounts using Marqeta's clearing webhooks, which may differ from the authorization amount (e.g., for tips or fuel holds).
Known gotchas
Your JIT gateway endpoint must respond within Marqeta's timeout window; if your service is slow or times out, Marqeta declines the transaction — build a low-latency, highly available endpoint with no synchronous database calls on the critical path.
Authorization holds and final cleared amounts often differ (gas station pre-authorizations, restaurant tips); your ledger must handle both an initial hold and a final settlement update to avoid balance discrepancies.
Marqeta sandbox uses test card numbers and will not interact with real card networks; ensure your staging environment JIT gateway is pointed to your staging ledger, not production, to avoid contaminating balances.
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