Integration boundary
plugins.payment URL configuration at /payment/. Plugin metadata also contributes the Payment Processing settings tab and marks purchases and settings pages as staff-only.
Main models
PaymentSettingsandTaxSettings: legacy-compatible business payment and tax configuration.GatewayAccount: encrypted provider credentials, provider/country data, capabilities, and validation state.PaymentRoute: ordered mapping from a business and currency to an enabled, verified gateway account.CartandOrder: pending line items and immutable completed purchase records.PaymentandRefund: transaction and refund records.CheckoutAttempt: server-side amount, currency, customer/guest, provider IDs, policy versions, and checkout lifecycle state.ProviderEvent: webhook payload audit and provider-event deduplication.RefundAttempt: idempotent provider refund lifecycle.MerchantLegalProfile: seller disclosures and versioned terms, privacy, refund, and withdrawal links.ProfilePaymentDataandCard: optional saved-payment metadata retained for compatible flows.
Provider routing
The routing layer normalizes provider and currency names, validates account capabilities, and refuses unsupported combinations. New integrations should use gateway accounts and payment routes. The legacy one-provider-per-business settings remain as a compatibility path with conservative USD/KRW rules.Important routes
/payment/checkout/: checkout for staff, customers, or guests depending on request context./payment/purchases/: staff purchase history./payment/settings/: staff provider and payment settings./payment/payment-refund/: refund requests./payment/stripe-intent/: Stripe intent creation/confirmation flow./payment/webhooks/stripe/,/payment/webhooks/paypal/,/payment/webhooks/portone/: signed/asynchronously retried provider events./payment/ajax/...: cart creation, counts, deletion, and quantity updates.
ProviderEvent prevents the same provider event from being applied more than once.