Skip to content

Update spend rules for a managed card

Request

Must be user after a POST, to update individual spend rules associated with the managed card identified by the id path parameter.

Security
auth_token and api_key
Path
idstring^[0-9]+$required
Headers
idempotency-refstring

A unique call reference generated by the caller that, taking into consideration the payload as well as the operation itself, helps avoid duplicate operations. Idempotency reference uniqueness is maintained for at least 24 hours.

Bodyapplication/jsonrequired
allowedMerchantCategoriesArray of strings, <= 200 items

Whitelist MCC: A list of allowed merchant category codes (MCCs). If the MCC does not match, then the transaction will be declined. If an MCC is also in the blocked list, the blocked list will take precedence.

blockedMerchantCategoriesArray of strings, <= 200 items

Blacklist MCC: A list of disallowed merchant category codes (MCCs). If the MCC matches, then the transaction will be declined. If an MCC is also in the allowed list, the blocked list will take precedence.

allowedMerchantIdsArray of strings, <= 200 items

Whitelist Merchant Id: A list of allowed merchant IDs. If the Merchant Id does not match, then the transaction will be declined. If a Merchant Id is also provided in the blocked list, the blocked list will take precedence.

blockedMerchantIdsArray of strings, <= 200 items

Blacklist Merchant Id: A list of disallowed merchant IDs. If the Merchant Id matches, then the transaction will be declined. If a Merchant Id is also in the allowed list, the blocked list will take precedence.

allowedMerchantCountriesArray of strings, <= 50 items

Whitelist Merchant Country: A list of allowed merchant countries, in ISO 3166-1 alpha-2 format. If the Merchant country does not match, then the transaction will be declined. If a Merchant Country is also provided in the blocked list, the blocked list will take precedence.

blockedMerchantCountriesArray of strings, <= 50 items

Blacklist Merchant Country: A list of disallowed merchant countries, in ISO 3166-1 alpha-2 format. If the Merchant country matches, then the transaction will be declined. If a Merchant Country is also in the allowed list, the blocked list will take precedence.

allowContactlessboolean

Indicates if a contactless transaction is allowed on the card.

allowAtmboolean

Indicates if an ATM Withdrawal transaction is allowed on the card.

allowECommerceboolean

Indicates if an online transaction is allowed on the card.

allowCashbackboolean

Indicates if a cashback transaction at a physical terminal is allowed on the card.

allowCreditAuthorisationsboolean

Indicates if a the card can receive a credit transaction.

rolloverPolicyobject(RolloverPolicy)

The rollover policy will dictate how Weavr handles any eventual overspending. This is possible if a merchant clears more funds than authorised, or when a merchant clears funds without authorising, resulting in the availableToSpend value to go into negative. Rollover is relative to a spendLimit.interval

spendLimitArray of objects(SpendLimit)

The total amount of funds that can be spent using this card, in a given time interval.

minTransactionAmountinteger, (int64), >= 0

The minimum transaction amount, in card currency, that is allowed. If the transaction amount is less than this value, then the transaction will be declined.

maxTransactionAmountinteger, (int64), >= 0

The maximum transaction amount, in card currency, that is allowed. If the transaction amount is greater than this value, then the transaction will be declined.

updateSpendLimitMethodstring(SpendLimitUpdateMethod)

The spend limit update method to apply. Currently supported:

  • OVERWRITE: (default option if nothing selected). Overwrites the previous values for the spendLimit object i.e. sets new limits
  • INCREMENT : This will increase the existing value of the spend limit by the amount input the value field. If used in conjunction with an ALWAYS interval, this can be used to increment a spend limit on a periodic basis (controlled by you, e.g. monthly), and means that any 'unused' balance from the previous period will still available to spend. See examples in our documentation
Enum:"OVERWRITE""INCREMENT"
curl -i -X PATCH \
  'https://sandbox.weavr.io/multi/backoffice/managed_cards/{id}/spend_rules' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -H 'idempotency-ref: string' \
  -d '{
    "allowedMerchantCategories": [
      "string"
    ],
    "blockedMerchantCategories": [
      "string"
    ],
    "allowedMerchantIds": [
      "string"
    ],
    "blockedMerchantIds": [
      "string"
    ],
    "allowedMerchantCountries": [
      "st"
    ],
    "blockedMerchantCountries": [
      "st"
    ],
    "allowContactless": true,
    "allowAtm": true,
    "allowECommerce": true,
    "allowCashback": true,
    "allowCreditAuthorisations": true,
    "rolloverPolicy": {
      "rolloverNegative": true
    },
    "spendLimit": [
      {
        "startTimestamp": 1,
        "value": {
          "currency": "str",
          "amount": 0
        },
        "interval": "DAILY"
      }
    ],
    "minTransactionAmount": 0,
    "maxTransactionAmount": 0,
    "updateSpendLimitMethod": "OVERWRITE"
  }'

Responses

Success - No Content.

Headers
request-refstringrequired

A request identifier. Providing this reference when contacting our support team will help us investigate your query.

Response
No content