Connector Architecture

The Mambu-Marqeta Integration is built based on the Marqeta Just-in-Time Funding concept, which can be described as a method of automatically funding an account in real time during the transaction process.

Through the Gateway JIT Funding approach, the Marqeta platform applies spend controls to make authorization decisions and forwards funding requests to the bank’s core system through the gateway - in order to make funding decisions. The connector receives funding requests and approves or denies them using the core system’s backend business rules.

The Marqeta platform exchanges the following types of messages with the connector:

  • JIT Funding requests: Actionable messages for authorization requests sent by Marqeta in order to hold the requested amount, to check payment card account or to get the account balance.
  • JIT Funding responses: Sent by the gateway to the Marqeta platform in response to an actionable message to approve or deny an authorization request.
  • JIT Funding notifications: Transaction event messages sent by the Marqeta platform to the connector’s JIT Informative Notifications endpoint (not the gateway endpoint). These asynchronous messages contain the entire transaction and information about its final outcome.
  • JIT Funding notification responses: Sent by the JIT Informative Notifications endpoint after a batch of transactions has been validated for the presence of all required parameters by the Mambu Process Orchestrator (MPO) process.

In order to make this communication possible, Marqeta requires the implementation of two endpoints.

Gateway endpoint

This endpoint is designed to receive and respond to the actionable requests as follows:

  • To approve a request, it will send a 200 HTTP response code and map the jit_funding object as response body.
  • To deny a request, it will send a 402 HTTP response code and map the jit_funding object as response body.

The Gateway endpoint is contained in the JIT Actionable Receiver process, found in the root of the Marqeta connector folder and handles the following event types.

Actionable

Webhook endpoint

To handle Informative JIT Funding messages, the connector includes an endpoint for receiving event notifications. Within seconds of each transaction, the Marqeta platform sends webhook notifications to this endpoint to enable tracking of requests, maintaining balances, and resolving timeout issues.

Marqeta connector validates the presence of mandatory parameters for clearing messages and responds to each JIT Informative request through a dedicated API Gateway with HTTP response code 200 if the validation of the batch of transactions has passed. Otherwise, it sends back HTTP response code 402, at which point Marqeta will resend the events.

The Webhook endpoint is contained in the JIT Informative Receiver process, found in the root of the Marqeta connector folder and handles the following event types

Informative

Additional processes

The connector also features a series of supporting processes including business sub-processes, a notifications module, setup and configuration, and API gateways for external applications.

The current version of the connector also provides an additional layer between Marqeta and MPO - two API Gateways, one for Actionable and one for Informative receivers, that handle HTTP response codes on behalf of the MPO system.

connectorArchitecture

MPO connector structure

Main receiver processes

JIT Actionable Receiver

Expects actionable requests, such as authorizations, financial transactions, balance inquiry to which it has to reply within 3 seconds, otherwise the request is marked as failed by Marqeta.

JIT Informative Notification Receiver

Expects informative requests (notifications) in batches of 20 items, such as clearing transactions, to which it has to respond within 5 seconds. This batches are processed asynchronously by the MPO processes.

Folder structure

Setup & config

Contains the Connector setup process (Mambu + notifications) and Configs State Diagram.

Notification module

Contains the entire set of processes and state diagrams used in the notifications logic.

APIs - Mambu

Contains the Mambu APIs used by the connector.

JIT Informative Notifications Receiver folder

Contains the Events Errors state diagram , Failed Incremental Authorizations state diagram and all the subprocesses that JIT Informative Receiver uses to handle Marqeta Informative notifications.

1. Clearing Authorisation DBIT
2. Clearing Authorization CRDT
3. Decrease + Reverse Authorizations
4. Delete Authorisation
5. Create Authorization stand-in
6. Reverse Card Transaction

JIT Actionable Receiver folder

Contains the “JIT Actionable Errors” and “JIT Actionable processing time” State Diagrams.