Provides payment gateway integration for CrestApps Orchard Core commerce, covering Stripe provider setup, refunds, webhooks, saved cards, and installment plans.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Payments are provider-neutral. A gateway is an ICheckoutPaymentProvider registered on the tenant; the checkout engine drives it, the durable ledger records it, and every consumer stays unaware of which gateway took the money. Stripe is the shipped card gateway. Installment plans (a Subscriptions sub-feature) build on the same contracts to keep a card and charge it on a schedule.
Related skills: orchardcore-checkout (the engine, steps, test provider), orchardcore-transactions (ledger screens, refunds console), orchardcore-pay-later (offline providers), orchardcore-subscriptions (recurring agreements), orchardcore-taxation, orchardcore-invoicing (invoices and their payment schedules), orchardcore-banking (money the business sends out: disbursements, checks, direct deposit).
| Feature ID | Name | Depends on | Notes |
|---|---|---|---|
CrestApps.OrchardCore.Stripe | Stripe (Payment Providers) | CrestApps.OrchardCore.Users | With Checkout enabled it registers the card provider (key Stripe) automatically; with Workflows it adds Stripe events; with Point of Sale it adds stripe-terminal |
CrestApps.OrchardCore.Subscriptions.Installments | Subscriptions - Installment Plans | Transactions, Checkout, OrchardCore.Users | Does not need the Subscriptions feature or Products; see references/installment-plans.md |
CrestApps.OrchardCore.Payments.Abstractions is a contracts package (namespace CrestApps.OrchardCore.Payments): Money, GatewayMode (Live, Testing), IPaymentEvent, PaymentEventBase, the event contexts and RemoteSubscriptionStatus. Provider contracts are in CrestApps.OrchardCore.Checkout.Abstractions (CrestApps.OrchardCore.Checkout.Services). Install CrestApps.OrchardCore.Stripe in the web/startup project.
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Checkout",
"CrestApps.OrchardCore.Stripe"
],
"disable": []
}
]
}
decimal everywhere. Compare with Money.AreEqual and Money.IsGreaterThan, round with Money.Round(amount, currency), and convert to minor units only at the gateway boundary (Money.ToMinorUnits, StripeCurrency). CurrencyScale.GetDecimalPlaces knows JPY (0) and KWD (3); CurrencyScale now lives in CrestApps.OrchardCore.Abstractions (namespace CrestApps.OrchardCore.Currencies) so the catalog and taxation round without referencing payments.PaymentVerificationResult.VerifyAsync against the gateway's API.ICheckoutRefundService so the refund is recorded first, capped at what remains, taxed from the original snapshot and locked against concurrent refunds.savePaymentMethod, offSession, savedCustomerReference and savedPaymentMethodReference.IOptionsMonitor<StripeOptions>.CurrentValue; they refresh without a tenant restart when settings are saved.sealed except view models; recipes use { "steps": [...] }.ICheckoutPaymentProvider under a unique Key: DisplayName, Capabilities, BeginAsync, VerifyAsync, CancelAsync.PaymentProviderCapabilities: SupportsOneTimePayments, SupportsRecurringPayments, SupportsHostedCheckout, SupportsEmbeddedElements, SupportsCombinedOneTimeAndRecurring, CollectsTaxDynamically, SupportsRefunds, SupportsSavedPaymentMethods, DefersPayment, AcceptsDelegatedCredentials (charges an AI agent's one-purchase credential on the server), AcceptsExternalAuthentication (takes a 3-D Secure result from outside). See orchardcore-checkout for the delegated and 3-D Secure provider data keys. A provider that claims refunds must implement ICheckoutPaymentRefundProvider (an architecture test checks); one that claims recurring support must implement ICheckoutRecurringPaymentProvider under the same key or the engine refuses it.IDisplayDriver<CheckoutFlowPaymentMethod> whose result is .OnGroup(providerKey).ICheckoutPaymentProviderAvailability (rule itself out of a checkout), ICheckoutPaymentProviderDescription (line under the name), ICheckoutSavedPaymentMethodProvider (installments, off-session charges) and ICheckoutPaymentClientConfigurationProvider (publishable values for API clients, never secrets).IPaymentEvent calls and complete through ICheckoutEngine.TryCompleteAsync.A complete provider with refunds and its panel is in references/custom-payment-provider.md.
| Result type | Use |
|---|---|
PaymentBeginResult.Success(reference) | Begun; set ClientSecret, RedirectUrl or RequiresAction for the browser |
PaymentBeginResult.Decline(message, reference) | The gateway refused the card; the attempt fails and the next try gets a new idempotency key |
PaymentBeginResult.Failure(message) | Could not start (network, configuration) |
PaymentVerificationResult | Status (PaymentStatus.Succeeded, Failed, Unknown), TransactionId, ReportsAuthoritativeAmount, Amount, TaxAmount, Currency, GatewayMode, RiskLevel, RiskScore |
PaymentRefundResult.Success / Pending / Failed | Refund outcome with the provider's refund reference |
BeginPaymentContext carries the Session, the durable Attempt (ExpectedAmount, ExpectedTaxAmount, Currency, IdempotencyKey, ObligationId), the Invoice, return and cancel URLs and the sanitized ProviderData. Use Attempt.IdempotencyKey on every mutating gateway call.
IPaymentEvent (derive from PaymentEventBase) is the normalized stream every gateway raises: PaymentSucceededAsync, PaymentIntentSucceededAsync, CustomerSubscriptionCreatedAsync, PaymentFailedAsync, PaymentCanceledAsync, PaymentRefundedAsync, PaymentDisputeCreatedAsync, PaymentDisputeUpdatedAsync (default method), SubscriptionPaymentFailedAsync (a renewal failed) and SubscriptionStatusChangedAsync (with RemoteSubscriptionStatus; Unknown means leave local state alone). Contexts carry GatewayId, GatewayMode and a Data bag; each method takes a CancellationToken.
using CrestApps.OrchardCore.Payments;
public sealed class DisputeAlertPaymentEvent : PaymentEventBase
{
public override Task PaymentDisputeCreatedAsync(PaymentDisputeCreatedContext context, CancellationToken cancellationToken = default)
{
// Alert the finance team. Reconcile against durable state; never mark anything paid here.
return Task.CompletedTask;
}
}
// services.AddScoped<IPaymentEvent, DisputeAlertPaymentEvent>();
ICheckoutRefundService.RequestRefundAsync(new RequestPaymentRefundContext { SessionId, OriginalTransactionId, Amount, Reason }) returns the durable PaymentRefund (RefundStatus: Requested, Pending, Succeeded, Failed, Canceled, PendingManualReview). It resolves the settled attempt, refuses more than remains, derives refunded tax from the original TaxSnapshot through ITaxRefundCalculator, persists before calling the provider, and serializes refunds of one payment with IDistributedLock. A provider without ICheckoutPaymentRefundProvider gets PendingManualReview, closed by an operator under Commerce > Refunds.
Refunds observed at the gateway (for example from the Stripe dashboard) flow through ICheckoutRefundReconciliationService: matched by provider reference, idempotency key, then an open request of the same amount; an unmatched one is quarantined as PendingManualReview with remote_refund_without_local_request. For a transaction, prefer ITransactionCommandService.RefundAsync (see orchardcore-transactions); for an order, the order's Manage box. React to finished refunds with IPaymentRefundHandler.RefundSucceededAsync.
Settings > Payments > Stripe (group stripe, permission ManageStripeSettings). Choose Enable production (off is test mode), paste the secret and publishable keys, Save, then Connect: the key is verified, the account id stored, a webhook to /stripe/webhook created with its signing secret, and the site domain registered for wallets (skipped on localhost). Disconnect deletes the provisioned webhook and clears stored credentials. StripeSettings: IsLive, Live|Test + PublishableKey, PrivateSecret, WebhookSecret, AccountId, WebhookId. Secrets are data-protected.
After upgrading, click Connect again so the auto-provisioned webhook subscribes to the newer events (subscription lifecycle, refunds, disputes).
The optional CrestApps_Stripe section (StripeConfigurationOptions, read per tenant from IShellConfiguration at tenant start) wins over the settings page one value at a time:
{
"OrchardCore": {
"CrestApps_Stripe": {
"IsLive": false,
"Test": {
"PublishableKey": "pk_test_...",
"SecretKey": "sk_test_...",
"WebhookSecret": "whsec_..."
}
}
}
}
OrchardCore__CrestApps_Stripe__IsLive=false
OrchardCore__CrestApps_Stripe__Test__SecretKey=sk_test_...
OrchardCore__Contoso__CrestApps_Stripe__Test__SecretKey=sk_test_...
Configured values show read-only on the page and are never written to the database. With a configured webhook secret, Connect does not create a webhook; register POST /stripe/webhook in the Stripe dashboard with that secret.
StripeSettings has its own recipe and deployment step (not the Settings step). The deployment step exports no secrets and no account or webhook ids. The recipe step protects clear-text secrets, keeps stored secrets it does not carry, checks each key's prefix for its mode (pk_test_, sk_live_, whsec_) and ignores account and webhook ids.
{
"steps": [
{
"name": "StripeSettings",
"Settings": {
"IsLive": false,
"TestPublishableKey": "pk_test_...",
"TestPrivateSecret": "sk_test_...",
"TestWebhookSecret": "whsec_..."
}
}
]
}
BeginAsync creates an unconfirmed PaymentIntent for the attempt's gross amount and returns its client secret; VerifyAsync reads the PaymentIntent (with Radar risk) from Stripe. The hosted-checkout mode is gone.StripeRecurringPaymentProvider); one Stripe customer is resolved per checkout so a setup fee and a plan share the card. Cancel, pause (pause_collection) and resume reach Stripe.savePaymentMethod (installments) and offSession charges; buyer wallets through IStripeWalletService with savedCardId and rememberCard provider data, listed at account/payment-methods.authentication_required) is reported with PaymentBeginResult.AuthenticationRequired(...) (a decline that also sets RequiresAuthentication), surfaced as PaymentBeginOutcome.RequiresAuthentication.ISavedPaymentMethodStore, see orchardcore-checkout), and any module can charge it later with ITransactionCommandService.ChargeSavedPaymentMethodAsync (see orchardcore-transactions). With Checkout on, account/payment-methods lists those first under Cards for automatic payments, with Make default (account/payment-methods/kept/{id}/default) and Remove (account/payment-methods/kept/{id}/remove); AccountPaymentMethodsViewModel.KeptPaymentMethods carries them.AcceptsDelegatedCredentials, used by Agentic Commerce, see orchardcore-agentic-commerce): a Stripe shared payment token (stripe_shared_payment_token, spt_..., issued to the store's Stripe account by the agent's platform) is charged with payment_method_data[shared_payment_granted_token] on the preview API version 2026-09-30.preview (StripePaymentIntentService.SharedPaymentTokenApiVersion); a Google Pay token (google_pay_token) whose gateway is Stripe is charged with its tok_... card token (a token Stripe did not issue is refused). Each charge carries the attempt's idempotency key and metadata checkout_attempt_id, checkout_session_id and delegated, and is verified like any payment. A credential pays one purchase only: keeping the card or a recurring charge is refused. When the bank asks the buyer to approve, the result requires an action with Stripe's redirect page and carries CardBrand.AcceptsExternalAuthentication): an agent's result is sent with Stripe's Import 3D Secure results (payment_method_options[card][three_d_secure][cryptogram], [electronic_commerce_indicator], [transaction_id], [version], [ares_trans_status]) and error_on_requires_action=true. A PaymentIntent already waiting for approval is confirmed with the result (idempotency key: the attempt's key plus a hash of the result); a refused confirm cancels it. A result that does not allow payment never reaches Stripe. The account must have 3D Secure import enabled by Stripe.POST /stripe/webhook: signature verified first, one distributed lock and a processed-event record per event, handler writes committed with the marker; 500 asks Stripe to retry, 409 on lock contention. Events mapped: invoice.payment_succeeded, invoice.payment_failed, customer.subscription.created|updated|deleted, payment_intent.succeeded|payment_failed|canceled, charge.refunded, refund.created|updated|failed, charge.refund.updated, charge.dispute.created|updated|closed.OrchardCore.Workflows): StripePaymentReceivedEvent, StripeSubscriptionCreatedEvent, StripePaymentIntentSucceededEvent, StripePaymentFailedEvent, StripePaymentCanceledEvent, StripePaymentRefundedEvent, StripeDisputeCreatedEvent, StripeRequestFailedEvent (401, 403 or no connection; throttled to once per five minutes per tenant).stripe login
stripe listen --forward-to https://localhost:5001/stripe/webhook --skip-verify
stripe trigger payment_intent.succeeded
Paste the printed whsec_ into Test webhook signing secret (Advanced) or set CrestApps_Stripe:Test:WebhookSecret. For automated tests without Stripe use the Test payments provider (orchardcore-checkout). On several nodes enable OrchardCore.Redis.Lock and OrchardCore.Redis.Cache so locks and payment signals are shared.
PaymentMethodOptions, PaymentMethod and the subscription-specific Stripe endpoints are gone; payment methods are the registered ICheckoutPaymentProviders and their panels are IDisplayDriver<CheckoutFlowPaymentMethod> (not SubscriptionFlowPaymentMethod).double to decimal; the double overloads of StripeCurrency were removed.StripePriceSyncService and Sync prices were removed; prices are sent inline.IOptions<StripeOptions> readers must switch to IOptionsMonitor<StripeOptions>.| Symptom | Fix |
|---|---|
| Settings page denied to a role with Manage Stripe settings | Fixed in 3.0 by AddSiteSettingsPermission; update |
| Renewals or cancellations never recorded | Click Connect again to re-provision the webhook events |
| Webhook returns 400 | Wrong signing secret for the mode, or a configured secret shadowing a provisioned one |
| Card form missing | Publishable key not set for the active mode |
| Wallet buttons missing | Domain not registered, not HTTPS, or nothing due now |
| payment_method belongs to the Customer | Fixed in 3.0: one customer per checkout |
| The card could not be saved for later payments when retrying a checkout with another card | Fixed in 3.0 (#1055): the Stripe customer for a card-keeping checkout is keyed by the checkout and its payment method |
| Agent payment with a shared payment token fails | The token was issued to another Stripe account or business profile (set Stripe business profile in Agentic Commerce settings), or the account lacks Stripe's shared payment token preview |
| Agent's 3-D Secure result refused by Stripe | The account does not have Stripe's 3D Secure import feature |
Off-session charge declined with authentication_required | Expected: reported as RequiresAuthentication; ask the customer to pay the invoice themselves |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/crestapps-orchardcore:orchardcore-paymentsfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job