Manage spending limits

A spending limit defines the maximum amount that can be spent on a card during a given time period. For example, £10 a day. A card can have both a spending limit and a transaction limit. Learn more about transaction limits.

info

The endpoints described in this guide are currently in beta mode.

Retrieve a spending limit

Get/v2/cards/{cardId}/spending-limits

Request

Use this request to retrieve the spending limit for a given card, based on its id.

Sample requestRequest format
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd/spending-limits?accountId=F12345&budgetId=775596ae-2624-40af-a9dc-9756110a4a03' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/cards/{cardId}/spending-limits?accountId={accountId}&budgetId={budgetId}' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'

Path parameters

Parameter Description
cardId
string (uuid)
required
The ID of the card that you want to retrieve a spending limit for.

Allowable values:
An existing cardId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
required
The ID of the account that the card is associated with.

Allowable values:
An existing accountId
budgetId
string (uuid)
required
The ID of the budget that the card is associated with.

Allowable values:
An existing budgetId (<= 36 characters)
limit
integer
The maximum number of results to return. For example, limit=25. By default, this is set to 100.

Allowable values:
[ 1 .. 1000 ]
offset
integer
The number of items to skip before returning results. For example, offset=200. By default, this is set to 0.

Allowable values:
A valid integer
search
string
The term(s) to search for. You can use this to filter the results.

Allowable values:
A valid string
personId
string (uuid)
The ID of the person that the card belongs to.

Allowable values:
A existing personId (<= 36 characters)

Response

If your request is successful, you'll receive a 200 response.

Sample responseResponse structure
Copy
Copied
{
  "id": "775596ae-2624-40af-a9dc-9756110a4a03",
  "amount": 100.5,
  "active": false,
  "limitTurnedOff": true,
  "limitWindow": "DAY",
  "currencyCode": "GBP",
  "available": {
    "uses": 0,
    "amount": 100.5,
    "daysRemaining": 1
  }
}
Copy
Copied
{
  "id": "string",
  "amount": number,
  "active": boolean,
  "limitTurnedOff": boolean,
  "limitWindow": "string",
  "currencyCode": "string",
  "available": {
    "uses": number,
    "amount": number,
    "daysRemaining": number
  }
}

For more detailed information about this request and its response, see the API reference.

Create a spending limit

Post/v2/cards/{cardId}/spending-limits

Request

Use this request to create a new spending limit for a given card.

Sample requestRequest structure
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd/spending-limits?accountId=F12345&budgetId=775596ae-2624-40af-a9dc-9756110a4a03' \
  -H 'Authorization: ApiKey 9cd30b49-812e-46ac-a222-7ce73e9c9dbc' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "775596ae-2624-40af-a9dc-9756110a4a03",
    "amount": 100.5,
    "active": false,
    "limitTurnedOff": true,
    "limitWindow": "DAY"
  }'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/v2/cards/{cardId}/spending-limits?accountId={accountId}&budgetId={budgetId}' \
  -H 'Authorization: ApiKey 9cd30b49-812e-46ac-a222-7ce73e9c9dbc' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "string",
    "amount": number,
    "active": boolean,
    "limitTurnedOff": boolean,
    "limitWindow": "string"
  }'

Path parameters

Parameter Description
cardId
string (uuid)
required
The ID of the card that you want to create a new spending limit for.

Allowable values:
An existing cardId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
required
The ID of the account that the card is associated with.

Allowable values: An existing accountId
budgetId
string (uuid)
required
The ID of the budget that the card is associated with.

Allowable values:
An existing budgetId (<= 36 characters)
personId
string (uuid)
The ID of the person that the card belongs to.

Allowable values:
An existing personId (<= 36 characters)

Request body schema

Parameter Description
id
string
The ID of the spending limit that you want to create.

Allowable values:
<= 36 characters
amount
number
required
The amount that you want to set as the spending limit.

Allowable values:
A valid number
active
boolean
Whether or not you want the spending limit to be active on Marqeta.

Allowable values:
true, false
limitTurnedOff
boolean
Whether or not you want the spending limit to be turned off.

Allowable values:
true, false
limitWindow
string
required
The time period for which the spending limits should apply.

Allowable values:
DAY, WEEK, MONTH, LIFETIME

Response

If your request is successful, you'll receive a 200 response. The available object will contain details about the remaining uses, amount, and number of days remaining until the limit resets.

Sample responseResponse structure
Copy
Copied
{
  "id": "775596ae-2624-40af-a9dc-9756110a4a03",
  "amount": 100.5,
  "active": false,
  "limitTurnedOff": true,
  "limitWindow": "DAY",
  "currencyCode": "GBP",
  "available": {
    "uses": 0,
    "amount": 100.5,
    "daysRemaining": 1
  }
}
Copy
Copied
{
  "id": "string",
  "amount": number,
  "active": boolean,
  "limitTurnedOff": boolean,
  "limitWindow": "string",
  "currencyCode": "string",
  "available": {
    "uses": number,
    "amount": number,
    "daysRemaining": number
  }
}

For more detailed information about this request and its response, see the API reference.

Update a spending limit

Put/v2/cards/{cardId}/spending-limits/{limitId}

Request

Use this request to update an existing spending limit for a card.

Sample requestRequest structure
Copy
Copied
curl -i -X PUT \
  'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd/spending-limits/0684fc07-4abc-46de-b664-da45ef3c4072?accountId=F12345&budgetId=775596ae-2624-40af-a9dc-9756110a4a03' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "775596ae-2624-40af-a9dc-9756110a4a03",
    "amount": 100.5,
    "active": false,
    "limitTurnedOff": true,
    "limitWindow": "DAY"
  }'
Copy
Copied
curl -i -X PUT \
  'https://api.equalsmoney.com/v2/cards/{cardId}/spending-limits/{limitId}?accountId={accountId}&budgetId={budgetId}' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "string",
    "amount": number,
    "active": boolean,
    "limitTurnedOff": boolean,
    "limitWindow": "string"
  }'

Path parameters

Parameter Description
cardId
string (uuid)
required
The ID of the card associated with the spending limit.

Allowable values:
An existing cardId (<= 36 characters)
limitId
string
required
The ID of the limit that you want to update.

Allowable values:
An existing limitId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
required
The ID of the account that the card is associated with.

Allowable values:
An existing accountId
budgetId
string (uuid)
required
The ID of the budget that the card is associated with.

Allowable values:
An existing budgetId (<= 36 characters)
personId
string (uuid)
The ID of the person that the card belongs to.

Allowable values:
An existing personId (<= 36 characters)

Request body schema

Parameter Description
id
string (uuid)
The new ID of the spending limit.

Allowable values:
A valid string
amount
number
required if no other body parameter provided
The amount that you want to set as the spending limit.

Allowable values:
A valid number
active
boolean
required if no other body parameter provided
Whether or not the spending limit is active on Marqeta.

Allowable values:
true, false
limitTurnedOff
boolean
required if no other body parameter provided
Whether or not the spending limit is turned off.

Allowable values:
true, false
limitWindow
string
required if no other body parameter provided>
The time period for which the spending limit should apply.

Allowable values:
DAY, WEEK, MONTH, LIFETIME

Response

If your request is successful, you'll receive a 200 response.

Sample responseResponse structure
Copy
Copied
{
  "id": "775596ae-2624-40af-a9dc-9756110a4a03",
  "amount": 100.5,
  "active": false,
  "limitTurnedOff": true,
  "limitWindow": "DAY",
  "currencyCode": "GBP",
  "available": {
    "uses": 0,
    "amount": 100.5,
    "daysRemaining": 1
  }
}
Copy
Copied
{
  "id": "string",
  "amount": number,
  "active": boolean,
  "limitTurnedOff": boolean,
  "limitWindow": "string",
  "currencyCode": "string",
  "available": {
    "uses": number,
    "amount": number,
    "daysRemaining": number
  }
}

For more detailed information about this request and its response, see the API reference.