Skip to main content
This page shows you how to create and update Commando Mode control sets using the POST /commandomodes, PUT /commandomodes/{token}, and POST /commandomodes/transitions operations. For other reference documentation on working with Commando Mode control sets, see Commando Mode.
Note
You must be a Powered By Marqeta (PxM) customer with the Program Manager role enabled to send calls to the POST /commandomodes, PUT /commandomodes/{token}, and POST /commandomodes/transitions operations. Managed by Marqeta (MxM) customers who do not have the Program Manager role enabled cannot access these endpoints.
For more information about MxM and PxM programs, see Understanding Card Program Differences.

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

FieldsDescription
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
program_gateway_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:

Existing commando_mode_enables object.
real_time_standin_criteria

object

Optional
Specifies which event types automatically enable Commando Mode.

Allowable Values:

Existing real_time_standin_criteria object.

The commando_mode_enables object

FieldsDescription
program_funding_source

string

Required
The unique identifier of the program funding source that substitutes for the program gateway funding source while in Commando Mode.

Allowable Values:

36 char max
velocity_controls

array

Optional
The velocity controls enabled while in Commando Mode.

Allowable Values:

One or more existing velocity control tokens.
auth_controls

array

Optional
The authorization controls enabled while in Commando Mode.

Allowable Values:

One or more existing authorization control tokens.
ignore_card_suspended_state

boolean

Optional
If true, transactions conducted while in Commando Mode 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

FieldsDescription
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.
NameDescriptionAllowable Values
commando_enabledIndicates whether Commando Mode is enabled.true, false
reasonDescribes the reason the current state of the Commando Mode control set was changed.
channelThe mechanism that changed the Commando Mode control set’s state.API, SYSTEM, ADMIN
user_nameIdentifies the user who changed the Commando Mode control set’s state.

Sample request body

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

Sample response body

JSON
{
  "token": "commando_mode_1",
  "program_gateway_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": "2021-02-14T18:48:10Z",
  "last_modified_time": "2021-02-14T18:48:10Z"
}

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

FieldsDescription
token

string

Required
The unique identifier of the Commando Mode control set.

Allowable Values:

Existing Commando Mode control set token.

Body field details

FieldsDescription
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
program_gateway_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:

Existing commando_mode_enables object.
real_time_standin_criteria

object

Optional
Specifies which event types automatically enable Commando Mode.

Allowable Values:

Existing real_time_standin_criteria object.

The commando_mode_enables object

FieldsDescription
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 while in Commando Mode.

Allowable Values:

One or more existing velocity control tokens.
auth_controls

array

Optional
The authorization controls enabled while in Commando Mode.

Allowable Values:

One or more existing authorization control tokens.
ignore_card_suspended_state

boolean

Optional
If true, transactions conducted while in Commando Mode 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

FieldsDescription
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.
NameDescriptionAllowable Values
commando_enabledIndicates whether Commando Mode is enabled.true, false
reasonDescribes the reason the current state of the Commando Mode control set was changed.
channelThe mechanism that changed the Commando Mode control set’s state.API, SYSTEM, ADMIN
user_nameIdentifies the user who changed the Commando Mode control set’s state.

Sample request body

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

Sample response body

JSON
{
  "token": "commando_mode_1",
  "program_gateway_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": "2021-02-14T18:48:10Z",
  "last_modified_time": "2021-02-14T18:48:10Z"
}

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

FieldsDescription
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:

Existing transition object.

The transition object

FieldsDescription
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, ADMIN
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

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

Sample response body

JSON
{
  "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": "2021-02-14T18:48:10Z"
}