Skip to main content

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.
For more information, see Commando Mode.
JSON
{
  "transactions": [
    {
      "type": "authorization",
      "state": "DECLINED",
      "response": {
        "code": "0000",
        "memo": "Approved or completed successfully"
      },
      "network": "VISA",
      "subnetwork": "VISANET",
      "standin_approved_by": "COMMANDO_AUTO",
      "standin_by": "COMMANDO_AUTO"
    }
  ]
}

Webhook replay

In the event you fail to accept a webhook, Marqeta continues to resend the event until a 200 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 POST request 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.
For more information, see Webhooks.

Error handling responsibilities

If you have a card program in Europe, there are several responsibilities that you and Marqeta maintain. These responsibilities include:
ResponsibilityPowered ByManaged By
Ingest Marqeta events and respond accordingly, and accept Marqeta’s retry eventsYouYou
Store and reprocess failed webhook events for up to 12 days during customer platform downtimeMarqetaMarqeta
Configure and manage Commando Mode, if applicableYouMarqeta
Approve transactions on your behalf in the event that your endpoint is not functioning correctlyMarqetaMarqeta
Receive and store balance information sent via JIT Funding or the API for later useMarqetaMarqeta