OwnPay is an open-source project built in the open, for the community. Whether you’re fixing a typo in the docs, adding a payment gateway for a regional market, writing tests for an edge case, or translating the admin panel to a new language — every contribution moves the project forward. This guide explains how to get involved effectively.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/own-pay/OwnPay-Documentation/llms.txt
Use this file to discover all available pages before exploring further.
This project is governed by a Code of Conduct. Report unacceptable behavior to ping@ownpay.org.
Ways to Contribute
Report Bugs
Open a clear, reproducible issue with the exact error, steps to reproduce, and your PHP version. Payment bugs should include relevant transaction IDs and log excerpts (sanitized).
Suggest Features
Start a GitHub Discussion or feature request issue. Describe the use case, not just the solution — this helps maintainers design the right API.
Build a Gateway or Plugin
Add a payment gateway adapter or addon for a provider or region that isn’t covered yet. Gateway plugins are the highest-impact contribution area.
Translate
Add or improve a language catalog. See TRANSLATIONS.md for the dot-notation JSON format.
Improve Documentation
Fix typos, expand examples, clarify guides, or add missing edge cases. Documentation PRs get reviewed quickly.
Write Code
Fix bugs, add tests, or refactor with care. Keep PRs focused on one logical change so reviews are fast.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| PHP | 8.3+ | With bcmath, json, mbstring, openssl, pdo_mysql, curl |
| Composer | 2.x | PHP dependency manager |
| MySQL or MariaDB | MySQL 8.0+ / MariaDB 10.4+ | Database |
| Git | Any recent version | For branching and commits |
| Node.js | 20+ (optional) | Only needed for JS/CSS linting |
Getting Set Up
Follow Local Setup
See the Local Setup guide to get a running instance in about 2 minutes. The quick path uses PHP’s built-in web server.
Development Workflow
Make Focused Changes
Keep each branch to one logical change. If you’re adding a gateway and fixing a bug, make two separate PRs.
Add or Update Tests
Add PHPUnit tests for any behavior you change or add. Untested code is harder to review and more likely to regress.
Commit with DCO Sign-Off
Use the This appends
-s flag to append a Developer Certificate of Origin trailer:Signed-off-by: Your Name <your.email@example.com> to the commit.Coding Standards
OwnPay maintains a high quality bar. Match the existing code style and these non-negotiable rules:Strict Types and PHPStan
Strict Types and PHPStan
Every PHP file starts with
declare(strict_types=1); as its first statement (no BOM). PHPStan level 9 must stay green. Do not suppress errors with @phpstan-ignore or baselines — fix the root cause.Money is Always bcmath Strings
Money is Always bcmath Strings
All financial arithmetic uses PHP’s
bcmath extension with string operands. Never use floats for money calculations — floating-point representation errors will corrupt ledger entries.Tenant Scoping is Mandatory
Tenant Scoping is Mandatory
Never run a scoped query without
forTenant($merchantId) or a deliberate forAllTenants(). Missing the tenant scope causes data bleed between brands.URL Building via DomainUrlService
URL Building via DomainUrlService
Always build checkout, callback, and redirect URLs through
DomainUrlService::buildCheckoutUrl() and DomainUrlService::buildCallbackUrl(). Hardcoding a host breaks white-label custom domains.Prepared Statements Only
Prepared Statements Only
No string-interpolated SQL under any circumstances. Use the
Database wrapper with parameter binding for every query.Twig Autoescaping Always On
Twig Autoescaping Always On
Never use
|raw on untrusted data. Twig’s autoescaping must remain enabled. Write trusted static strings with |raw only when absolutely necessary and clearly documented.Minimal Dependencies
Minimal Dependencies
No new heavyweight dependencies without discussion. Prefer the existing first-party utilities. Add a dependency only when there is a clear, well-scoped reason.
Contributing a Payment Gateway
Gateways are the most impactful contributions because each one expands OwnPay’s reach to new markets.Implement the Adapter
Implement
OwnPay\Gateway\GatewayAdapterInterface. Use the GatewayDefaults trait to provide no-op defaults so you only implement what the gateway actually supports:Respect Sandbox Rules
Plugins are scanned before loading. Do not use
exec, shell_exec, passthru, eval, raw PDO, or reflection inside plugin code.Contributing Translations
OwnPay supports full i18n for both the admin panel and customer checkout. To add or update a language:- Create a dot-notation JSON catalog (e.g.,
config/languages/de.json). - Keep
:placeholdersyntax intact (Thank you, :namenotThank you, {name}). - Follow the full instructions in TRANSLATIONS.md.
Pull Request Guidelines
- One logical change per PR. Split large work into reviewable pieces.
- Fill out the description — what changed, why, and how to test it.
- Link the issue — use
Closes #123to auto-close on merge. - Update docs and tests alongside code.
- Be responsive — maintainers review with care because this is payment software.
- All CI checks must be green before requesting review.