Paddle Driver (PaymentsPaddle)
PaymentsPaddle (trk/processwire-payments-paddle, v0.1.0) is the official Paddle Billing v2 Merchant of Record (MoR) driver for Payments. It registers lazily via 'paymentsDriver' => true with driver key paddle.
Repository: github.com/trk/PaymentsPaddle
Installation
Section titled “Installation”composer require trk/processwire-payments-paddlephp vendor/bin/wire module:install PaymentsPaddle --jsonConfigure an instance in Setup -> Payments -> Gateways by selecting Paddle (Merchant of Record).
Configuration Schema (SecretBox)
Section titled “Configuration Schema (SecretBox)”| Setting Key | Required | Recommended Storage | Purpose |
|---|---|---|---|
api_key |
Yes | $env:PADDLE_API_KEY |
Paddle Billing v2 Bearer API key (PaddleHttpClient routes live api.paddle.com vs. sandbox sandbox-api.paddle.com with Paddle-Version: 1). |
client_side_token |
Optional | Plaintext or $env: |
Token for Paddle.js overlay checkout. |
webhook_secret |
Yes (Live) | $env:PADDLE_WEBHOOK_SECRET |
Notification secret (pdl_ntfset_...) verified by PaddleSignatureVerifier. |
default_tax_category |
Optional | e.g., standard or saas |
Default Paddle tax category for dynamically priced transactions. |
default_checkout_url |
Optional | HTTPS URL | Default hosted checkout return URL. |
Capabilities & Merchant of Record Semantics
Section titled “Capabilities & Merchant of Record Semantics”Totoglu\PaymentsPaddle\PaddleGateway implements PaymentGatewayInterface, SubscriptionGatewayInterface, QuantitySubscriptionGatewayInterface, MeteredSubscriptionGatewayInterface, WebhookGatewayInterface, InvoiceGatewayInterface, and TransactionStatusGatewayInterface.
- Merchant of Record (
isMerchantOfRecord = true): Paddle calculates global VAT/sales tax (handlesTaxCalculation), issues legal tax invoices (handlesInvoicing, resolved viaGET /transactions/{id}/invoice), and handles buyer currency conversion (handlesCurrencyConversion). - Checkout & Refunds: Creates hosted/overlay transactions via
POST /transactionsand issues full or partial refunds viaPOST /adjustmentsdistributed acrossdetails.line_items. Because MoR transactions settle directly, separate manualcapture()andvoid()throwWireExceptionby design. - Subscriptions & Metered Charges: Supports
switchPlan()andupdateSubscriptionQuantity()(PATCH /subscriptions/{id}),pauseSubscription(),resumeSubscription(),cancelSubscription(),reactivateSubscription()(clearingscheduled_change),customerPortalUrl()(POST /customers/{id}/portal-sessions), andreportUsage()(POST /subscriptions/{id}/chargeusingmeter_price_map).
Webhook Verification (Paddle-Signature)
Section titled “Webhook Verification (Paddle-Signature)”PaddleSignatureVerifier validates the Paddle-Signature header timestamp tolerance (DEFAULT_TOLERANCE_SECONDS = 300) and HMAC-SHA256 digests in constant time, supporting rotated secrets.