DOCS

New!

/

10 minute read

August 3, 2019

About Just-in-Time Funding

Just-in-Time (JIT) Funding is a method of automatically funding an account in real time during the transaction process.

The standard funding model requires you to pre-load funds into individual accounts and maintain sufficient balances for each card holder’s transactions. You must manage each account balance to avoid under-funded or over-funded accounts.

With JIT Funding, accounts do not need to carry a balance. Instead, the Marqeta platform automatically moves funds from your funding source into the appropriate account at transaction time. The Marqeta platform makes programmatic funding decisions based on the details of the transaction. You can also directly participate in the decision-making process by configuring an endpoint on your system to receive and respond to JIT Funding requests originating on the Marqeta platform. If your system allows the transaction, the Marqeta platform moves funds from the funding source to the account.

The Marqeta platform supports the following types of JIT Funding:

  • Managed JIT Funding – The Marqeta platform applies spend controls to make authorization decisions.

  • Gateway JIT Funding – The Marqeta platform applies spend controls to make authorization decisions and forwards funding requests to your system (the gateway) to make funding decisions.

At the end of this guide, you should understand:

  • The available types of JIT Funding.

  • The role of JIT Funding in transactions on the Marqeta platform.

  • The requirements for implementing JIT Funding.

Managed JIT Funding

Managed JIT Funding simplifies the funding task by handling all authorization decisions on the Marqeta platform, but limits the level of control you have over the funding approval process.

For example, you can create spend controls on the Marqeta platform to limit when, where, and how much a card holder can spend with their card, but you cannot allow or deny individual transactions. For more information on spend controls, see Controlling Spending.

For a tutorial that walks you through the enablement process for Managed JIT Funding, see Configuring Managed JIT Funding.

Transaction process

null

Is this helpful?

When a card holder attempts to make a payment using an account configured for Managed JIT Funding, the following process occurs:

  1. The merchant sends an authorization message to the card network.

  2. The card network sends an authorization message to the Marqeta platform.

  3. The Marqeta platform uses spend controls to validate the authorization.

  4. If the authorization is valid, the Marqeta platform moves funds from the funding source into the card holder’s account.

  5. The Marqeta platform returns an authorization response to the card network.

  6. The card network sends an authorization response to the merchant.

Gateway JIT Funding

With Gateway JIT Funding, your system participates in the funding approval process, enabling you to have a high level of control over which transactions are successfully approved.

When a card holder with a JIT-funded account attempts to spend, the Marqeta platform sends a funding request message containing details about the transaction to the gateway endpoint on your system. Your system makes a decision to allow or deny the funds based on your own business rules and returns the appropriate response to the Marqeta platform.

Note
The gateway endpoint on your system must respond to every JIT Funding request, whether you intend to allow or deny the transaction.

For more information on Gateway JIT Funding requests, responses, and notifications, see the Gateway JIT Funding Messages page. For information on using transaction data to make funding decisions, see Transaction Data for JIT Funding Decisions.

For a tutorial that walks you through the enablement process for Gateway JIT Funding, see Configuring Gateway JIT Funding.

Transaction process

Gateway JIT Funding process

Is this helpful?

When a card holder attempts to make a payment using an account configured for Gateway JIT Funding, the following process occurs:

  1. The merchant sends an authorization message to the card network.

  2. The card network sends an authorization message to the Marqeta platform.

  3. The Marqeta platform uses spend controls to validate the authorization.

  4. If the authorization is valid, the Marqeta platform sends a funding request to your gateway endpoint.

  5. Your system approves or denies the funding request.

  6. Your system returns a funding response to the Marqeta platform. If the transaction indicates support for partial approval, your response can approve an amount less than or equal to the amount in the funding request.

  7. If the funding request is approved by your system, the Marqeta platform moves funds from the funding source into the card holder’s account.

  8. The Marqeta platform returns an authorization response to the card network and sends an authorization notification to your webhook endpoint for validation.

  9. The card network sends an authorization response to the merchant.

For additional examples of the Gateway JIT Funding process, see the Gateway JIT Funding Scenarios page.

Actionable vs. informative messages

The Marqeta platform sends funding requests to your gateway endpoint only if they are actionable (such as authorizations). For the remainder, the Marqeta platform sends a non-actionable notification to your webhook endpoint. You can use this data to update your account balances according to the transaction type–some transactions impact account balances and some do not. For more information, see Event Types.

Partial approval

For most requests, you must allow or deny the entire funding amount. However, some requests enable you to approve only a partial amount of the requested funds. Each JIT Funding request contains a partial_approval_capable field; when set to true, your JIT Funding response can allow an amount less than the requested amount.

Metadata

Gateway JIT Funding also enables you to add metadata to your gateway’s response that populates the transaction record with additional details, such as an order number. This metadata can facilitate correlation between records on your system and the Marqeta platform, and simplify reconciliation.

Managed vs. Gateway JIT Funding

The following table compares Managed JIT Funding with Gateway JIT Funding:

Managed JIT Funding Gateway JIT Funding

Authorization decisions

Handled by the Marqeta platform based on spend controls.

Handled by the Marqeta platform based on spend controls and your system’s authorization logic.

Partial approval capable

No

Yes (transaction-dependent)

Metadata injection

No

Yes

Sample use cases

Non-reloadable cards; virtual cards for e-commerce.

See more about the Virtual solution.

Reloadable, multi-use cards; additional access to funds available to cards not issued by Marqeta; additional controls on top of those supported by the Marqeta platform.

See more about the Delivery solution.

JIT Funding implementation

You will work with Marqeta to enable JIT Funding for your program. Whether you use Managed or Gateway JIT Funding, Marqeta handles the creation of the following required objects on your behalf:

  • A funding source configured for JIT Funding; when using Gateway JIT Funding, the funding source also defines the endpoint on your system where the Marqeta platform sends funding requests.

  • A card product configured for JIT Funding associated with the above funding source.

  • Spend controls that define which transactions are approved or denied by the Marqeta platform.

Gateway JIT Funding requires additional setup. You must complete Marqeta’s Gateway JIT Funding certification and implement the following on your system:

  • An endpoint on your system for receiving and responding to actionable funding requests from the Marqeta platform. Communication between the Marqeta platform and your system requires TLS v1.2 or greater. Your endpoint must not allow communication using unencrypted HTTP or accept connections on port 80.

  • One or more funding-decision algorithms on your system that decides whether to approve or deny the request and returns the appropriate response to the Marqeta platform.

  • An endpoint on your system for receiving informative event notifications; the Marqeta platform sends webhook notifications to your endpoint within seconds of each transaction that enable you to track requests, maintain balances, and resolve time-out issues.

Gateway JIT Funding certification

When you use Gateway JIT Funding, you directly participate in the card network’s authorization process. For this reason, it is essential for your gateway to respond both promptly and correctly in every supported transaction scenario.

Before enabling Gateway JIT Funding in your production environment, a Marqeta representative works with you in a sandbox environment to ensure your gateway endpoint responds appropriately in each scenario. The sandbox environment provides real-time simulations of the transaction scenarios encountered in a production environment and provides the feedback necessary for resolving issues of accuracy and responsiveness.

Contact your Marqeta representative for more information on Gateway JIT Funding certification.

Handling failures

There are multiple fallback measures for ensuring that cards continue to function in the event of a system failure during the transaction process. You can check the standin_by field of a transaction record to see if Stand-in Processing (STIP) was necessary and who handled the transaction instead. The presence of the standin_approved_by field indicates that the transaction was approved.

If the card network cannot connect to the Marqeta platform, it performs STIP. The card network makes authorization decisions as necessary and notifies the Marqeta platform later with information about transactions that occurred while STIP was enabled. The standin_by field of the transaction will have a value of NETWORK.

If your system cannot respond to a Gateway JIT Funding request, the Marqeta platform uses Commando Mode to make a decision in your place based on defined business rules. The Marqeta platform stores any unsent webhooks for later transmission, ensuring that card state and account balances on your system correspond with activity that occurred while Commando Mode was in effect. The standin_approved_by field of the transaction will have a value of COMMANDO_AUTO or COMMANDO_MANUAL, depending on what triggered Commando Mode to be enabled.

Have any feedback on this page?

If you feel we can do anything better, please let our team know.

We strive for the best possible developer experience.