SpendLimit
A profile's spending limits.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/spend/profiles/{profileId}/spend-limits |
list |
Profile spend limits |
DELETE |
/spend/profiles/{profileId}/cards/{cardToken}/spend-limits/{granularity} |
remove |
Updated card spend limits. See Retrieve card limits |
PATCH |
/spend/profiles/{profileId}/spend-limits |
update |
Updated profile spend limits. See Retrieve profile limits |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
spend_limits, err := client.SpendLimit(nil).List(map[string]any{"profile_id": 1}, nil)
if err != nil {
panic(err)
}
fmt.Println(spend_limits)
updated, err := client.SpendLimit(nil).Update(map[string]any{"id": "example_id", "profile_id": 1, "aggregateWindow": map[string]any{}}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
removed, err := client.SpendLimit(nil).Remove(map[string]any{"card_id": "example", "id": "example_id", "profile_id": 1}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local spend_limits, err = client:SpendLimit():list({ profile_id = 1 })
local updated, err = client:SpendLimit():update({ id = "example_id", profile_id = 1, aggregateWindow = {} })
local removed, err = client:SpendLimit():remove({ card_id = "example", id = "example_id", profile_id = 1 })
PHP
Construct client as shown in the PHP setup, then call the operations:
$spend_limits = $client->SpendLimit()->list(["profile_id" => 1]);
$updated = $client->SpendLimit()->update(["id" => "example_id", "profile_id" => 1, "aggregateWindow" => []]);
$client->SpendLimit()->remove(["card_id" => "example", "id" => "example_id", "profile_id" => 1]);
Python
Construct client as shown in the Python setup, then call the operations:
spend_limits = client.SpendLimit().list({"profile_id": 1})
updated = client.SpendLimit().update({"id": "example_id", "profile_id": 1, "aggregateWindow": {}})
client.SpendLimit().remove({"card_id": "example", "id": "example_id", "profile_id": 1})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
spend_limits = client.SpendLimit.list({ "profile_id" => 1 })
updated = client.SpendLimit.update({ "id" => "example_id", "profile_id" => 1, "aggregateWindow" => {} })
client.SpendLimit.remove({ "card_id" => "example", "id" => "example_id", "profile_id" => 1 })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const spend_limits = await client.SpendLimit().list({ profile_id: 1 })
const updated = await client.SpendLimit().update({ id: "example_id", profile_id: 1, aggregateWindow: {} })
await client.SpendLimit().remove({ card_id: "example", id: "example_id", profile_id: 1 })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
aggregateWindow |
object |
No | Aggregate Window |
id |
string |
No | Id |
type |
string |
No | The type of transaction. |
list
GET /spend/profiles/{profileId}/spend-limits
Operation ID: spendLimitsProfileGet.
Authentication: bearer token (UserToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
profileId |
path |
integer (int64) |
Yes | The profile ID. |
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Responses
200: Profile spend limits
application/json
| Property | Type | Required | Description |
|---|---|---|---|
spendLimits |
array of object |
No | |
spendLimits[].aggregateWindow |
object |
No | |
spendLimits[].aggregateWindow.daily |
object |
No | |
spendLimits[].aggregateWindow.daily.max |
object |
No | The max allowed limit for daily. |
spendLimits[].aggregateWindow.daily.max.amount |
number |
No | |
spendLimits[].aggregateWindow.daily.max.currency |
string |
No | |
spendLimits[].aggregateWindow.daily.resetAt |
string (date-time) |
No | The time when the limit gets reset. ISO-8601 timestamp with timezone. |
spendLimits[].aggregateWindow.daily.usage |
object |
No | The total authorised amount to date. |
spendLimits[].aggregateWindow.daily.usage.amount |
number |
No | |
spendLimits[].aggregateWindow.daily.usage.currency |
string |
No | |
spendLimits[].aggregateWindow.daily.value |
object |
No | Daily limit. The value should be between 0 and the max allowed. |
spendLimits[].aggregateWindow.daily.value.amount |
number |
No | |
spendLimits[].aggregateWindow.daily.value.currency |
string |
No | |
spendLimits[].aggregateWindow.monthly |
object |
No | |
spendLimits[].aggregateWindow.monthly.max |
object |
No | The max allowed limit for monthly. |
spendLimits[].aggregateWindow.monthly.max.amount |
number |
No | |
spendLimits[].aggregateWindow.monthly.max.currency |
string |
No | |
spendLimits[].aggregateWindow.monthly.resetAt |
string (date-time) |
No | The time when the limit gets reset. ISO-8601 timestamp with timezone. |
spendLimits[].aggregateWindow.monthly.usage |
object |
No | The total authorised amount to date. |
spendLimits[].aggregateWindow.monthly.usage.amount |
number |
No | |
spendLimits[].aggregateWindow.monthly.usage.currency |
string |
No | |
spendLimits[].aggregateWindow.monthly.value |
object |
No | Monthly limit. The value should be between 0 and the max allowed. |
spendLimits[].aggregateWindow.monthly.value.amount |
number |
No | |
spendLimits[].aggregateWindow.monthly.value.currency |
string |
No | |
spendLimits[].type |
enum: PURCHASE, ATM_WITHDRAWAL |
No | The type of transaction. PURCHASE is a combined limit that applies to contactless, magnetic, online purchase, chip and PIN/mobile wallet transactions. |
Example response:
{
"spendLimits": [
{
"aggregateWindow": {
"daily": {
"max": {
"amount": 30000,
"currency": "GBP"
},
"resetAt": "2023-07-31T22:59:59.999999999Z",
"usage": {
"amount": 0,
"currency": "GBP"
},
"value": {
"amount": 20000,
"currency": "GBP"
}
},
"monthly": {
"max": {
"amount": 30000,
"currency": "GBP"
},
"resetAt": "2023-07-31T22:59:59.999999999Z",
"usage": {
"amount": 0,
"currency": "GBP"
},
"value": {
"amount": 20000,
"currency": "GBP"
}
}
},
"type": "PURCHASE"
},
{
"aggregateWindow": {
"daily": {
"max": {
"amount": 4000,
"currency": "GBP"
},
"resetAt": "2023-07-31T22:59:59.999999999Z",
"usage": {
"amount": 0,
"currency": "GBP"
},
"value": {
"amount": 1000,
"currency": "GBP"
}
},
"monthly": {
"max": {
"amount": 4000,
"currency": "GBP"
},
"resetAt": "2023-07-31T22:59:59.999999999Z",
"usage": {
"amount": 0,
"currency": "GBP"
},
"value": {
"amount": 1000,
"currency": "GBP"
}
}
},
"type": "ATM_WITHDRAWAL"
}
]
}
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.
remove
DELETE /spend/profiles/{profileId}/cards/{cardToken}/spend-limits/{granularity}
Operation ID: spendLimitsCardDelete.
Authentication: bearer token (UserToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
profileId |
path |
integer (int64) |
Yes | The profile ID. |
cardToken |
path |
string |
Yes | The card token. |
granularity |
path |
enum: transaction, daily, monthly, lifetime |
Yes | The limit granularity to delete. |
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Responses
200: Updated card spend limits. See Retrieve card limits
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.
update
PATCH /spend/profiles/{profileId}/spend-limits
Operation ID: spendLimitsProfileUpdate.
Authentication: bearer token (UserToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
profileId |
path |
integer (int64) |
Yes | The profile ID. |
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
aggregateWindow |
object |
No | |
aggregateWindow.daily |
object |
No | |
aggregateWindow.daily.value |
object |
No | The amount allowed to be spent daily. |
aggregateWindow.daily.value.amount |
number |
No | |
aggregateWindow.daily.value.currency |
string |
No | |
aggregateWindow.monthly |
object |
No | |
aggregateWindow.monthly.value |
object |
No | The amount allowed to be spent monthly. |
aggregateWindow.monthly.value.amount |
number |
No | |
aggregateWindow.monthly.value.currency |
string |
No | |
type |
enum: PURCHASE, ATM_WITHDRAWAL |
No | The type of transaction. |
Example request body:
{
"aggregateWindow": {
"daily": {
"value": {
"amount": 20000,
"currency": "GBP"
}
},
"monthly": {
"value": {
"amount": 20000,
"currency": "GBP"
}
}
},
"type": "PURCHASE"
}
Responses
200: Updated profile spend limits. See Retrieve profile limits
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.