Velocity Controls

Velocity Control

A velocity control limits how much users can spend. You can configure velocity controls to limit how much users can spend and the number of transactions they can make in a given span of time. You can apply velocity controls to a single user, to all users associated with a particular card product, or to all users in your program. Only Program Managers can create or modify program-wide velocity controls. A POST or PUT call from a role that does not have Program Manager permissions will receive a 403 error if its association field is null, or if it includes all of the fields in the request body. Avoid this by passing a valid user_token or card_product_token in the velocity control’s association object, indicating that the request is specific to a user or card product, and not program-wide. You should also only include the specific fields you want to update, because a PUT or POST with values for all fields is interpreted as a change that requires Program Manager permissions. See Controlling Spending for a tutorial that walks you through the creation of a spend control.

Note Each program supports a maximum of 90 spend controls (velocity controls and authorization controls combined). The limit of 90 spend controls applies at the program level only; it does not affect the number of user-level spend controls you can use.

Create Velocity Control

Action: POST Endpoint: /velocitycontrols Limits how much and how frequently a user can spend funds. If multiple velocity controls apply to the same user, the user cannot exceed any of the defined spending limits.

Tip You can create program-level controls in the sandbox environment. However, you must work with your Marqeta representative to create program-level controls in a production environment.

Request Body

Velocity control object

Fields Description
active
boolean
Optional
Indicates whether the velocity control is active.
Allowable Values:
true, false
Default value:
true
amount_limit
decimal
Required
Maximum monetary sum that can be cleared within the time period defined by the velocity_window field. Refunds and reversals cannot exceed this limit.
Allowable Values:
0 min
Format:
0.00
approvals_only
boolean
Optional
If set to true, only approved transactions are subject to control. If set to false, only declined transactions are subject to control.
Allowable Values:
true, false
Default value:
true
association
object
Optional
Defines the group of users to which the velocity control applies.
Allowable Values:
card_product_token, user_token
association. card_product_token
string
Optional
Unique identifier of the card product.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
association. user_token
string
Optional
Unique identifier of the cardholder.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
currency_code
string
Required
Three-character ISO 4217 currency code.
Allowable Values:
Valid three-character ISO 4217 currency code
include_cashback
boolean
Optional
If set to true, the cashback components of point-of-sale transactions are subject to control.
Allowable Values:
true, false
Default value:
true
include_credits
boolean
Optional
If set to true, original credit transactions (OCT) are subject to control. Your request can contain either a money_in_transaction object or the include_credits field, not both.
Allowable Values:
true, false
Default value:
false
include_purchases
boolean
Optional
If set to true, the following transactions are subject to control:

Sample Request Body

JSON

{
  "usage_limit": 10,
  "amount_limit": 500.25,
  "velocity_window": "DAY",
  "association": {
    "user_token": "my_user_04"
  },
  "currency_code": "USD",
  "token": "my_velocitycontrol_01"
}

Response Body

Fields Description
active
boolean
Conditionally returned
Indicates whether the velocity control is active.
Allowable Values:
true, false
amount_limit
decimal
Returned
Maximum monetary sum that can be cleared within the time period defined by the velocity_window field. Refunds and reversals cannot exceed this limit.
Allowable Values:
0 min
Format:
0.00
approvals_only
boolean
Conditionally returned
If set to true, only approved transactions are subject to control. If set to false, only declined transactions are subject to control.
Allowable Values:
true, false
association
object
Conditionally returned
Defines the group of users to which the velocity control applies.
Allowable Values:
card_product_token, user_token
association. card_product_token
string
Conditionally returned
Unique identifier of the card product.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
association. user_token
string
Conditionally returned
Unique identifier of the cardholder.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
currency_code
string
Returned
Three-character ISO 4217 currency code.
Allowable Values:
Valid three-character ISO 4217 currency code
include_cashback
boolean
Conditionally returned
If set to true, the cashback components of point-of-sale transactions are subject to control.
Allowable Values:
true, false
include_credits
boolean
Conditionally returned
If set to true, original credit transactions (OCT) are subject to control.
Allowable Values:
true, false
include_purchases
boolean
Conditionally returned
If set to true, the following transactions are subject to control:

Sample Response Body

JSON

{
  "token": "my_velocitycontrol_01",
  "association": {
    "user_token": "my_user_04"
  },
  "merchant_scope": {},
  "usage_limit": 10,
  "approvals_only": true,
  "include_purchases": true,
  "include_withdrawals": true,
  "include_transfers": true,
  "include_cashback": true,
  "include_credits": false,
  "currency_code": "USD",
  "amount_limit": 500.25,
  "velocity_window": "DAY",
  "active": true
}

List Velocity Controls

Action: GET Endpoint: /velocitycontrols Retrieves a list of all the velocity controls associated with a specific user or card product, or lists all the velocity controls defined for your program. Include either a user or a card_product query parameter to indicate the user or card product whose associated velocity controls you want to retrieve (do not include both). To list all velocity controls for your program, omit the user and card_product query parameters from your request. This endpoint supports field filtering and pagination.

URL Query Parameters

Fields Description
card_product
string
Optional
Unique identifier of the card product. Enter the string null to retrieve velocity controls that are not associated with any card product.
Allowable Values:
Existing card product token
user
string
Optional
Unique identifier of the user. Enter the string null to retrieve velocity controls that are not associated with any user.
Allowable Values:
Existing user token
active
string
Optional
Filters the returned velocity controls by active state.
Allowable Values:
true, false, all
Default value:
true
count
integer
Optional
Number of velocity control resources to retrieve.
Allowable Values:
1-10
Default value:
5
start_index
integer
Optional
Sort order index of the first resource in the returned array.
Allowable Values:
Any integer
Default value:
0
fields
string
Optional
Comma-delimited list of fields to return (field_1,field_2, and so on). Leave blank to return all fields.
Allowable Values:
Comma-delimited list of fields, or blank
sort_by
string
Optional
Field on which to sort. Use any field in the resource model, or one of the system fields lastModifiedTime or createdTime. Prefix the field name with a hyphen (-) to sort in descending order. Omit the hyphen to sort in ascending order.
Allowable Values:
createdTime, lastModifiedTime, or any field in the resource model

Response Body

Fields Description
count
integer
Conditionally returned
Number of resources retrieved.
This field is returned if there are resources in your returned array.
Allowable Values:
1-10
data
array of objects
Conditionally returned
Array of velocity control objects.
Objects are returned as appropriate to your query.
Allowable Values:
Valid array of one or more velocity control objects
data[]. active
boolean
Conditionally returned
Indicates whether the velocity control is active.
Allowable Values:
true, false
data[]. amount_limit
decimal
Returned
Maximum monetary sum that can be cleared within the time period defined by the velocity_window field. Refunds and reversals cannot exceed this limit.
Allowable Values:
0 min
Format:
0.00
data[]. approvals_only
boolean
Conditionally returned
If set to true, only approved transactions are subject to control. If set to false, only declined transactions are subject to control.
Allowable Values:
true, false
data[]. association
object
Conditionally returned
Defines the group of users to which the velocity control applies.
Allowable Values:
card_product_token, user_token
data[].association. card_product_token
string
Conditionally returned
Unique identifier of the card product.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
data[].association. user_token
string
Conditionally returned
Unique identifier of the cardholder.
Pass either card_product_token or user_token, not both.
Allowable Values:
1–36 chars
data[]. currency_code
string
Returned
Three-character ISO 4217 currency code.
Allowable Values:
Valid three-character ISO 4217 currency code
data[]. include_cashback
boolean
Conditionally returned
If set to true, the cashback components of point-of-sale transactions are subject to control.
Allowable Values:
true, false
data[]. include_credits
boolean
Conditionally returned
If set to true, original credit transactions (OCT) are subject to control.
Allowable Values:
true, false
data[]. include_purchases
boolean
Conditionally returned
If set to true, the following transactions are subject to control:

Sample Response Body

JSON

{
  "count": 1,
  "start_index": 0,
  "end_index": 0,
  "is_more": false,
  "data": [
    {
      "token": "my_velocitycontrol_01",
      "association": {
        "user_token": "my_user_04"
      },
      "merchant_scope": {},
      "usage_limit": 10,
      "approvals_only": true,
      "include_purchases": true,
      "include_withdrawals": true,
      "include_transfers": true,
      "include_cashback": true,
      "include_credits": false,
      "currency_code": "USD",
      "amount_limit": 500.25,
      "velocity_window": "DAY",
      "active": true
    }
  ]
}

Get Specific Velocity Control

Action: GET Endpoint: /velocitycontrols/{token} Retrieves a specific velocity control.