Permissions & Security
Financial operations require strict least-privilege separation between read-only accountants, operations staff, refund approvers, and gateway administrators.
RBAC Permissions (PaymentsAccess)
Section titled “RBAC Permissions (PaymentsAccess)”| Permission | Capabilities |
|---|---|
payments-view |
Read-only access to Overview, Transactions, Payment Links, Subscriptions, Plans, Invoices, and Webhook logs. |
payments-manage |
Create payment links, manage plans and subscriptions, capture authorizations, and void uncaptured holds. |
payments-refund |
Issue partial or full refunds against settled transactions (separated from general management for dual-control workflows). |
payments-admin |
Full administrative access including configuring gateways, rotating SecretBox credentials, and modifying Settings. |
Credential Security (SecretBox)
Section titled “Credential Security (SecretBox)”Never commit or store raw plaintext gateway secrets. In Setup -> Payments -> Gateways, every secret field supports:
$env:STRIPE_SECRET_KEY(recommended for production containers and CI/CD).$config:myGatewayKey(reads fromsite/config.php).- Encrypted at rest (
enc:v1:...): Automatically sealed withsodium_crypto_secretboxbefore saving to the database and redacted from logs and API responses.
Ledger Integrity & GDPR Compliance
Section titled “Ledger Integrity & GDPR Compliance”- Concurrency & Idempotency: Every mutating financial operation uses
SELECT ... FOR UPDATErow locks and strict idempotency payload fingerprinting. - GDPR Anonymization: Because financial records must often be retained for tax law, Payments implements
contactsParticipant => trueandentriesUserDeleteListener => true. Deleting a Contact or ProcessWire User invokesanonymizeForContact()/anonymizeForUser(), replacing personal identifiers withAnonymized Customerwhile preserving exact monetary totals.