DOCS

New!

/

10 minute read

August 3, 2019

Commando Mode

Commando Mode is a fallback measure that ensures Gateway JIT-funded cards continue to function in the event 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. 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.

You can identify transactions that were funded while Commando Mode was in effect by examining the subnetwork field of the transaction record. A subnetwork value of "GATEWAY_JIT" indicates that the transaction was funded through normal Gateway JIT Funding and that Commando Mode was not in effect at the time. A value of "MANAGED_JIT" indicates that the transaction was funded while Commando Mode was in effect. In addition, the standin_approved_by field has a value of "COMMANDO_AUTO" or "COMMANDO_MANUAL" when Commando Mode is enabled for a transaction.

Commando Mode and Managed JIT Funding are functionally equivalent. See About Just-in-Time Funding for more information.

Note
Using the Commando Mode feature requires additional configuration. The shared sandbox environment enables you to create and configure Commando Mode control sets. To implement these configurations in a production environment, contact your Marqeta representative.

You can enable Commando Mode as needed using the following methods:

  • The /commandomodes endpoint enables you to define the conditions which programmatically turn Commando Mode on or off for a given Commando Mode control set.

  • The /commandomodes/transitions endpoint enables you to turn Commando Mode on and off for a program gateway funding source.

Note
While Commando Mode is a form of Stand-in Processing (STIP), it should not be confused with network STIP, which occurs when the card network cannot communicate with the Marqeta platform. Transactions handled by network STIP include the standin_approved_by field with a value of "NETWORK".

Create Commando Mode control set

Action: POST
Endpoint: /commandomodes

Create a Commando Mode control set to define the conditions that programmatically enable Commando Mode and what happens when Commando Mode is enabled. When enabled, Commando Mode switches your program gateway funding source to a non-gateway program funding source and enables any authorization or velocity controls you specify.

Commando Mode control sets are associated with program gateway funding sources. Each program gateway funding source can have a single associated "commandomode" object.

Note
The conditions for automatically enabling Commando Mode defined in the real_time_standin_criteria object function whether the Commando Mode is enabled or disabled. For example, if real_time_standin_criteria.enabled and real_time_standin_criteria.include_connection_errors are both true, a connection error will enable Commando Mode whether current_state.commando_enabled is true or false.

Body field details

Fields Description

token

string, optional

The unique identifier of the Commando Mode control set.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.

Allowable Values:

36 char max

programgateway_funding_source_token

string, required

The unique identifier of the associated program gateway funding source.

Allowable Values:

Existing program gateway funding source token.

commando_mode_enables

object, required

Defines what happens when Commando Mode is enabled.

Allowable Values:

real_time_standin_criteria

object, optional

Specifies which event types automatically enable Commando Mode.

Allowable Values:

The commando_mode_enables object

Fields Description

program_funding_source

string, required

The unique identifier of the program funding source that substitutes for the program gateway funding source upon Commando Mode enablement.

Allowable Values:

36 char max

velocity_controls

array, optional

The velocity controls enabled upon Commando Mode enablement.

Allowable Values:

One or more existing velocity control tokens.

auth_controls

array, optional

The authorization controls enabled upon Commando Mode enablement.

Allowable Values:

One or more existing authorization control tokens.

ignore_card_suspended_state

boolean, optional

If true, transactions conducted while Commando Mode is enabled proceed even when the card is suspended; if false, transactions conducted while Commando Mode is enabled are declined if the card is suspended.

Allowable Values:

true, false

Default value: false

The real_time_standin_criteria object

Fields Description

enabled

boolean, optional

If true, Commando Mode is automatically enabled by events defined in the real_time_standin_criteria object; if false, Auto Commando Mode is not enabled.

Allowable Values:

true, false

Default value: false

include_connection_errors

boolean, optional

If true, a non-timeout connection error automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: true

include_response_timeouts

boolean, optional

If true, a gateway response slower than 3000ms automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: true

include_application_errors

boolean, optional

If true, an application error (any non-connection, non-timeout error) automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: false

The current_state object (response)

The Marqeta platform returns the current_state object of the Commando Mode control set in the response.

Name Description Allowable Values

commando_enabled

Indicates whether Commando Mode is enabled.

true, false

reason

Describes the reason the current state of the Commando Mode control set was changed.

channel

The mechanism that changed the Commando Mode control set’s state.

API, SYSTEM

user_name

Identifies the user who changed the Commando Mode control set’s state.

Sample request body

{
  "token": "commando_mode_1",
  "programgateway_funding_source_token": "pgm_gateway_src_1",
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls" : [
      "vel_control_1"
    ]
  }
}

Is this helpful?

Sample response body

{
  "token": "commado_mode_1",
  "programgateway_funding_source_token": "pgm_gateway_src_1",
  "current_state": {
    "commando_enabled": false,
    "reason": "New commandomode created",
    "channel": "SYSTEM"
  },
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls" : [
      "vel_control_1"
    ]
  },
  "created_time": "2017-02-14T18:48:10Z",
  "last_modified_time": "2017-02-14T18:48:10Z"
}

Is this helpful?

Retrieve Commando Mode control set

Retrieve a specific Commando Mode control set.

Action: GET
Endpoint: /commandomodes/{token}

URL path parameters

Fields Description

token

string, optional

The unique identifier of the Commando Mode control set.

Allowable Values:

Existing Commando Mode token.

The current_state object (response)

The Marqeta platform returns the current_state object of the Commando Mode control set in the response.

Name Description Allowable Values

commando_enabled

Indicates whether Commando Mode is enabled.

true, false

reason

Describes the reason the current state of the Commando Mode control set was changed.

channel

The mechanism that changed the Commando Mode control set’s state.

API, SYSTEM

user_name

Identifies the user who changed the Commando Mode control set’s state.

Sample response body

{
  "token": "commado_mode_1",
  "programgateway_funding_source_token": "pgm_gateway_src_1",
  "current_state": {
    "commando_enabled": false,
    "reason": "New commandomode created",
    "channel": "SYSTEM"
  },
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls" : [
      "vel_control_1"
    ]
  },
  "created_time": "2017-02-14T18:48:10Z",
  "last_modified_time": "2017-02-14T18:48:10Z"
}

Is this helpful?

Update Commando Mode control set

Action: PUT
Endpoint: /commandomodes/{token}

Update a specific Commando Mode control set.

Include the modified details in JSON format in the body of the request. Only values of parameters included in the request are modified; all others are left unchanged.

URL path parameters

Fields Description

token

string, required

The unique identifier of the Commando Mode control set.

Allowable Values:

Existing Commando Mode control set token.

Body field details

Fields Description

token

string, optional

The unique identifier of the Commando Mode control set.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.

Allowable Values:

36 char max

programgateway_funding_source_token

string, required

The unique identifier of the associated program gateway funding source.

Allowable Values:

Existing program gateway funding source token.

commando_mode_enables

object, required

Defines what happens when Commando Mode is enabled.

Allowable Values:

real_time_standin_criteria

object, optional

Specifies which event types automatically enable Commando Mode.

Allowable Values:

The commando_mode_enables object

NAME Type Required? Description Allowable Values

program_funding_source

string

Yes

The unique identifier of the program funding source that substitutes for the program gateway funding source upon Commando Mode enablement.

36 char max

velocity_controls

array

No

The velocity controls enabled upon Commando Mode enablement.

One or more existing velocity control tokens.

auth_controls

array

No

The authorization controls enabled upon Commando Mode enablement.

One or more existing authorization control tokens.

ignore_card_suspended_state

boolean

No

If true, transactions conducted while Commando Mode is enabled proceed even when the card is suspended; if false, transactions conducted while Commando Mode is enabled are declined if the card is suspended.

true, false

Default value: false

The real_time_standin_criteria object

Fields Description

enabled

boolean, optional

If true, Commando Mode is automatically enabled by events defined in the real_time_standin_criteria object; if false, Auto Commando Mode is not enabled.

Allowable Values:

true, false

Default value: false

include_connection_errors

boolean, optional

If true, a non-timeout connection error automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: true

include_response_timeouts

boolean, optional

If true, a gateway response slower than 3000ms automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: true

include_application_errors

boolean, optional

If true, an application error (any non-connection, non-timeout error) automatically enables Commando Mode when real_time_standin_criteria.enabled is also true.

Allowable Values:

true, false

Default value: false

The current_state object (response)

The Marqeta platform returns the current_state object of the Commando Mode control set in the response.

Name Description Allowable Values

commando_enabled

Indicates whether Commando Mode is enabled.

true, false

reason

Describes the reason the current state of the Commando Mode control set was changed.

channel

The mechanism that changed the Commando Mode control set’s state.

API, SYSTEM

user_name

Identifies the user who changed the Commando Mode control set’s state.

Sample request body

{
  "token": "commando_mode_1",
  "programgateway_funding_source_token": "pgm_gateway_src_1",
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls" : [
      "vel_control_2"
    ]
  }
}

Is this helpful?

Sample response body

{
  "token": "commado_mode_1",
  "programgateway_funding_source_token": "pgm_gateway_src_1",
  "current_state": {
    "commando_enabled": false,
    "reason": "New commandomode created",
    "channel": "SYSTEM"
  },
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls" : [
      "vel_control_2"
    ]
  },
  "created_time": "2017-02-14T18:48:10Z",
  "last_modified_time": "2017-02-14T18:48:10Z"
}

Is this helpful?

List Commando Mode control sets

Action: GET
Endpoint: /commandomodes

Retrieve a list of Commando Mode control sets.

This endpoint supports field filtering and pagination.

Sample response body

{
  "count" : 1,
  "start_index": 0,
  "end_index": 0,
  "is_more": false,
  "data": [
    {
      "token": "commado_mode_1",
      "programgateway_funding_source_token": "pgm_gateway_src_1",
      "current_state": {
        "commando_enabled": false,
        "reason": "New commandomode created",
        "channel": "SYSTEM"
    },
    "commando_mode_enables": {
      "program_funding_source": "pgm_funding_src_1",
      "velocity_controls" : [
        "vel_control_1"
      ]
    },
    "created_time": "2017-02-14T18:48:10Z",
    "last_modified_time": "2017-02-14T18:48:10Z"
    }
  ]
}

Is this helpful?

Create Commando Mode transition

Action: POST
Endpoint: /commandomodes/transitions

Create a Commando Mode transition.

A Commando Mode transition enables/disables a given Commando Mode control set. You must have an existing Commando Mode control set to enable/disable Commando Mode.

Body field details

Fields Description

token

string, optional

The unique identifier of the Commando Mode transition.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.

Allowable Values:

36 char max

commando_mode_token

string, required

The unique identifier of the Commando Mode control set to transition.

Allowable Values:

Existing Commando Mode token.

transition

object, required

Determines the state of the associated Commando Mode control set.

Allowable Values:

The transition object

Fields Description

commando_enabled

boolean, required

Indicates whether Commando Mode is enabled.

Allowable Values:

true, false

reason

string, optional

Describes the reason the current state of the Commando Mode control set was changed.

Allowable Values:

512 char max

Default value: null

channel

string, required

The mechanism that changed the Commando Mode control set’s state.

Allowable Values:

API, SYSTEM

user_name

string, optional

Identifies the user who changed the Commando Mode control set’s state.

Allowable Values:

256 char max

Default value: null

Sample request body

{
   "token": "commando_mode_1_transition",
   "commando_mode_token": "commando_mode_1",
   "transition": {
     "commando_enabled": "true",
     "reason": "Lost connection",
     "channel": "API",
     "user_name": "Bob"
  }
}

Is this helpful?

Sample response body

{
   "token": "commando_mode_1_transition",
   "commando_mode_token": "commando_mode_1",
   "transition": {
     "commando_enabled": "true",
     "reason": "Lost connection",
     "channel": "API",
     "user_name": "Bob"
  },
  "created_time": "2017-02-14T18:48:10Z"
}

Is this helpful?

Retrieve Commando Mode transition

Action: GET
Endpoint: /commandomodes/transitions/{token}

Retrieve a specific Commando Mode transition.

URL path parameters

Fields Description

token

string, required

The unique identifier of the Commando Mode transition.

Allowable Values:

Existing Commando Mode transition token.

Sample response body

{
   "token": "commando_mode_1_transition",
   "commando_mode_token": "commando_mode_1",
   "transition": {
     "commando_enabled": "true",
     "reason": "Lost connection",
     "channel": "API",
     "user_name": "Bob"
  },
  "created_time": "2017-02-14T18:48:10Z"
}

Is this helpful?

List Commando Mode transitions

Action: GET
Endpoint: /commandomodes/{commandomode_token}/transitions

Retrieve a list of Commando Mode transitions for a specific control set.

This endpoint supports field filtering and pagination.

URL path parameters

Fields Description

token

string, required

The unique identifier of the Commando Mode control set.

Allowable Values:

Existing Commando Mode token.

Sample response body

{
  "count" : 1,
  "start_index": 0,
  "end_index": 0,
  "is_more": false,
  "data": [
    {
      "token": "commando_mode_1_transition",
      "commando_mode_token": "commando_mode_1",
      "transition": {
        "commando_enabled": "true",
        "reason": "Lost connection",
        "channel": "API",
        "user_name": "Bob"
      },
      "created_time": "2017-02-14T18:48:10Z"
    }
  ]
}

Is this helpful?

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.