nopSolutions/nopCommerce · error · NopException

Recurring payments are not supported by selected payment met

Error message

Recurring payments are not supported by selected payment method

What it means

Thrown in the recurring-cart branch of GetProcessPaymentResultAsync when the selected payment method reports RecurringPaymentType.NotSupported. nopCommerce supports recurring billing only for plugins that explicitly declare Manual or Automatic recurring capability; a standard one-shot gateway cannot service a recurring cart.

Source

Thrown at src/Libraries/Nop.Services/Orders/OrderProcessingService.cs:1416

        ProcessPaymentResult processPaymentResult;
        //check if is payment workflow required
        if (await IsPaymentWorkflowRequiredAsync(details.Cart))
        {
            var customer = await _customerService.GetCustomerByIdAsync(processPaymentRequest.CustomerId);
            var paymentMethod = await _paymentPluginManager
                                    .LoadPluginBySystemNameAsync(processPaymentRequest.PaymentMethodSystemName, customer, processPaymentRequest.StoreId)
                                ?? throw new NopException("Payment method couldn't be loaded");

            //ensure that payment method is active
            if (!_paymentPluginManager.IsPluginActive(paymentMethod))
                throw new NopException("Payment method is not active");

            if (details.IsRecurringShoppingCart)
            {
                //recurring cart
                processPaymentResult = (await _paymentService.GetRecurringPaymentTypeAsync(processPaymentRequest.PaymentMethodSystemName)) switch
                {
                    RecurringPaymentType.NotSupported => throw new NopException("Recurring payments are not supported by selected payment method"),
                    RecurringPaymentType.Manual or
                        RecurringPaymentType.Automatic => await _paymentService.ProcessRecurringPaymentAsync(processPaymentRequest),
                    _ => throw new NopException("Not supported recurring payment type"),
                };
            }
            else
                //standard cart
                processPaymentResult = await _paymentService.ProcessPaymentAsync(processPaymentRequest);
        }
        else
            //payment is not required
            processPaymentResult = new ProcessPaymentResult { NewPaymentStatus = PaymentStatus.Paid };
        return processPaymentResult;
    }

    /// <summary>
    /// Save gift card usage history
    /// </summary>

View on GitHub (pinned to 64bdf2ff08)

Solutions

  1. Install and enable a payment plugin that supports recurring payments (e.g. a gateway implementing GetRecurringPaymentType returning Manual or Automatic).
  2. Restrict payment method selection at checkout to recurring-capable plugins when the cart contains recurring products.
  3. If subscriptions are unintended, mark the product as non-recurring (IsRecurring=false).

Example fix

// before
var methods = await _paymentPluginManager.LoadActivePluginsAsync(customer, storeId);

// after
var methods = await _paymentPluginManager.LoadActivePluginsAsync(customer, storeId);
if (cart.Any(item => item.Product.IsRecurring))
{
    methods = methods.Where(async p =>
        await _paymentService.GetRecurringPaymentTypeAsync(p.PluginDescriptor.SystemName) != RecurringPaymentType.NotSupported);
}
if (!methods.Any())
    return Error("No recurring-capable payment method available.");
Defensive patterns

Strategy: validation

Validate before calling

var isRecurringCart = cart.Any(i => i.Product.IsRecurring);
if (isRecurringCart)
{
    var rpt = await _paymentService.GetRecurringPaymentTypeAsync(processPaymentRequest.PaymentMethodSystemName);
    if (rpt == RecurringPaymentType.NotSupported)
        return Error("Selected payment method does not support recurring billing.");
}

await _orderProcessingService.PlaceOrderAsync(processPaymentRequest, details);

Type guard

async Task<bool> SupportsRecurringAsync(string systemName)
    => await _paymentService.GetRecurringPaymentTypeAsync(systemName) != RecurringPaymentType.NotSupported;

Try / catch

try
{
    await _orderProcessingService.PlaceOrderAsync(processPaymentRequest, details);
}
catch (NopException ex) when (ex.Message.Contains("Recurring payments are not supported"))
{
    ModelState.AddModelError(string.Empty, "Please choose a recurring-capable payment method.");
    return View(model);
}

Prevention

When it happens

Trigger: Customer builds a cart containing a product with IsRecurring=true (recurring product attribute) and selects a payment method (e.g. CashOnDelivery, PayPal Standard without recurring) that returns RecurringPaymentType.NotSupported from GetRecurringPaymentTypeAsync.

Common situations: Store sells subscription products but only standard payment gateways are installed; admin enabled a recurring product without enabling a recurring-capable gateway; switching the default payment method broke existing subscription checkouts.

Related errors


AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13). Data as JSON: /api/errors/162cf78482e5ab82. Report an issue: GitHub.