Skip to main content
This page provides production-ready code examples and snippets to accelerate your OwnPay integration.

Creating a Payment Intent

Initiate a checkout session by calling POST /payments to retrieve a checkout_url. Redirect your customers to this URL to complete payment.

Webhook Signature Verification

To ensure webhook events originate from your trusted OwnPay instance, always verify the X-OwnPay-Signature header against your Webhook Secret before acting on them.

Querying Transaction Status

To avoid relying strictly on webhooks, query the status endpoint directly when a customer lands back on your redirection page.
PHP

Extension Hooks (Plugin Development)

OwnPay plugins tap into the core lifecycle event loop using action filters and listeners.

Custom Payment Fee Filter

You can modify transaction amounts dynamically based on payment parameters.
PHP

Event Action Listeners

Execute background actions (such as email receipt triggers) when payments succeed.
PHP
Last modified on July 15, 2026