Spending Controls

Spending controls can be used to block business categories or set spending limits (e.g NGN1,000 per authorization or NGN30,000 per month). This can be applied to cards by setting the spendingControls object at creation or by updating it later.

If you're using spending controls with real-time authorizations, spending controls run first and decline a purchase before the authorization.request event is sent to you, resulting in a declined authorization request.

Spending Control Object

FieldTypeDescription
channelsObjectChannels selection where card can be used.
allowedCategoriesArrayList of categories of authorizations to allow. All other categories will be blocked.
blockedCategoriesArrayList of categories of authorizations to decline. All other categories will be allowed.
spendingLimitsArrayList of objects that specify amount-based rules.

Channels

To limit where the card can be used, set either true or false on the following variables.

FieldTypeDescription
atmBooleanAutomated teller machine (ATM) withdrawals and transactions
posBooleanPoint of sales (POS) purchases
webBooleanOnline purchases
mobileBooleanMobile purchases

Spending Limits

To limit the amount of money that can be spent, set spendingLimits within the spendingControls object to a list of objects with the following variables.

FieldTypeDescription
amountNumberMaximum amount allowed to spend per interval set.
intervalEnumTime interval to which the amount applies. This can either be per_authorization, daily, weekly, monthly, yearly, or all_time.
categoriesArrayList of categories of authorizations to limit. Leaving this field empty will apply the limit to all categories.

📘

Default Spending Limit

If spendingLimits are not set, a default spending limit is applied to all cards.

NGN Cards
Single Transaction Limit - NGN20,000 (ATM) | NGN500,000 (POS/WEB)
Daily Limit - NGN150,000 (ATM) | NGN500,000 (POS/WEB)

USD Cards
Single Transaction Limit - USD0.00 (ATM) | USD0.00 (POS/WEB)
Daily Limit - USD0.00 (ATM) | USD0.00 (POS/WEB)

Limit a card's monthly spend

curl --location --request PUT 'https://api.sandbox.sudo.africa/cards/5f45f4d018ccd82774de7d07' \
--header 'Authorization: Bearer ••••••••••••••••••••••••••••••••••••CREE1M0EwQjgyMjI0NUE3QUM=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "spendingControls": {
		"channels": {
			"atm": true,
			"pos": true,
			"web":  true,
      "mobile": true
		},
		"allowedCategories": [],
		"blockedCategories": [],
		"spendingLimits": [{
			"amount": 100000,
			"interval": "monthly"
		}]
	}
}'

Limit a card's daily spend for specific categories

```bash
curl --location --request PUT 'https://api.sandbox.sudo.africa/cards/5f45f4d018ccd82774de7d07' \
--header 'Authorization: Bearer ••••••••••••••••••••••••••••••••••••CREE1M0EwQjgyMjI0NUE3QUM=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "spendingControls": {
		"channels": {
			"atm": true,
			"pos": true,
			"web":  true,
      "mobile": true
		},
		"allowedCategories": [],
		"blockedCategories": [],
		"spendingLimits": [{
			"amount": 3000,
			"interval": "daily",
			"categories": ["6011"]
	****	}]
	}
}'
```