Types of error handling
Marqeta offers several functionalities to aid you in the event of system failure. These cover a range of products, such as Just-in-Time (JIT) Funding gateway and webhook processing failure. We provide the means to stand in on your behalf or the option to resend webhooks that you have not processed.Commando Mode
Commando Mode is a fallback measure that ensures Gateway JIT-funded cards continue to function in the event that your system fails. If your system cannot respond to the JIT Funding request, the Marqeta platform makes a decision in your place, based on defined business rules. Commando Mode details are outlined below.-
Manual Commando Mode – Manually activated by the API or the Marqeta Dashboard.
- Approves all transactions on your behalf for the specified time duration.
- Used for a period of known downtime.
-
Follows
standin_approved_by=COMMANDO_MANUAL.
-
Automated Commando Mode – Automatically enabled or disabled on a per-transaction basis.
-
Follows
real_time_standin_criteria.enabled=true.-
include_connection_errors– Unable to establish connection to your endpoint. -
include_response_timeouts– Gateway response slower than 3000ms. -
include_application_errors– An application error (any non-connection, non-timeout error). -
standin_approved_by=COMMANDO_AUTO.
-
-
Follows
JSON
Webhook replay
In the event you fail to accept a webhook, Marqeta continues to resend the event until a200 response is achieved. Marqeta retries for up to 12 days after the event time. After 12 days, Marqeta ceases to resend the event, and it is dropped from the queue. However, you can still replay the event through the API with key information from the event. Webhook replay details are outlined below.
-
A messaging failure is defined as any HTTP response code other than
200. -
In the case of a messaging failure, the Marqeta platform:
- Attempts to resend a notification message 10 times.
- Exponentially increases the interval between retries by powers of 4, following a retry interval of: 4 seconds, 16 seconds, 64 seconds, and so on, up to an interval just over 12 days.
-
In the event of a failure, you can replay events by sending a
POSTrequest to the/v3/webhooks/{token}/{event_type}/{event_token}endpoint.-
{token}– The token of your webhook configuration endpoint. -
{event_type}– The event type. -
{event_token}– The token of the event itself. This can be a transaction token or card transition token.
-
Idempotency
Your webhook endpoint might occasionally receive the same notification more than once. To support idempotency:- Each transaction is identified by a unique transaction token.
- Each webhook is identified by a unique event token.
Error handling responsibilities
If you have a card program in Europe, there are several responsibilities that you and Marqeta maintain. These responsibilities include:| Responsibility | Powered By | Managed By |
|---|---|---|
| Ingest Marqeta events and respond accordingly, and accept Marqeta’s retry events | You | You |
| Store and reprocess failed webhook events for up to 12 days during customer platform downtime | Marqeta | Marqeta |
| Configure and manage Commando Mode, if applicable | You | Marqeta |
| Approve transactions on your behalf in the event that your endpoint is not functioning correctly | Marqeta | Marqeta |
| Receive and store balance information sent via JIT Funding or the API for later use | Marqeta | Marqeta |