Tutorial: Third-Party Payment Gateway Setup
Role: Journal Manager / Site Administrator
Time: 30โ45 minutes
OJS Version: 3.5+
OJS supports payment collection via its built-in payment framework. Beyond PayPal, you can integrate Stripe (via the Stripe plugin) or build a custom integration.
Before You Startโ
- You have Journal Manager or Site Administrator access in OJS.
- You have a payment gateway account (Stripe, etc.).
- Payments are enabled in OJS Distribution settings.
Option A โ Stripe Payment Pluginโ
Stripe is a popular payment processor with competitive fees and strong global coverage.
Step 1 โ Create a Stripe Accountโ
- Go to stripe.com and create a free account.
- Complete business verification.
- Go to Developers โ API keys.
- Copy your Publishable Key and Secret Key (use Test keys during setup).
Step 2 โ Install the Stripe Pluginโ
- Log in as Site Administrator.
- Go to Administration โ Plugin Gallery.
- Search for Stripe.
- Click Install.
Or download from github.com/pkp/stripe and upload to /plugins/paymethod/stripe/.
Step 3 โ Enable and Configure the Pluginโ
- Go to Settings โ Website โ Plugins โ Installed Plugins.
- Find Stripe Payment and toggle to Enabled.
- Click Settings:
| Field | Value |
|---|---|
| Test mode | Enable during setup |
| Publishable Key | Your Stripe publishable key |
| Secret Key | Your Stripe secret key |
- Click Save.
Step 4 โ Enable Payments in Distribution Settingsโ
- Go to Settings โ Distribution โ Payments.
- Toggle Payments to Enabled.
- Set the currency and define APC / subscription amounts.
- Click Save.
Step 5 โ Test the Paymentโ
- Submit a test article as an author.
- At the payment step, enter a Stripe test card:
4242 4242 4242 4242(any future expiry, any CVC). - Confirm the payment is recorded.
- Check the Stripe dashboard for the test transaction.
- When confirmed, switch to live keys and disable test mode.
Option B โ Custom Payment Integrationโ
If your preferred gateway is not supported by an existing plugin, a developer can build a custom OJS payment plugin:
- Follow the PKP Plugin Development Guide.
- Extend the
PaymethodPluginclass in OJS. - Implement the gateway's API calls in the payment processing methods.
- Install the plugin on your OJS server.
Contact PKP Services for custom payment plugin development.
Option C โ Manual Payment Collectionโ
For low-volume journals, a manual workflow is an alternative:
- Disable automatic payment in OJS.
- Add payment instructions to your submission confirmation email template.
- Collect payments via bank transfer, PayPal invoice, or other means.
- Manually mark submissions as "paid" in the OJS submission record.
Troubleshootingโ
| Problem | Solution |
|---|---|
| Stripe plugin not found | Install manually from the GitHub repository |
| Test card rejected | Ensure test mode is enabled and using Stripe test keys |
| Payment not recorded in OJS | Check OJS error logs; verify the webhook or callback URL is reachable |
| Currency not supported | Check the gateway's supported currencies and match OJS currency setting |
Next Stepsโ
- PayPal Payment Gateway Setup โ configure PayPal specifically
- Distribution & Access Settings โ manage fees and access control
- Subscription Manager Role โ manage subscriptions