restriction, limits when and where a card can be used.
spendCap: the budget
The total amount a topUp card can ever spend. Setting it via
Update spend control replaces
the total, not an increment: to add USD 1,000 to a USD 1,500 cap, send
2500.00. A cap below what’s already been spent fails with
400 SPEND_CAP_TOO_LOW.
spendControl.limits: the throttles
Optional per-transaction and per-period limits, evaluated on top of the
budget:
Each limit is an
{ "amount": "100.00", "currency": "USD" } pair. The API
reports what each period has already used under spendControl.spent, so you
can compare spent.monthly against limits.monthly.
Replace semantics
PUT /cards/{cardId}/spend-control replaces the whole object: send every
limit you want to keep; a limit you omit is removed.
PUT /cards/{cardId}/restriction works the same way. See
restriction.category below.
restriction.time
Separately, restriction.time limits the hours of day a card can be
used, in UTC. For example { "start": "09:00", "end": "18:00" }. Managed
with Update restriction.
Card category and transaction category
Two different settings are called “category”. Only one of them limits where a card can be used.restriction.category
restriction.category is an allowlist. The card can only be used at merchants
whose transaction category is in values. Set it with
Update restriction:
restriction.category: { allow, values }, or
null when the card has none.
allowis required. Onlytrueis accepted for now.valuesholdscodevalues from List transaction categories. Don’t send theid.- Allowing a category allows every charge Reap maps to it.
otherandon_off_ramp_feesare in the list, but you can’t use them inrestriction.category. They return422 CATEGORY_NOT_FOUND, as does any unknown code.details.codesin the error lists the codes that were not accepted.allow: false,category: null, and an empty or duplicatevalueslist return400. To remove the category restriction, leavecategoryout.- The body accepts only
timeandcategory. Any other field, such as a misspelledcategroy, returns400and changes nothing. - Your business needs category restrictions enabled. If it doesn’t, setting
categoryreturns400 CATEGORY_RESTRICTIONS_NOT_ENABLED. A request that sets onlytimestill works.
How the restriction behaves
- A new card has no category restriction. Create card takes only a card category, so set the restriction with the PUT before you hand out the card details.
- The PUT replaces the whole restriction. Leaving out
categoryremoves the category restriction. Leaving outtimeremoves the time window. Send both when you want both. - Correcting a transaction’s category changes that transaction only. The next charge is checked the same way as before.