{"record":{"id":"48050b422e191390","repo":"antiwork/gumroad","slug":"we-could-not-verify-this-card-for-recurring-paymen-48050b","errorCode":null,"errorMessage":"We could not verify this card for recurring payments. Please update the payment method before you restart this subscription.","messagePattern":"We could not verify this card for recurring payments\\. Please update the payment method before you restart this subscription\\.","errorType":"exception","errorClass":"Subscription::UpdateFailed","httpStatus":null,"severity":"error","filePath":"app/services/subscription/updater_service.rb","lineNumber":442,"sourceCode":"      if !had_saved_card && subscription.gift? && !is_resubscribing\n        CustomerLowPriorityMailer.subscription_giftee_added_card(subscription.id).deliver_later\n      end\n    end\n\n    def validate_saved_indian_card_mandate!\n      return unless subscription.india_card_mandate_reliability_enabled?\n\n      credit_card = subscription.credit_card_to_charge\n      return if credit_card.nil?\n\n      unless future_subscription_charge? && credit_card.stripe_charge_processor? && credit_card.requires_mandate?\n        subscription.clear_indian_card_mandate_state!(expected_credit_card_id: credit_card.id)\n        return\n      end\n\n      mandate, status, = subscription.indian_card_mandate_for(credit_card.id)\n      unless status == \"active\"\n        raise Subscription::UpdateFailed, \"We could not verify this card for recurring payments. Please update the payment method before you restart this subscription.\"\n      end\n\n      subscription.update_renewal_for_indian_card_mandate!(\n        \"active\",\n        expected_credit_card_id: credit_card.id,\n        mandate_id: mandate.id\n      )\n    rescue ChargeProcessorError => e\n      ErrorNotifier.notify(e, subscription: subscription.external_id)\n      raise Subscription::UpdateFailed, \"We could not verify this card for recurring payments. Please update the payment method before you restart this subscription.\"\n    end\n\n    def future_subscription_charge?\n      subscription.future_subscription_charge?(authenticated_offer_code_buyer: logged_in_user)\n    end\n\n    def mandate_billing_info_changed?\n      submitted_info = params[:contact_info]&.slice(:country, :state, :zip_code)&.symbolize_keys","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/antiwork/gumroad/blob/afeacbd394069a1cbf0c6c50ee8e900925050370/app/services/subscription/updater_service.rb#L424-L460","documentation":"When restarting or resuming a membership with a saved card (use_existing_card true), validate_saved_indian_card_mandate! requires the stored Indian card's e-mandate to be active: subscription.indian_card_mandate_for(card.id) must report status \"active\", otherwise UpdateFailed with \"...update the payment method before you restart this subscription.\" Non-mandate cards simply have their mandate state cleared. Applies when india_card_mandate_reliability_enabled?, the card is on Stripe, requires_mandate?, and a future subscription charge is expected.","triggerScenarios":"Buyer restarts a cancelled membership whose saved Indian card never obtained an e-mandate (created before the reliability feature), or whose mandate has since expired, been revoked by the bank, or deleted in Stripe; a renewal resume after renewal_disabled_due_to_indian_card_mandate while still choosing the existing card.","commonSituations":"Memberships created before the mandate feature shipped; RBI mandates aging out per bank rules; buyer's bank revoking the auto-debit authorization; test data with mandates created in another Stripe environment.","solutions":["Have the buyer submit a new payment method instead of the saved card — the new-card path (validate_indian_card_mandate!) creates and validates a fresh mandate.","Verify the mandate status in Stripe for that customer/payment method before directing the buyer.","An inactive mandate cannot be fixed server-side; the buyer must re-authorize via a new card update or a fresh checkout."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Only offer restart-with-saved-card when the mandate is actually active\ncard = subscription.credit_card_to_charge\nmandate_ok = true\nif subscription.india_card_mandate_reliability_enabled? && card&.stripe_charge_processor? && card.requires_mandate?\n  _, mandate_ok, = subscription.indian_card_mandate_for(card.id)\n  mandate_ok = mandate_ok == \"active\"\nend\nshow_use_existing_card_option = mandate_ok","typeGuard":null,"tryCatchPattern":"result = Subscription::UpdaterService.new(...).perform\nunless result[:success]\n  # message tells the buyer to update the payment method; route them to the new-card flow\n  redirect_to_change_payment_method(result[:error_message])\nend","preventionTips":["Check mandate status before rendering a restart CTA that defaults to the saved card.","Track mandate expiry dates for Indian cards and proactively prompt re-authorization before renewal dates.","Never assume an old membership pre-dating the reliability feature has a mandate — verify per card id."],"tags":["subscription","india","mandate","restart","saved-card"],"backgroundTag":"rbi-emandate-validation-failed","analyzedSha":"afeacbd394069a1cbf0c6c50ee8e900925050370","analyzedAt":"2026-08-21T17:58:52.159Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}