Snippe Payments for WooCommerce
Accept payments on your WordPress site in minutes. Add Snippe payment buttons, embed payment pages, and generate shareable checkout links your customers can pay from Mobile Money, bank, or card.
by Snippe · github.com/neurotech-hq/snippe-wordpress-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/neurotech-hq/snippe-wordpress-plugin/archive/refs/heads/main.zipSnippe Payment Gateway for WooCommerce
Accept payments seamlessly in your WooCommerce store using Snippe - supporting Mobile Money, Card, and QR Code payments.
Description
The Snippe Payment Gateway plugin enables you to accept payments through multiple payment methods including:
- Mobile Money: USSD push notifications for instant mobile money payments
- Card Payments: Secure credit/debit card processing
- QR Code: Dynamic QR codes for quick payments
Features
- Multiple payment methods (Mobile Money, Card, QR Code)
- Automatic payment status updates via webhooks
- Test and live mode support
- Comprehensive logging for debugging
- Customer choice of payment method at checkout
- Secure API integration with Snippe
- Order metadata tracking
- Idempotency support to prevent duplicate payments
- WooCommerce HPOS (High-Performance Order Storage) compatible
- WordPress multisite compatible
Requirements
- WordPress 5.8 or higher
- WooCommerce 6.0 or higher
- PHP 7.4 or higher
- SSL certificate (HTTPS) for production
- Snippe merchant account (Sign up here)
Installation
- Download the plugin ZIP file
- Go to WordPress Admin > Plugins > Add New
- Click "Upload Plugin" and select the ZIP file
- Click "Install Now" and then "Activate"
- Go to WooCommerce > Settings > Payments
- Click on "Snippe" to configure
Configuration
1. Get Your API Keys
- Log in to your Snippe Dashboard
- Navigate to Settings > API Keys
- Copy your API key
- Copy your Webhook Secret (optional, used to verify webhook signatures)
2. Configure the Plugin
-
Go to WooCommerce > Settings > Payments > Snippe
-
Enable the payment gateway
-
Configure the following settings:
- Title: Display name at checkout (default: "Mobile Money / Card / QR Payment")
- Description: Payment method description for customers
- Live API Key: Your Snippe production API key
- Webhook Secret: Secret used to verify incoming webhook notifications (optional)
- Default Payment Type: Choose default payment method or let customers choose
- Order Status after Payment: Choose the default order status after payment either processing or completed
- Order Prefix: Prefix for order references sent to Snippe (default: "WC-")
- Enable Logging: Enable for debugging (logs saved in WooCommerce > Status > Logs) (disable in live environment)
-
Save changes
Webhooks
The webhook URL is automatically included in every payment request sent to Snippe. There is no need to configure a webhook URL on the Snippe dashboard.
If you have a webhook secret configured in your Snippe account, enter it in the Webhook Secret field so the plugin can verify that incoming notifications are genuinely from Snippe.
Important: Classic Checkout Required (Versions Below 1.2.0)
Versions below 1.2.0 do not support WooCommerce’s block-based checkout (the default in newer versions). To use the plugin, replace the block-based checkout on your checkout page with the classic shortcode:
[woocommerce_checkout]
From version 1.2.0 onwards, no additional configuration is required. The plugin is fully compatible with WooCommerce, including the block-based checkout.
Usage
For Customers
Mobile Money Payment
- Select "Snippe" as the payment method at checkout
- Enter your mobile money phone number
- Place the order
- Receive a USSD prompt on your phone
- Enter your PIN to complete payment
Card Payment
- Select "Snippe" as the payment method at checkout
- Choose "Credit/Debit Card" (if customer choice is enabled)
- Place the order
- You will be redirected to a secure payment page
- Enter card details to complete payment
QR Code Payment
- Select "Snippe" as the payment method at checkout
- Choose "QR Code" (if customer choice is enabled)
- Place the order
- Scan the QR code with your mobile banking app
- Approve payment to complete
For Store Owners
View Payment Details
Payment details are displayed in the order admin page:
- Payment Reference
- Payment Type
- External Reference (from payment provider)
- Channel Information (provider, type)
- Settlement Information (gross, fees, net)
Order Statuses
- Awaiting Snippe Payment: Payment initiated, waiting for confirmation
- Processing: Payment completed successfully
- Failed: Payment failed
- Cancelled: Payment expired or voided
View Logs
Enable logging in settings to view detailed API logs:
- Go to WooCommerce > Status > Logs
- Select the log file starting with "snippe-payment-gateway"
Sensitive data (phone numbers, emails) is automatically redacted in logs.
Testing
Snippe currently does not support sandbox mode. Disable test mode and use your live API key for real transactions.
Webhook Events
The plugin handles the following webhook events automatically:
| Event | Order Status | Description |
|---|---|---|
payment.completed |
Processing | Payment successful, stock reduced |
payment.failed |
Failed | Payment failed with reason |
payment.expired |
Cancelled | Payment expired |
payment.voided |
Cancelled | Payment voided/cancelled |
Supported Currencies
- TZS (Tanzanian Shilling)
Phone Number Formats
The plugin accepts phone numbers in multiple formats and normalizes them automatically:
0782123456(local format, converted to255782123456)255782123456(international format)+255782123456(with plus prefix)
Troubleshooting
Payment Not Completing
- Enable logging in plugin settings
- Check WooCommerce logs (WooCommerce > Status > Logs)
- Verify API keys are correct
- Check order notes for error messages
Webhook Issues
- Ensure your site is accessible over HTTPS
- Check server firewall allows incoming POST requests
- If using a webhook secret, verify it matches your Snippe account
- Enable logging and check logs for webhook attempts
Phone Number Validation Error
Ensure the phone number is between 9 and 15 digits. The plugin accepts local format (e.g., 0782123456) and international format (e.g., 255782123456).
API Connection Errors
- Verify your server can make outbound HTTPS connections
- Check if a firewall is blocking requests to
api.snippe.sh - Verify API keys are valid and not expired
Security
- All API communications use HTTPS
- API keys are stored securely in the WordPress database
- Webhook signatures are verified using HMAC SHA256 (when a webhook secret is configured, requests without a valid signature are rejected)
- Idempotency keys prevent duplicate payments
- Sensitive customer data is redacted in logs
Support
- Email: info@ghala.io
- Documentation: https://docs.snippe.sh
License
This plugin is licensed under MIT