Skip to main content

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

1

Install Plugin

Upload the downloaded ZIP file via Plugins → Add New → Upload Plugin in the WordPress admin and activate it
2

WooCommerce Settings

Go to WooCommerce → Settings → Payments → ZAFA PAY and configure your API token and Webhook secret
3

ZAFA PAY Dashboard Settings

Configure the Webhook URL and redirect URLs
4

Test Payment

Run a test payment in sandbox mode to verify everything works

Plugin Settings

Configure the following in the WooCommerce admin (WooCommerce → Settings → Payments → ZAFA PAY):
SettingDescription
Enable/DisableEnable the ZAFA PAY gateway
TitlePayment method name displayed at checkout
DescriptionDescription displayed at checkout
Sandbox ModeToggle between sandbox and production environments
API TokenObtained from ZAFA PAY dashboard under Merchant Settings
Webhook SecretIssued when registering a Webhook URL in the ZAFA PAY dashboard
Flow IDSpecify a payment flow to use (optional)
Sandbox and production use different API tokens. Make sure to update the token when switching environments.

ZAFA PAY Dashboard Settings

Webhook URL

Register the following URL in the Webhooks tab of the ZAFA PAY dashboard:
https://your-domain.com/wc-api/zafapay_webhook
Events to subscribe:
  • payment.succeeded
  • payment.failed
  • payment.canceled
  • payment.refunded
  • payment.chargeback

Redirect URLs

Configure the following in the Redirect URL settings of the ZAFA PAY dashboard:
SettingURL
Success Redirect URLhttps://your-domain.com/wc-api/zafapay_callback
Failure Redirect URLhttps://your-domain.com/wc-api/zafapay_callback
Cancel URLhttps://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:
  1. Go to WooCommerce → Orders and open the target order
  2. Click the “Refund” button
  3. Enter the refund amount in the product line item fields
  4. Click “Refund via ZAFA PAY”
Both partial and full refunds are supported.

Order Status Mapping

EventWooCommerce Status
Payment succeededProcessing
Payment failedFailed
CanceledCancelled
RefundedNote added to order
ChargebackOn Hold
Authorized (manual capture)On Hold

API Environments

EnvironmentAPI URL
Sandboxhttps://api.sandbox.zafapay.com
Productionhttps://api.zafapay.com