Spending controls

     

    Learn how to set rules on cards and cardholders to control spend.

    Spending controls can be used to block businesses categories (e.g., bakeries, gambling) or set spending limits (e.g., 100 USD/authorization or 3,000 USD/month). They can be applied to Cards and/or Cardholders either by setting the spending_controls object at creation or by updating it later.

    If you’re using spending controls and Real-time authorizations together, spending controls run first and decline a purchase before the issuing_authorization.request is sent, resulting in a declined issuing_authorization.created event.

    field type description
    allowed_categories array Array of strings containing categories of authorizations to always allow. All other categories will be blocked.
    blocked_categories array Array of strings containing categories of authorizations to always decline. All other categories will be allowed.
    spending_limits array Array of objects that specify amount-based rules.

    Spending limits

    Spending limits only apply to authorization requests, not to incremental charges such as tips or hotel fees.

    To limit the amount of money that can be spent, set spending_limits within the spending_controls object to a list of objects with the following structure.

    field type description
    amount integer Maximum spend, in the currency of the card. Amounts in other currencies are converted to the card’s currency when evaluating this control.
    interval array The time interval for which the amount applies. Can be per_authorization, daily, weekly, monthly, yearly, or all_time.
    categories array (optional) The list of categories this limit applies to. Omitting this field will apply the limit to all categories.

    Examples

    The following examples demonstrate different uses of spending controls for cards and cardholders.

    Limit a cardholder's monthly spend across all of their cards

    curl https://api.stripe.com/v1/issuing/cardholders/ich_1Cm3paIyNTgGDVfzBqq1uqxR \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d "spending_controls[spending_limits][0][amount]"=300000 \ -d "spending_controls[spending_limits][0][interval]"=monthly
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Issuing::Cardholder.update( 'ich_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { spending_limits: [{ amount: 300000, interval: 'monthly', }], }, } )
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.issuing.Cardholder.modify( 'ich_1Cm3paIyNTgGDVfzBqq1uqxR', spending_controls={ 'spending_limits': [{ 'amount': 300000, 'interval': 'monthly', }], }, )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Issuing\Cardholder::update( 'ich_1Cm3paIyNTgGDVfzBqq1uqxR', [ 'spending_controls' => [ 'spending_limits' => [[ 'amount' => 300000, 'interval' => 'monthly', ]], ], ] );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; Cardholder cardholder = Cardholder.retrieve("ich_1Cm3paIyNTgGDVfzBqq1uqxR"); CardholderUpdateParams params = CardholderUpdateParams.builder() .setSpendingControls( CardholderUpdateParams.SpendingControls.builder() .addSpendingLimit( CardholderUpdateParams.SpendingControls.SpendingLimit.builder() .setAmount(300000L) .setInterval(CardholderUpdateParams.SpendingControls.SpendingLimit.Interval.MONTHLY) .build()) .build()) .build(); cardholder.update(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const cardholder = await stripe.issuing.cardholders.update( 'ich_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { spending_limits: [{ amount: 300000, interval: 'monthly', }], }, } );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.IssuingCardholderParams{ IssuingCardholderSpendingControls: &stripe.IssuingCardholderSpendingControlsParams{ SpendingLimits: []*stripe.IssuingCardholderSpendingControlsSpendingLimitParams{ { Amount: stripe.Int64(300000), Interval: stripe.String(string(stripe.IssuingSpendingLimitIntervalMonthly)), }, }, }, } c, _ := cardholder.Update("ich_1Cm3paIyNTgGDVfzBqq1uqxR", params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CardholderUpdateOptions { SpendingControls = new CardholderSpendingControlsOptions { SpendingLimits = new List<CardholderSpendingControlsSpendingLimitOptions> { new CardholderSpendingControlsSpendingLimitOptions { Amount = 300000, Interval = "monthly", }, }, }, }; var service = new CardholderService(); service.Update("ich_1Cm3paIyNTgGDVfzBqq1uqxR", options);

    Limit the spend and allowed categories for a card

    curl https://api.stripe.com/v1/issuing/cards/ic_1Cm3paIyNTgGDVfzBqq1uqxR \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d "spending_controls[allowed_categories][0]"=automated_fuel_dispensers \ -d "spending_controls[spending_limits][0][amount]"=8000 \ -d "spending_controls[spending_limits][0][interval]"=per_authorization
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Issuing::Card.update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { allowed_categories: ['automated_fuel_dispensers'], spending_limits: [{ amount: 8000, interval: 'per_authorization', }], }, } )
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.issuing.Card.modify( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', spending_controls={ 'allowed_categories': ['automated_fuel_dispensers'], 'spending_limits': [{ 'amount': 8000, 'interval': 'per_authorization', }], }, )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Issuing\Card::update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', [ 'spending_controls' => [ 'allowed_categories' => ['automated_fuel_dispensers'], 'spending_limits' => [[ 'amount' => 8000, 'interval' => 'per_authorization', ]], ], ] );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; Card card = Card.retrieve("ic_1Cm3paIyNTgGDVfzBqq1uqxR"); CardUpdateParams params = CardUpdateParams.builder() .setSpendingControls( CardUpdateParams.SpendingControls.builder() .addAllowedCategory(CardUpdateParams.SpendingControls.AllowedCategory.AUTOMATED_FUEL_DISPENSERS) .addSpendingLimit( CardUpdateParams.SpendingControls.SpendingLimit.builder() .setAmount(8000L) .setInterval(CardUpdateParams.SpendingControls.SpendingLimit.Interval.PER_AUTHORIZATION) .build()) .build()) .build(); card.update(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const card = await stripe.issuing.cards.update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { allowed_categories: ['automated_fuel_dispensers'], spending_limits: [{ amount: 8000, interval: 'per_authorization', }], }, } );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.IssuingCardParams{ IssuingCardSpendingControls: &stripe.IssuingCardSpendingControlsParams{ AllowedCategories: []*string{ stripe.String("automated_fuel_dispensers"), }, SpendingLimits: []*stripe.IssuingCardSpendingControlsSpendingLimitParams{ { Amount: stripe.Int64(8000), Interval: stripe.String(string(stripe.IssuingSpendingLimitIntervalPerAuthorization)), }, }, }, } c, _ := card.Update("ic_1Cm3paIyNTgGDVfzBqq1uqxR", params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CardUpdateOptions { CardSpendingControls = new CardSpendingControlsOptions { AllowedCategories = new List<string> { "automated_fuel_dispensers", }, SpendingLimits = new List<CardSpendingControlsSpendingLimitOptions> { new CardSpendingControlsSpendingLimitOptions { Amount = 8000, Interval = "per_authorization", }, }, }, }; var service = new CardService(); service.Update("ic_1Cm3paIyNTgGDVfzBqq1uqxR", options);

    Limit a card's weekly spend for specific categories

    curl https://api.stripe.com/v1/issuing/cards/ic_1Cm3paIyNTgGDVfzBqq1uqxR \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d "spending_controls[spending_limits][0][amount]"=4000 \ -d "spending_controls[spending_limits][0][interval]"=weekly \ -d "spending_controls[spending_limits][0][categories][0]"=fast_food_restaurants
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Issuing::Card.update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { spending_limits: [{ amount: 4000, interval: 'weekly', categories: ['fast_food_restaurants'], }], }, } )
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.issuing.Card.modify( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', spending_controls={ 'spending_limits': [{ 'amount': 4000, 'interval': 'weekly', 'categories': ['fast_food_restaurants'], }], }, )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Issuing\Card::update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', [ 'spending_controls' => [ 'spending_limits' => [[ 'amount' => 4000, 'interval' => 'weekly', 'categories' => ['fast_food_restaurants'], ]], ], ] );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; Card card = Card.retrieve("ic_1Cm3paIyNTgGDVfzBqq1uqxR"); CardUpdateParams params = CardUpdateParams.builder() .setSpendingControls( CardUpdateParams.SpendingControls.builder() .addSpendingLimit( CardUpdateParams.SpendingControls.SpendingLimit.builder() .setAmount(8000L) .setInterval(CardUpdateParams.SpendingControls.SpendingLimit.Interval.PER_AUTHORIZATION) .addCategory(CardUpdateParams.SpendingControls.SpendingLimit.Category.FAST_FOOD_RESTAURANTS) .build()) .build()) .build(); card.update(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const card = await stripe.issuing.cards.update( 'ic_1Cm3paIyNTgGDVfzBqq1uqxR', { spending_controls: { spending_limits: [{ amount: 4000, interval: 'weekly', categories: ['fast_food_restaurants'], }], }, } );
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.IssuingCardParams{ IssuingCardSpendingControls: &stripe.IssuingCardSpendingControlsParams{ SpendingLimits: []*stripe.IssuingCardSpendingControlsSpendingLimitParams{ { Amount: stripe.Int64(8000), Interval: stripe.String(string(stripe.IssuingSpendingLimitIntervalPerAuthorization)), Categories: []*string{ stripe.String("fast_food_restaurants"), }, }, }, }, } c, _ := card.Update("ic_1Cm3paIyNTgGDVfzBqq1uqxR", params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CardUpdateOptions { CardSpendingControls = new CardSpendingControlsOptions { SpendingLimits = new List<CardSpendingControlsSpendingLimitOptions> { new CardSpendingControlsSpendingLimitOptions { Amount = 8000, Interval = "per_authorization", Categories = new List<string> { "automated_fuel_dispensers", }, }, }, }, }; var service = new CardService(); service.Update("ic_1Cm3paIyNTgGDVfzBqq1uqxR", options);

    Was this page helpful?

    Feedback about this page?

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.

    On this page