Overview
ZAFA PAY can be integrated as a WooCommerce payment gateway plugin. It uses hosted checkout, so your site never handles card information directly.Download
ZAFA PAY Gateway for WooCommerce v1.0.0
Download plugin (ZIP)
Requirements
- WordPress 5.0+
- WooCommerce 5.0+
- PHP 7.4+
- ZAFA PAY merchant account
Setup Flow
Install Plugin
Upload the downloaded ZIP file via Plugins → Add New → Upload Plugin in the WordPress admin and activate it
WooCommerce Settings
Go to WooCommerce → Settings → Payments → ZAFA PAY and configure your API token and Webhook secret
Plugin Settings
Configure the following in the WooCommerce admin (WooCommerce → Settings → Payments → ZAFA PAY):| Setting | Description |
|---|---|
| Enable/Disable | Enable the ZAFA PAY gateway |
| Title | Payment method name displayed at checkout |
| Description | Description displayed at checkout |
| Sandbox Mode | Toggle between sandbox and production environments |
| API Token | Obtained from ZAFA PAY dashboard under Merchant Settings |
| Webhook Secret | Issued when registering a Webhook URL in the ZAFA PAY dashboard |
| Flow ID | Specify a payment flow to use (optional) |
ZAFA PAY Dashboard Settings
Webhook URL
Register the following URL in the Webhooks tab of the ZAFA PAY dashboard:payment.succeededpayment.failedpayment.canceledpayment.refundedpayment.chargeback
Redirect URLs
Configure the following in the Redirect URL settings of the ZAFA PAY dashboard:| Setting | URL |
|---|---|
| Success Redirect URL | https://your-domain.com/wc-api/zafapay_callback |
| Failure Redirect URL | https://your-domain.com/wc-api/zafapay_callback |
| Cancel URL | https://your-domain.com/checkout/ |
Success and failure use the same URL. The plugin automatically determines the result based on the
status parameter appended by ZAFA PAY.Payment Flow
Refunds
Refunds can be processed from the WooCommerce admin:- Go to WooCommerce → Orders and open the target order
- Click the “Refund” button
- Enter the refund amount in the product line item fields
- Click “Refund via ZAFA PAY”
Order Status Mapping
| Event | WooCommerce Status |
|---|---|
| Payment succeeded | Processing |
| Payment failed | Failed |
| Canceled | Cancelled |
| Refunded | Note added to order |
| Chargeback | On Hold |
| Authorized (manual capture) | On Hold |
API Environments
| Environment | API URL |
|---|---|
| Sandbox | https://api.sandbox.zafapay.com |
| Production | https://api.zafapay.com |