Pivot Payment Gateway for WooCommerce
Official plugin to integrate Pivot payment methods into WooCommerce. This plugin allows merchants to accept payments via Pivot using hosted Payment UI redirection.
📋 Table of Contents
System Requirements
Installation
Configuration
How to Use
Advanced Settings
Testing
Troubleshooting
FAQ
Support
🔧 System Requirements
Before installing the plugin, make sure your system meets the following requirements:
WordPress: Version 6.0 or higher
WooCommerce: Version 7.0 or higher (tested up to version 9.0)
PHP: Version 7.4 or higher
Pivot Account: Valid Merchant ID and Merchant Secret from Pivot
SSL Certificate: Required for transaction security (HTTPS)
📦 Installation
Method 1: Upload via WordPress Admin
Log in to the WordPress Admin Dashboard
Navigate to Plugins → Add New
Click Upload Plugin
Select the plugin ZIP file
pivot-payment-gateway.zip[download here]Click Install Now
After installation completes, click Activate Plugin
Method 2: Upload via FTP
Extract the plugin ZIP file [download here]
Upload the
pivot-payment-gatewayfolder to the/wp-content/plugins/directoryLog in to the WordPress Admin Dashboard
Navigate to Plugins
Activate the Pivot Payment Gateway for WooCommerce plugin
⚙️ Configuration
Step 1: Enable the Payment Gateway
Log in to the WordPress Admin Dashboard
Navigate to WooCommerce → Settings → Payments
Find Pivot in the list of payment methods
Click Manage or Set up
Check the Enable Pivot Payment checkbox
Click Save changes
Step 2: Basic Configuration
1. Title & Description
Title: Payment method name displayed at checkout (default: "Pivot Payment")
Description: Description shown to customers on the checkout page
2. Test Mode
Enable Test Mode: Enable for testing in the sandbox environment
Check to use the Sandbox API
Uncheck to use the Live API (production)
3. API Configuration
Sandbox API Base URL (for testing): https://sandbox-api.pivot-payments.com
Live API Base URL (for production): https://api.pivot-payments.com
4. Credentials
Merchant ID:
Obtain from your Pivot dashboard
Used to generate access tokens
Format: Alphanumeric string
Merchant Secret:
Obtain from your Pivot dashboard
Used together with the Merchant ID for authentication
IMPORTANT: Do not share this credential with anyone
Callback API Key (X-API-Key):
Dedicated Callback API Key for verifying webhooks from Pivot
Obtain from your Pivot dashboard
Used to validate callback requests
Callback URL:
https://your-site.com/pivot/payment-callback
5. Sub-account (Optional)
Sub-account ID:
Sub-account UUID if you use the sub-account management feature
Leave empty if not using sub-accounts
6. Payment Session Expiry
Payment Session Expiry (Minutes):
Time in minutes before the payment session expires
Customers must complete payment within this time
Range: 1 minute up to 5 days (43200 minutes)
Default: 15 minutes
Recommended: 15–30 minutes for normal transactions
7. Refresh Payment Status Settings
Enable Refresh in Admin:
Enable to show a refresh payment status button on the admin order details page
Default: Enabled
Useful if order status is not automatically updated via callback
Step 3: Save Configuration
Fill in all required fields
Click Save changes
Ensure no error messages appear
🚀 How to Use
For Customers
Customer adds products to the cart
Proceeds to checkout
Selects Pivot Payment as the payment method
Clicks Place order
Customer is redirected to the Pivot payment page
Customer completes payment on the Pivot page
After payment is completed, customer is redirected back to the "Thank You" page on your website
For Merchants
After the customer completes payment, the order status will automatically change to:
Processing or Completed (if payment is successful)
Failed (if payment fails or is cancelled)
Merchant can view order details in WooCommerce → Orders
The Pivot Payment ID is stored in order meta for reference
🔐 Advanced Settings
Callback URL Configuration
The plugin automatically uses the following URL as the callback endpoint: https://your-site.com/pivot/payment-callback
IMPORTANT: Make sure this URL is registered in your Pivot dashboard:
Log in to the Pivot Dashboard
Navigate to Settings → Webhooks/Callbacks
Add or update the callback URL with the URL above
Ensure the Callback API Key used matches the one configured in the plugin settings
Permalink Settings
The plugin uses WordPress rewrite rules for the callback endpoint. If the callback does not work:
Navigate to Settings → Permalinks
Click Save Changes (without changing anything) to refresh rewrite rules
Test the callback endpoint again
Order Status Handling
The plugin automatically updates order status based on events from Pivot:
PAYMENT.PAID → Order status: Processing/Completed
CHARGE.SUCCESS → Order status: Processing/Completed
PAYMENT.CANCELLED → Order status: Failed
PAYMENT.PROCESSING → Order status: Pending (not changed)
🧪 Testing
Test Mode
Enable Test Mode in plugin settings
Use Sandbox credentials from Pivot
Create a test order with a small amount
Test various scenarios:
Successful payment
Failed payment
Cancelled payment
Timeout/expired
Test Callback Endpoint
You can test the callback endpoint using the following request:
Request:
Expected Response:
Payment Status Verification
The plugin automatically verifies payment status on the "Thank You" page:
If the order is not yet paid, the plugin will call the Pivot API to check status
Order status will be updated based on the API response
Logs can be viewed at WooCommerce → Status → Logs → pivot-payment-gateway
Manual Refresh Payment Status
The plugin provides a feature to manually refresh payment status if the order status is not automatically updated:
For Admin
Navigate to WooCommerce → Orders
Open the order you want to refresh
On the order details page, a button 🔄 Refresh Payment Status (Pivot) will appear
Click the button to refresh status from the Pivot API
Order status will automatically update if there are changes
Note: This feature can be enabled or disabled via plugin settings:
WooCommerce → Settings → Payments → Pivot → Enable Refresh in Admin
For Customers (Public Endpoint)
Customers can refresh payment status via a public endpoint:
URL Format:
Example:
Response (JSON):
Rate Limiting:
Endpoint is protected with rate limiting (30 seconds per order)
If accessed too frequently, it will return HTTP 429 with the message "Please wait X seconds before refreshing payment status again"
Security:
If the customer is logged in, the endpoint verifies that the order belongs to the logged-in customer
Rate limiting prevents abuse and reduces load on Pivot servers
Frontend Usage:
You can integrate this endpoint on the customer order page using JavaScript:
🔍 Troubleshooting
Issue: Payment gateway does not appear at checkout
Solution:
Ensure the plugin is activated
Ensure the payment gateway is enabled in WooCommerce → Settings → Payments
Ensure Merchant ID and Merchant Secret are filled in
Check whether the order currency is supported by Pivot
Clear cache if using a caching plugin
Issue: Error "Missing Pivot API credentials"
Solution:
Ensure Merchant ID is filled in
Ensure Merchant Secret is filled in
Ensure there are no leading or trailing spaces in credentials
Try disabling and re-enabling the payment gateway
Issue: Customer is not redirected to the Pivot payment page
Solution:
Check logs at WooCommerce → Status → Logs → pivot-payment-gateway
Ensure the API Base URL is correct (sandbox for test mode, live for production)
Ensure Merchant ID and Secret are valid
Test API connection using the test callback endpoint
Issue: Order status does not change after payment
Solution:
Check whether the callback URL is registered in the Pivot Dashboard
Ensure the Callback API Key is correct
Check logs at WooCommerce → Status → Logs → pivot-payment-gateway
Ensure permalink settings have been refreshed
Try manually accessing the "Thank You" page to trigger verification
Issue: Callback is not received
Solution:
Ensure the server can receive POST requests from the internet
Check firewall settings
Ensure the Callback URL is accessible via browser:
https://your-site.com/pivot/payment-callbackTest using the test callback endpoint
Check logs to see whether requests are received
Issue: Error "Invalid or missing X-API-Key"
Solution:
Ensure the Callback API Key is filled in plugin settings
Ensure the Callback API Key used in the Pivot Dashboard matches the plugin settings
Check logs for detailed error information
❓ FAQ
Q: Does this plugin support multiple currencies?
A: Yes, the plugin supports all currencies supported by Pivot. Ensure your order currency is supported by Pivot.
Q: Do I need to manually configure the callback URL?
A: No, the plugin automatically uses the URL https://your-site.com/pivot/payment-callback. You only need to register this URL in the Pivot Dashboard.
Q: How do I know if a payment is successful?
A: Order status will automatically change to "Processing" or "Completed" if payment is successful. You can also see the Payment ID in the order details.
Q: Is this plugin secure?
A: Yes, the plugin uses:
HTTPS for all communications
X-API-Key validation for callbacks
Secure credential storage
Order key validation for the thank you page
Q: Can I use sub-accounts?
A: Yes, the plugin supports sub-accounts. Fill in the Sub-account ID in plugin settings if you use Pivot’s sub-account management feature.
Q: How do I view transaction logs?
A: Logs can be viewed at WooCommerce → Status → Logs. Select the source "pivot-payment-gateway" to view plugin logs.
Q: How do I manually refresh payment status if the order is not updated?
A:
For Admin: Use the "🔄 Refresh Payment Status (Pivot)" button on the order details page
For Customers: Use the
/pivot/payment-refresh-status/<order_id>endpoint or integrate it into the customer order pageEnsure the refresh feature is enabled in plugin settings
Q: Is the refresh payment status endpoint secure?
A: Yes, the endpoint is protected with:
Rate limiting (30 seconds per order) to prevent abuse
User verification if the customer is logged in
Logging for activity monitoring
Q: Is this plugin compatible with WooCommerce Blocks (Checkout Block)?
A: Yes, this plugin supports WooCommerce Checkout Blocks and Cart Blocks.
Q: What if I want to use a custom callback URL?
A: Currently, the plugin uses a fixed callback URL. For a custom URL, you would need to modify the plugin or contact support.
Q: Does this plugin support refunds?
A: This plugin focuses on payment processing. For refunds, use standard WooCommerce refund features or contact Pivot support for refund APIs.
Q: How do I switch from test mode to production?
A:
Open plugin settings
Uncheck "Enable Test Mode"
Ensure the Live API Base URL is correct
Ensure you are using Live credentials (Merchant ID & Secret)
Update the Callback URL in the Pivot Dashboard if different
Save changes
📞 Support
Pivot Documentation
Logging & Debugging
For debugging, check logs at:
WooCommerce → Status → Logs → pivot-payment-gateway
Logs include:
Payment session creation
API calls
Callback processing
Error messages
Status updates
Support Contact
If you encounter issues that cannot be resolved:
Check WooCommerce logs for error details
Document steps to reproduce the issue
Screenshot error messages if any
Contact Pivot support with the information above
📝 Changelog
Version 1.0.0
Initial release
Payment session creation
Payment callback handling
Thank you page verification
Sub-account support
WooCommerce Blocks compatibility
Comprehensive logging
Test callback endpoint
Manual refresh payment status (admin)
Public refresh payment status endpoint (customer)
Rate limiting for public endpoint
Configurable payment session expiry
Enable/disable refresh feature settings
🔒 Security Best Practices
Do not share credentials: Merchant ID, Merchant Secret, and Callback API Key are confidential
Use HTTPS: Ensure the website uses an SSL certificate
Regular updates: Update the plugin regularly for security patches
Monitor logs: Regularly check logs for suspicious activity
Use test mode for development: Always use test mode during development/testing
📄 License
This plugin is developed for integration with the Pivot Payment Gateway. Ensure you have a valid license to use Pivot services.
Last updated