nopSolutions/nopCommerce · error · NopException
Payment source '{paymentSource.ToUpper()}' not supported
Error message
Payment source '{paymentSource.ToUpper()}' not supported What it means
Thrown in CreateOrderAsync when the cart has recurring items and the selected payment source is Venmo or Apple Pay. PayPal Commerce only supports card-based payments for recurring/subscription billing because Vault tokenization for recurring charges requires a card payment source; Venmo and Apple Pay do not support the required Vault tokenization pattern.
Source
Thrown at src/Plugins/Nop.Plugin.Payments.PayPalCommerce/Services/PayPalCommerceServiceManager.cs:1673
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 order
if (order is null || isRecurring)
{
var isCard = string.Equals(paymentSource, nameof(PaymentSource.Card), StringComparison.InvariantCultureIgnoreCase);
var isVenmo = string.Equals(paymentSource, nameof(PaymentSource.Venmo), StringComparison.InvariantCultureIgnoreCase);
var isApplepay = string.Equals(paymentSource, nameof(PaymentSource.ApplePay), StringComparison.InvariantCultureIgnoreCase);
if (isRecurring && (isVenmo || isApplepay))
throw new NopException($"Payment source '{paymentSource.ToUpper()}' not supported");
var context = PrepareOrderContext(settings, details, paymentRequest.OrderGuid.ToString(), isApplepay);
var payer = await PrepareBillingDetailsAsync(settings, details);
//only registered customers can save payment tokens
var vault = !settings.UseVault || isGuest ? null : new VaultInstruction
{
UsageType = VaultUsageType.MERCHANT.ToString().ToUpper(),
CustomerType = VaultUsageType.CONSUMER.ToString().ToUpper(),
StoreInVault = VaultInstructionType.ON_SUCCESS.ToString().ToUpper(),
PermitMultiplePaymentTokens = false,
UsagePattern = isRecurring ? UsagePatternType.INSTALLMENT_PREPAID.ToString().ToUpper() : null
};
//set payment source
var paymentSourceDetails = new PaymentSource();
if (isCard)
{View on GitHub (pinned to 64bdf2ff08)
Solutions
- Filter the payment method selector to only show Card for carts containing recurring items
- Add a client-side check that hides or disables Venmo and Apple Pay buttons when recurring products are in the cart
- Inform the customer that recurring purchases require a card payment method
- Verify the PayPal button funding source configuration excludes Venmo and Apple Pay for recurring carts
Example fix
// before
if (isRecurring && (isVenmo || isApplepay))
throw new NopException($"Payment source '{paymentSource.ToUpper()}' not supported");
// after (client-side prevention)
// In the PayPal button configuration, restrict funding for recurring carts:
// funding: { disallowed: [paypal.FUNDING.VENMO, paypal.FUNDING.APPLEPAY] }
// Only Card funding is allowed when cart has recurring items Defensive patterns
Strategy: validation
Validate before calling
// Restrict payment source for recurring carts before order creation
var isRecurring = await _shoppingCartService.ShoppingCartIsRecurringAsync(cart);
if (isRecurring)
{
var isVenmo = string.Equals(paymentSource, nameof(PaymentSource.Venmo), StringComparison.InvariantCultureIgnoreCase);
var isApplepay = string.Equals(paymentSource, nameof(PaymentSource.ApplePay), StringComparison.InvariantCultureIgnoreCase);
if (isVenmo || isApplepay)
paymentSource = nameof(PaymentSource.Card); // force card for recurring
} Type guard
static bool IsPaymentSourceSupportedForRecurring(string paymentSource, bool isRecurring)
=> !isRecurring
|| (!string.Equals(paymentSource, "Venmo", StringComparison.InvariantCultureIgnoreCase)
&& !string.Equals(paymentSource, "ApplePay", StringComparison.InvariantCultureIgnoreCase)); Try / catch
var (order, error) = await manager.CreateOrderAsync(settings, placement, paymentSource, cardId, saveCard);
if (!string.IsNullOrEmpty(error) && error.Contains("not supported"))
return BadRequest($"{error}. Please use a card for recurring payments."); Prevention
- Configure PayPal button funding sources to exclude Venmo and Apple Pay for recurring carts
- Add client-side logic to filter payment methods based on cart contents
- Display clear messaging that recurring purchases require card payment
When it happens
Trigger: isRecurring is true, and the paymentSource matches 'Venmo' or 'ApplePay' (case-insensitive), triggering the NopException with the payment source name uppercased in the message.
Common situations: Customer with recurring items in cart selected Venmo or Apple Pay as the payment method; the payment method selector did not filter out Venmo/Apple Pay for carts containing recurring products; a UI customization exposed all payment methods regardless of cart contents.
Related errors
- Vault disabled
- Anonymous checkout disabled for recurring items
- {error}
- Payment token not created
- Recurring payments are not supported by selected payment met
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/1d7fdbc941b0f728.
Report an issue: GitHub.