Skip to main content
This page describes the resources and endpoints that a Gateway Just-in-Time (JIT) Funding setup requires. To create and test these resources in the sandbox, follow the Configuring Gateway JIT Funding tutorial.

JIT Funding

JIT Funding automates the loading of funds into accounts in real time during the transaction process. In a Gateway JIT Funding setup, the Marqeta platform and your system both participate in authorization decisions. Funds are drawn from the program gateway funding source defined by the card product. The Marqeta platform and your system exchange messages of the following types:
  • JIT Funding requests are actionable messages sent by the Marqeta platform requesting permission to fund a specific transaction.
  • JIT Funding responses are sent by your gateway to the Marqeta platform in response to a funding request.
  • JIT Funding notifications are transaction event messages sent by the Marqeta platform to your webhook endpoint (not your gateway endpoint). These asynchronous messages contain the entire transaction and inform you about its ultimate outcome.
For more information about JIT Funding, see About Just-in-Time Funding.

Program gateway funding source

A program gateway funding source represents a bank account from which funds are drawn for JIT-funded transactions. In the public and private sandbox environments, you can create a program gateway funding source that simulates funds for your test transactions. In a production environment, you must work with a Marqeta representative to define the bank account from which the program gateway funding source draws funds.
Note
If you are using a third-party service to collect user funds, Marqeta and the issuing bank require specific reporting to ensure compliance with all rules and regulations. Contact your Marqeta representative for more information.
For a complete description of the /fundingsources/programgateway endpoint, see Program Gateway Funding Sources.

Card product configuration

A card product defines attributes and behaviors for a set of cards. Each card product has a single funding source, which funds all transactions conducted using an associated card. Gateway JIT Funding setups require you to create a card product associated with a program gateway funding source.
Note
You can create and configure card products in the public and private sandbox environments. To create a new card product for production, contact your Marqeta representative for more information.
For a complete description of the /cardproducts endpoint, see Card Products.

Your gateway endpoint

To participate in Gateway JIT Funding decisions, your system must respond to requests sent by the Marqeta platform. Your system can respond to a funding request in the following ways:
  • To approve, set the HTTP response code to 200 OK.
  • To deny, set the HTTP response code to 402 Request Failed.
For more information on handling Gateway JIT Funding events, see Gateway JIT Funding Messages.

Your webhook endpoint

To handle informative Gateway JIT Funding messages, your system must include an endpoint for receiving event notifications. Within seconds of each transaction, the Marqeta platform sends webhook notifications to your endpoint to enable you to track requests, maintain balances, and resolve timeout issues. Your system must respond to each informative JIT Funding request using the 200 OK HTTP response code. If your system does not respond with the 200 OK HTTP response code, the Marqeta platform will try to resend the message. For more information about the Marqeta platform webhook system, see About Webhooks.