Integrate the OwnPay API in 5 minutes. Assumes you have an OwnPay instance running and admin access to generate API keys.
Step 1: Generate your API key
- Log in to your OwnPay admin panel
- Go to Developers > Developer Hub
- Click Generate API Key
- Choose Full Access (or Read-Only for testing)
- Copy both the Public Key and Secret Key
Your keys look like:
Never commit API keys to git. Use environment variables instead.
Step 2: Choose your SDK
Step 3: Create your first payment
After creating a payment, you get back:
The checkout_url is where your customer makes the payment.
Step 4: Handle webhooks
When your customer completes a payment, OwnPay sends a webhook to your endpoint.
- Go to Developers > Webhook Settings
- Enter your endpoint URL:
https://yourapp.com/webhooks/ownpay
- Copy the Webhook Signing Secret
- Click Save
Verify webhook signatures
PHP:
Node.js:
Step 5: Test your integration
Test mode
- In your admin panel, go to Gateways
- Set the gateway to Test Mode
- Use test card numbers:
API quick reference
Next steps