Skip to main content
POST
Create a card velocity limit

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Body

application/json
name
string
required

A descriptive label for this rule. Whitespace-only names are rejected.

Required string length: 1 - 255
Example:

"Weekly card spending cap"

metric
enum<string>
required

ATTEMPTS counts every real-time authorization request, including declined requests. APPROVED counts distinct approved authorizations, including zero-amount authorizations, and can also cap the amount they hold.

Available options:
ATTEMPTS,
APPROVED
window
enum<string>
required

AUTHORIZATION caps one authorization amount. ROLLING covers the trailing windowSeconds. Calendar windows use UTC: DAY starts at midnight, WEEK on Monday, MONTH on the first, QUARTER in January/April/July/October, and YEAR on January 1.

Available options:
AUTHORIZATION,
ROLLING,
DAY,
WEEK,
MONTH,
QUARTER,
YEAR
cardId
string | null

Card to restrict. Omit or send null to apply the rule separately to every eligible card on your platform, including cards issued later. A platform rule does not pool usage across cards.

Example:

"Card:019542f5-b3e7-1d02-0000-000000000003"

windowSeconds
integer | null

Required for ROLLING and absent or null for other windows. The maximum rolling window is 31 days.

Required range: 1 <= x <= 2678400
Example:

600

maxCount
integer | null

Maximum count within the window. Required for ATTEMPTS. Cannot be set for AUTHORIZATION. Omit or send null to leave the count uncapped.

Required range: 0 <= x <= 100000
Example:

5

maxAmount
integer<int64> | null

Maximum amount in the smallest unit of the card's currency. Supported for APPROVED only. Platform rules apply this amount separately to each eligible card in that card's currency, without foreign-exchange conversion. USD- and USDB-funded USD cards both use USD cents. The amount is holds less releases for transactions opened within the window. Releases restore capacity; clearing against a hold does not. Omit or send null to leave the amount uncapped. At least one of maxCount or maxAmount must be set. A zero cap blocks applicable new authorizations, including zero-amount checks.

Required range: 0 <= x <= 9007199254740991
Example:

50000

Response

The created rule.

A platform-managed card velocity rule.

name
string
required

A descriptive label for this rule. Whitespace-only names are rejected.

Required string length: 1 - 255
Example:

"Weekly card spending cap"

metric
enum<string>
required

ATTEMPTS counts every real-time authorization request, including declined requests. APPROVED counts distinct approved authorizations, including zero-amount authorizations, and can also cap the amount they hold.

Available options:
ATTEMPTS,
APPROVED
window
enum<string>
required

AUTHORIZATION caps one authorization amount. ROLLING covers the trailing windowSeconds. Calendar windows use UTC: DAY starts at midnight, WEEK on Monday, MONTH on the first, QUARTER in January/April/July/October, and YEAR on January 1.

Available options:
AUTHORIZATION,
ROLLING,
DAY,
WEEK,
MONTH,
QUARTER,
YEAR
id
string
required

System-generated identifier for the rule.

Example:

"CardVelocityRule:019542f5-b3e7-1d02-0000-000000000004"

cardId
string | null

Card to restrict. Omit or send null to apply the rule separately to every eligible card on your platform, including cards issued later. A platform rule does not pool usage across cards.

Example:

"Card:019542f5-b3e7-1d02-0000-000000000003"

windowSeconds
integer | null

Required for ROLLING and absent or null for other windows. The maximum rolling window is 31 days.

Required range: 1 <= x <= 2678400
Example:

600

maxCount
integer | null

Maximum count within the window. Required for ATTEMPTS. Cannot be set for AUTHORIZATION. Omit or send null to leave the count uncapped.

Required range: 0 <= x <= 100000
Example:

5

maxAmount
integer<int64> | null

Maximum amount in the smallest unit of the card's currency. Supported for APPROVED only. Platform rules apply this amount separately to each eligible card in that card's currency, without foreign-exchange conversion. USD- and USDB-funded USD cards both use USD cents. The amount is holds less releases for transactions opened within the window. Releases restore capacity; clearing against a hold does not. Omit or send null to leave the amount uncapped. At least one of maxCount or maxAmount must be set. A zero cap blocks applicable new authorizations, including zero-amount checks.

Required range: 0 <= x <= 9007199254740991
Example:

50000