Where this file lives
- This path (
docs/payments/stripe-paymentintent-card-saving.md) is inside the rakletv3 repo for review and maintenance.- This document describes the current implemented process for Stripe PaymentIntent card saving in
Payment/Process.
Stripe PaymentIntent Card Saving¶
Generated: 2026-04-21
Repo: rakletadmin/rakletv3
Focus: Payment/Process Stripe card saving behavior.
Purpose¶
Raklet supports one-time Stripe payments and future off-session payments such as recurring donations and scheduled membership payments. Stripe should only save a PaymentIntent payment method for future use when the user selected a recurring/save-card option, or when the payment is already an off-session saved-card charge.
Scope¶
This document covers card payments processed through:
Application/Views/Shared/_StripeCreditCardForm.cshtmlApplication/Controllers/PaymentController.csServices/BaseStripeCreditCardProcessing.cs
Stripe Checkout sessions have separate handling in BaseStripeCreditCardProcessing.ApplyCheckoutPaymentIntentOptions().
Business Rules¶
| Scenario | IsCardSavingEnabled |
offSessionPayment |
Stripe SetupFutureUsage |
Stripe OffSession |
|---|---|---|---|---|
| One-time payment with a new card | false |
false |
null |
null |
| Recurring donation or explicit save-card payment | true |
false |
off_session |
null |
| Saved-card off-session charge | any | true |
null |
true |
SetupFutureUsage = "off_session" tells Stripe to attach the confirmed PaymentMethod to the Customer for future use. Do not set it for one-time payments where Raklet is not saving a CreditCardToken.
Flow¶
_StripeCreditCardForm.cshtmlcreates a StripePaymentMethodwithstripe.createPaymentMethod()and postsPaymentMethodIdtoPaymentController.Process.PaymentController.ProcessConfirmed()maps user choices toCreditCardChargeRequest.IsCardSavingEnabled.BaseStripeCreditCardProcessing.CreateOrUpdatePaymentIntentCreateOptions()setsSetupFutureUsagethroughGetPaymentIntentSetupFutureUsage().- After successful confirmation,
PaymentControllercreates a RakletCreditCardTokenonly when the Stripe response marks the card as saved.
QA Checklist¶
- One-time Stripe donation with
IsRecurring = falseshould create a successful PaymentIntent without attaching a new PaymentMethod to the Stripe Customer for future use. - Recurring donation with
IsRecurring = trueshould create a PaymentIntent withSetupFutureUsage = "off_session"and then create the scheduled donation record. - Membership payment with explicit save-card/update-card selection should save the card and create/update the scheduled payment linkage.
- Existing saved-card off-session payments should keep using
OffSession = true.