Back to Documentation | Back to Main README
GembaPay for WooCommerce is a unified payment gateway enabling merchants to accept credit card (Stripe) and PayPal payments through a single integration.
Version: 1.1.0
License: GPL v2 or later
Requires WordPress: 5.8+
Requires WooCommerce: 5.0+
Requires PHP: 7.4+
Triple Payment System
| Method | Settlement | Fees |
|---|---|---|
| Stripe (Cards, Apple Pay, Google Pay) | Stripe account | 1% GembaPay + Stripe fees |
| PayPal (Balance, Bank, Pay Later) | PayPal account | 1% GembaPay + PayPal fees |
Key Benefits
- Unified checkout for all payment methods
- 51+ fiat currencies supported
- Real-time exchange rates for multi-currency pricing
- Instant settlement
- Secure hosted payment page
- Download the plugin zip file
- Navigate to WordPress Admin → Plugins → Add New
- Click "Upload Plugin"
- Select the zip file and click "Install Now"
- Click "Activate Plugin"
# Upload to plugins directory
cd /var/www/html/your-site/wp-content/plugins/
unzip gembapay-woocommerce.zipwp plugin install /path/to/gembapay-woocommerce.zip --activatewp plugin list | grep gembapay
# Expected: gembapay-woocommerce active none 1.1.0Navigate to: WooCommerce → Settings → Payments → GembaPay
| Setting | Description | Example |
|---|---|---|
| Enable/Disable | Activate the payment gateway | Checked |
| Title | Payment method name at checkout | Pay with Card or PayPal |
| Description | Customer-facing description | Secure payment by card or PayPal |
| API URL | GembaPay API endpoint | https://api.gembapay.com |
| API Key | Your merchant API key | gembapay_live_xxxx... |
| Webhook Secret | Secret for signature verification | your_webhook_secret |
- Login to Merchant Dashboard: https://merchant-dashboard.gembapay.com
- Navigate to Settings → API Keys
- Click "Create New Key"
- Copy the key (shown only once)
- Paste in plugin settings
In the GembaPay Merchant Dashboard:
- Stripe: Complete Stripe Connect onboarding
- PayPal: Complete PayPal Commerce Platform onboarding
1. WooCommerce Checkout
└─► Customer fills shipping/billing info
└─► Selects "Pay with Card or PayPal"
└─► Clicks "Place Order"
2. Redirect to GembaPay
└─► Secure hosted payment page
└─► Customer chooses payment method
3. Payment Processing
├─► Stripe: Enter card details, confirm
├─► PayPal: Login and approve
4. Confirmation
└─► Webhook sent to WooCommerce
└─► Order status → "Processing"
└─► Customer redirected to thank you page
WooCommerce ──► GembaPay API ──► Payment Page
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
Stripe PayPal
│ │ │
└─────────────┼─────────────┘
│
▼
Webhook Handler
│
▼
Order Updated
Register this URL in your GembaPay Merchant Dashboard:
https://your-store.com/wp-json/gembapay/v1/webhook
Stripe Payment:
{
"event": "payment.completed",
"payment": {
"id": "uuid",
"orderId": "WC-101-def456",
"reference": "pi_...",
"usdAmount": 108.70,
"network": "stripe"
},
"timestamp": "2026-01-22T12:00:00.000Z"
}PayPal Payment:
{
"event": "payment.completed",
"payment": {
"id": "uuid",
"orderId": "WC-102-ghi789",
"reference": "5GP...",
"usdAmount": 108.70,
"network": "paypal"
},
"timestamp": "2026-01-22T12:00:00.000Z"
}The plugin verifies webhook signatures using HMAC-SHA256 as bare hex (no sha256= prefix),
computed over the raw request body — matching GembaPay's signing exactly:
$rawBody = $request->get_body(); // raw bytes, not a re-encode
$expected = hash_hmac('sha256', $rawBody, $webhook_secret); // bare hex
if (!hash_equals($expected, (string) $signature)) {
return new WP_REST_Response(['error' => 'Invalid signature'], 401);
}| Meta Key | Description |
|---|---|
| _gembapay_order_id | GembaPay order identifier |
| _gembapay_reference | Provider payment reference |
| _gembapay_network | Payment provider (stripe/paypal) |
| _gembapay_payment_provider | Provider type (stripe/paypal) |
| _gembapay_amount | USD amount |
| GembaPay Event | WooCommerce Status |
|---|---|
| Payment Created | Pending Payment |
| payment.completed | Processing |
| payment.failed | Failed |
Payment details are displayed in the order admin page with:
- Provider type (Stripe/PayPal)
- Network/Method used
- USD amount
| Issue | Cause | Solution |
|---|---|---|
| "No API key" | API key not configured | Add API key in plugin settings |
| 404 on webhook | REST API disabled | Flush permalinks (Settings → Permalinks → Save) |
| Order not updating | Webhook not received | Verify webhook URL in GembaPay dashboard |
| "Invalid signature" | Wrong webhook secret | Ensure secret matches in both places |
| Payment method missing | Provider not connected | Connect provider in GembaPay Dashboard |
Enable WordPress debug logging:
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);View logs:
tail -f /var/www/html/wp-content/debug.log | grep GembaPay# Check if plugin is active
wp plugin list | grep gembapay
# Check webhook endpoint
curl -I https://your-store.com/wp-json/gembapay/v1/webhook
# Should return 200 or 401 (not 404)add_filter('woocommerce_gateway_title', function($title, $gateway_id) {
if ($gateway_id === 'gembapay') {
return 'Card or PayPal';
}
return $title;
}, 10, 2);add_action('gembapay_payment_completed', function($order, $payment_data) {
$network = $payment_data['network'] ?? 'unknown';
$order->add_order_note(
sprintf('Payment received via %s', ucfirst($network))
);
}, 10, 2);- Documentation: https://gembapay.com/docs
- Contact: https://gembapay.com/contact