Skip to main content
Cards have two separate controls: a budget and throttles. A third, 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:
Card responses show it as restriction.category: { allow, values }, or null when the card has none.
  • allow is required. Only true is accepted for now.
  • values holds code values from List transaction categories. Don’t send the id.
  • Allowing a category allows every charge Reap maps to it.
  • other and on_off_ramp_fees are in the list, but you can’t use them in restriction.category. They return 422 CATEGORY_NOT_FOUND, as does any unknown code. details.codes in the error lists the codes that were not accepted.
  • allow: false, category: null, and an empty or duplicate values list return 400. To remove the category restriction, leave category out.
  • The body accepts only time and category. Any other field, such as a misspelled categroy, returns 400 and changes nothing.
  • Your business needs category restrictions enabled. If it doesn’t, setting category returns 400 CATEGORY_RESTRICTIONS_NOT_ENABLED. A request that sets only time still 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 category removes the category restriction. Leaving out time removes 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.
For now, editing a card in the Reap dashboard removes its category restriction. Set it again through the API after a dashboard edit.
For a worked example, see Cards for advertising at scale.