Payment Gateway
First-Pass Node Dossier
This page is an evidence-backed node dossier generated from the domain hierarchy and node questionnaire.
What It Is
PaymentGateway is the configuration record that tells Pyle how a payment provider behaves for checkout, refunds, saved cards, and invoice-related operations.
Parent hierarchy:
Payments & BillingGateway Configuration And Checkout EntryPayment Gateway
Primary implementation paths:
packages/framework/src/Models/PaymentGateway.phppackages/framework/src/Http/Controllers/Api/Admin/PaymentGatewaysController.phppackages/framework/src/Actions/Stripepackages/framework/src/Http/Controllers/PaymentGateway/Stripe
What Users Can Do With It
Direct capabilities
Operators can:
- list, create, show, update, and delete payment gateways through the admin API
- configure whether a gateway allows refunds, partial refunds, saved cards, or invoice sending
- associate orders and customers with a gateway indirectly through payment or card-session flows
Indirect capabilities
Other workflows use PaymentGateway to:
- generate Stripe checkout sessions for orders
- generate Stripe card-session URLs for customers
- create or sync order payments
- create gateway-specific refunds
Things users cannot do directly
This pass did not find a packaged admin Livewire page dedicated to gateway management. The shared package exposes gateway configuration mainly through API surfaces and downstream host-app settings screens.
Where It Is Managed
| Channel | Role | Notes |
|---|---|---|
| Admin payment-gateways API | Direct | Main packaged CRUD surface |
| Order checkout and payment flows | Indirect | Gateways are selected or used through order actions |
| Customer card-session flows | Indirect | Saved-card onboarding depends on gateway support |
| Storefront payment methods | Indirect | Shopper card management only exists for gateway-backed cards |
Sources:
packages/framework/src/Http/Controllers/Api/Admin/PaymentGatewaysController.phppackages/framework/src/Models/PaymentGateway.phppackages/framework/src/Actions/Stripe/CreateStripeCheckout.phppackages/framework/src/Actions/Stripe/CreateStripeCustomerCardSession.php
Channel-Level Field Coverage
Admin create and update flow
The packaged admin controller validates:
nametypeurlpublic_keysecret_key
The model also persists broader gateway fields such as:
endpoint_urlscript_urlstore_idcheckout_idsandboxallow_refundallow_partial_refundallow_saved_cardallow_send_invoicesynced_at
Sources:
packages/framework/src/Http/Controllers/Api/Admin/PaymentGatewaysController.phppackages/framework/src/Models/PaymentGateway.php
Configuration And Data Model
Key model characteristics:
- soft-deletable
- UUID-based
- activity-logged
- hides secret and provider-only credential fields in serialized output
Important relationships:
orders()customers()
Source:
packages/framework/src/Models/PaymentGateway.php
Relationships
PaymentGateway directly connects:
- checkout creation
- customer saved-card enrollment
- order payment records
- refund capability rules
Practical dependents:
- Stripe checkout redirect flows
- admin order payment creation
- customer card sync
- refund automation
Rules And Downstream Effects
Gateway-type implementation gap
The shared package payment actions support multiple gateway types such as stripe, manual, credit_line, and shopify, but the packaged admin gateway CRUD currently validates type as stripe only.
Sources:
packages/framework/src/Http/Controllers/Api/Admin/PaymentGatewaysController.phppackages/framework/src/Actions/PaymentGateway/Manual/CreateOrderPayment.phppackages/framework/src/Actions/PaymentGateway/CreditLine/CreateOrderPayment.phppackages/framework/src/Models/OrderRefund.php
Stripe key validation
When a Stripe gateway is retrieved, the shared package validates that the configured public and secret keys match the current environment expectations.
Sources:
packages/framework/src/Models/PaymentGateway.phppackages/framework/src/Support/StripeEnvironmentKeyValidator.php
Stripe-only customer-card support
Customer-card session creation and customer lookup are implemented only for Stripe in the shared package.
Sources:
packages/framework/src/Models/PaymentGateway.phppackages/framework/src/Actions/Stripe/CreateStripeCustomer.phppackages/framework/src/Actions/Stripe/CreateStripeCustomerCardSession.php
Integrations And Automation
Checkout and saved-card flows
Payment gateways are the entry point for:
- Stripe checkout sessions
- Stripe customer creation
- Stripe saved-card session URLs
Sources:
packages/framework/src/Actions/Stripe/CreateStripeCheckout.phppackages/framework/src/Actions/Stripe/CreateStripeCustomer.phppackages/framework/src/Actions/Stripe/CreateStripeCustomerCardSession.php
Refund and payment syncing
Gateways drive:
- gateway-specific refund creation
- payment import and sync
- customer-card synchronization after checkout
Sources:
packages/framework/src/Actions/Stripe/CreateStripeOrderPaymentRefund.phppackages/framework/src/Actions/Stripe/ImportStripePaymentIntentToOrderPayment.phppackages/framework/src/Actions/Stripe/SyncStripeCheckoutToOrderPayment.php
Where It Appears To End Users
PaymentGateway is mostly an internal operator configuration concept.
Customers experience it indirectly through:
- checkout redirects
- saved-card management
- refund behavior
Operators encounter it through setup work and order-payment workflows rather than a packaged shared management page.
Current Documentation Takeaways
PaymentGatewayis the capability switchboard for checkout, refunds, saved cards, and invoice-related behavior.- The shared package model and actions support more gateway types than the packaged admin CRUD currently exposes.
- Gateway configuration is not a shopper concept, but it strongly shapes what payment and billing workflows can exist.
Open Questions
- This first pass did not inspect host-app gateway-management screens that may wrap the shared admin API.