nopSolutions/nopCommerce · error · NopException
Vault disabled
Error message
Vault disabled
What it means
Thrown in CreateOrderAsync when the cart contains recurring items but the Vault feature is disabled in plugin settings. Recurring (subscription) payments require PayPal Vault to store and reuse payment tokens across billing cycles; without Vault, recurring billing cannot be processed.
Source
Thrown at src/Plugins/Nop.Plugin.Payments.PayPalCommerce/Services/PayPalCommerceServiceManager.cs:1648
{
if (!IsConfigured(settings))
throw new NopException("Plugin not configured");
if (string.IsNullOrEmpty(settings.MerchantId))
throw new NopException("Merchant PayPal ID not set");
var details = await PrepareCartDetailsAsync(placement);
var savedPaymentToken = await _tokenService.GetByIdAsync(cardId ?? 0);
if (savedPaymentToken is not null && savedPaymentToken.CustomerId != details.Customer.Id)
throw new NopException("Card details not found");
var isGuest = await _customerService.IsGuestAsync(details.Customer);
var isRecurring = await _shoppingCartService.ShoppingCartIsRecurringAsync(details.Cart);
if (isRecurring)
{
if (!settings.UseVault)
throw new NopException("Vault disabled");
if (isGuest)
throw new NopException("Anonymous checkout disabled for recurring items");
var (error, cycleLength, cyclePeriod, totalCycles) = await _shoppingCartService.GetRecurringCycleInfoAsync(details.Cart);
if (!string.IsNullOrEmpty(error))
throw new NopException(error);
}
var paymentRequest = await _orderProcessingService.GetProcessPaymentRequestAsync();
var (order, _) = await GetCreatedOrderAsync(settings, paymentRequest, placement, details.ShippingIsRequired, paymentSource);
if (paymentRequest is null || order is null)
paymentRequest = new();
//prepare purchase unit
var purchaseUnit = await PreparePurchaseUnitAsync(settings, details, paymentRequest.OrderGuid.ToString());
//whether we should create a new orderView on GitHub (pinned to 64bdf2ff08)
Solutions
- Enable Vault in PayPal Commerce plugin settings (UseVault = true)
- Ensure the PayPal account is approved for Vault usage (may require additional PayPal account verification)
- If Vault cannot be enabled, remove recurring products or use a different payment processor for subscriptions
- Document that Vault must be enabled before adding recurring products to the catalog
Defensive patterns
Strategy: validation
Validate before calling
// Check if cart is recurring and Vault is enabled before order creation
var isRecurring = await _shoppingCartService.ShoppingCartIsRecurringAsync(cart);
if (isRecurring && !settings.UseVault)
{
return Error("Vault must be enabled for recurring payments");
} Type guard
static bool CanProcessRecurring(PayPalCommerceSettings settings, bool isRecurring)
=> !isRecurring || settings.UseVault; Try / catch
var (order, error) = await manager.CreateOrderAsync(settings, placement, paymentSource, cardId, saveCard);
if (!string.IsNullOrEmpty(error) && error == "Vault disabled")
return BadRequest("Recurring payments require Vault to be enabled"); Prevention
- Enable Vault when adding recurring products to the catalog
- Add a configuration check in admin when recurring products exist but Vault is off
- Document Vault as a prerequisite for subscription products
When it happens
Trigger: ShoppingCartIsRecurringAsync returns true for the cart, and settings.UseVault is false.
Common situations: Store sells subscription or recurring products but Vault was not enabled in plugin configuration; Vault was disabled after recurring products were added; the admin was unaware that Vault is a prerequisite for recurring billing with PayPal Commerce.
Related errors
- Anonymous checkout disabled for recurring items
- Payment source '{paymentSource.ToUpper()}' not supported
- No available shipping options
- Plugin not configured
- Merchant PayPal ID not set
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/b4274b6c5f4bf379.
Report an issue: GitHub.