NectarPress Integrations Guide¶
All integrations are optional. Configure only the ones you use — NectarPress only loads scripts for configured integrations and only emits
preconnecthints for origins you've actually enabled.
Khalti Payment Gateway¶
Khalti is Nepal's most widely used digital payment platform. NectarPress uses Khalti for both reader subscriptions (Flow B) and as a payment option for agency customers (Flow A).
Setup¶
- Register a merchant account at khalti.com
- Go to your Khalti merchant dashboard → API Keys
- Copy your Live Public Key (starts with
live_public_key_) and Live Secret Key - In WordPress: NectarPress → Payments → Khalti Settings
- Paste the keys and save
- Set your Return URL in Khalti's dashboard to exactly:
https://yourdomain.com/np-payment/khalti/return/
Critical: NectarPress always calls Khalti's /lookup/ endpoint on the return URL to verify payment server-side. Never trust the redirect parameters alone — they can be forged.
Testing¶
Use Khalti's sandbox keys (test_public_key_...) for development: - Test eSewa number: 9800000000 (use the Khalti test portal) - All sandbox transactions show in your Khalti test dashboard
Troubleshooting¶
See troubleshooting.md — Khalti payment not completing.
Bank Deposit (Manual Verification)¶
For customers who prefer traditional bank transfers.
Setup¶
- NectarPress → Payments → Bank Deposit Settings
- Enter your bank account details:
- Bank Name
- Account Number
- Account Name
- Bank Address (optional)
- Upload a QR code for your bank's quick-pay option (optional)
- Set the verification deadline: default 72 hours. Orders auto-cancel after this window if not verified.
Workflow¶
- Customer selects "Bank Deposit" at checkout
- NectarPress shows payment instructions with your account details
- Customer transfers money and uploads a deposit slip screenshot
- Admin receives notification at NectarPress → Orders → Pending Verification
- Admin verifies the slip and marks as Paid or Rejected
- Customer's membership activates immediately on approval
QR Payment (Fonepay / Connect IPS)¶
For quick QR-based payments common in Nepal.
Setup¶
- NectarPress → Payments → QR Payment Settings
- Upload your Fonepay or Connect IPS merchant QR code image
- Set the QR validity period (default: 15 minutes per transaction)
Workflow¶
Similar to bank deposit — customer scans QR, pays, uploads confirmation screenshot, admin verifies.
Google Analytics 4¶
Setup¶
- Create a GA4 property at analytics.google.com
- Get your Measurement ID (format:
G-XXXXXXXXXX) - NectarPress → Integrations → Google Analytics → paste ID → Save
NectarPress loads GA4 lazily after first user interaction. Sessions are attributed correctly because the interaction event fires the analytics load before any navigation.
Privacy compliance¶
NectarPress does not set GA4 cookies before user consent. If you need a cookie consent banner (required by GDPR), use one of these compatible plugins: - Cookie Yes - Complianz - CookieBot
When using a consent management platform, disable NectarPress's built-in GA4 loading and load GA4 from the CMP instead.
Google Tag Manager¶
Setup¶
- Create a GTM container at tagmanager.google.com
- Get your Container ID (format:
GTM-XXXXXXX) - NectarPress → Integrations → Google Tag Manager → paste ID → Save
Note: If both GTM and GA4 IDs are set, only GTM loads — GA4 should be configured inside GTM as a tag.
Facebook Pixel¶
Setup¶
- Get your Pixel ID from business.facebook.com → Events Manager
- NectarPress → Integrations → Facebook Pixel → paste 15-digit Pixel ID → Save
NectarPress fires PageView on every page. For purchase tracking (when a subscription activates), the Purchase event is fired automatically with subscription plan value.
Disqus Comments¶
Setup¶
- Create a Disqus account and site at disqus.com
- Get your shortname from Disqus → Site Settings → General
- NectarPress → Integrations → Disqus → enter shortname → Save
This replaces WordPress's native comments on all posts. The native comment template is preserved as a fallback if Disqus fails to load.
Mailchimp Newsletter¶
Setup¶
- Generate a Mailchimp API key at mailchimp.com → Account → Extras → API Keys
- Get your List/Audience ID from Mailchimp → Audience → Settings → Audience name and defaults
- NectarPress → Integrations → Mailchimp → paste API key + List ID → Save
Newsletter widget¶
After setup, a "Subscribe to Our Newsletter" widget is available in Appearance → Widgets. It submits email addresses directly to your Mailchimp audience via the API (no redirect required).
Push Notifications (FCM / OneSignal)¶
NectarPress can send push notifications when breaking news is published.
FCM (Firebase Cloud Messaging) Setup¶
- Create a Firebase project at firebase.google.com
- Enable Cloud Messaging
- Get your Server Key from Firebase console → Project Settings → Cloud Messaging
- NectarPress → Integrations → Push Notifications → FCM → paste Server Key
FCM integration sends push notifications when a post is published with the "Breaking News" workflow flag.
OneSignal Setup¶
- Create an account at onesignal.com
- Get your App ID and REST API Key
- NectarPress → Integrations → Push Notifications → OneSignal → paste credentials
SMTP (Transactional Email)¶
WordPress's default PHP mail is unreliable. Configure an SMTP provider for editorial notifications, password resets, and subscriber emails.
| Provider | Free tier | Nepali IP reputation |
|---|---|---|
| Brevo (formerly Sendinblue) | 300/day | Good |
| SendGrid | 100/day | Good |
| Mailgun | 1,000/month | Good |
| Postmark | 100/month | Excellent |
Setup via WP Mail SMTP Plugin¶
NectarPress works with WP Mail SMTP — configure your provider there. NectarPress uses WordPress's wp_mail() function for all emails, so it benefits automatically from WP Mail SMTP.
Newsroom Webhook (Slack / Viber / Telegram)¶
NectarPress can POST JSON to any webhook URL when editorial events occur (story approved, workflow override, correction filed).
Setup¶
- NectarPress → Newsroom → Notifications → Webhook URL → paste your webhook URL
- Test: click "Send Test Notification"
Payload format:
{
"event": "workflow_approved",
"post_id": 1234,
"post_title": "New bill passed in parliament",
"actor": "demo_editor1",
"from_state": "editor_review",
"to_state": "approved",
"timestamp": "2026-05-22T10:30:00+05:45",
"url": "https://yoursite.com/?p=1234"
}
Slack¶
Create an Incoming Webhook at your Slack workspace → Apps → Incoming Webhooks. Paste the https://hooks.slack.com/services/... URL in NectarPress.
Telegram¶
Use a Telegram Bot + https://api.telegram.org/bot<TOKEN>/sendMessage with a middleware script to convert the NectarPress JSON payload to Telegram's format. (A lightweight middleware script is available in our GitHub repository under docs/recipes/telegram-webhook.php.)