WooCommerce

Accept SADAD Pay in your WordPress and WooCommerce store.

The SADAD Pay plugin for WooCommerce adds SADAD Pay to your WordPress store's checkout. Customers choose SADAD Pay, pay on the SADAD Pay payment page with KNET, card or Apple Pay, and come back to your store's order confirmation page.

ItemDetails
PluginSadad Payment for WooCommerce
Latest version1.0.4
RequirementsWordPress 5.0 or later, WooCommerce 4.0 or later, PHP 7.0 or later
CheckoutWorks with both the classic checkout and the block-based checkout
PriceFree

Before you start

  • WooCommerce is installed and active.
  • You have your Client Key and Client Secret from the SADAD Pay portal, under Profile → Update Profile → API. If they are not there, email [email protected] to enable API access.
  • Start with your Sandbox keys. See Sandbox & Live Accounts.

Step 1: Install the plugin

  1. In your WordPress admin, go to Plugins → Add New Plugin.
  2. Search for Sadad Payment.
  3. Find Sadad Payment for WooCommerce by Sadad Payment, then click Install Now.
  4. Click Activate.

To install it manually instead, download the ZIP from the WordPress plugin directory, then go to Plugins → Add New Plugin → Upload Plugin.

1254

Plugins → Installed Plugins: Sadad Payment for Woocommerce, active

Step 2: Configure the plugin

Go to WooCommerce → Settings → Payments, find Sadad Payment and click Manage (or Set up).

1254

WooCommerce → Settings → Payments: click Manage next to Sadad Payment

SettingWhat to enter
Enable/DisableTick Enable Sadad Payment to show it at checkout
TitleThe name customers see at checkout. Default: Sadad Payment.
DescriptionA short message shown under the title at checkout, for example Pay securely with KNET, card or Apple Pay. Change the default text Content here.
Payment Icon - Logo URLLeave empty to show the SADAD Pay logo, or enter the URL of your own icon
Test ModeTick to use Sandbox. Untick for Live. It is ticked by default.
Client KeyYour Client Key, for the same environment as Test Mode
Client SecretYour Client Secret, for the same environment as Test Mode
Order StatusThe status a paid order moves to: Processing (default) or Completed

Click Save changes.

🚧

Change the default description

The Description field starts with the text Content here, and customers see it at checkout. Replace it with your own text, or leave it empty.

📘

You do not need to set Success and Fail URLs

The plugin sends its own return address with every invoice. You do not need to change the Success URL or Fail URL in the SADAD Pay portal for WooCommerce.

1254

The Sadad Payment settings. Test Mode is unticked here because this store is live.

Step 3: Set your Webhook URL

The webhook updates the order even if the customer closes the browser before coming back to your store.

  1. Log in to the SADAD Pay portal.
  2. Go to Profile → Update Profile → API.
  3. In WebhookURL, enter your store address followed by /?wc-api=sadad_webhook:
https://yourstore.com/?wc-api=sadad_webhook
  1. Click Update.

Replace yourstore.com with your store's domain. If WordPress is installed in a folder, include it, for example https://yourstore.com/shop/?wc-api=sadad_webhook. See Webhooks.

Step 4: Test a payment

  1. Make sure Test Mode is ticked and you are using your Sandbox keys.
  2. In your store, add a product to the cart and go to checkout.
  3. Choose Sadad Payment and place the order. You are taken to the SADAD Pay payment page.
  4. Pay with a test card.
  5. You come back to the order confirmation page. In WooCommerce → Orders, the order is now Processing (or Completed, if you chose that).
  6. Open the order. The order notes say Sadad Payment is completed, with the transaction ID and the SADAD Pay invoice ID.

Also try a failed payment, for example by cancelling on the KNET page. You come back to the checkout with an error message, and the order is marked Failed.

1254

Sadad Payment at checkout. The customer clicks Place Order and is sent to the SADAD Pay payment page.

Step 5: Go live

  1. In WooCommerce → Settings → Payments → Sadad Payment, untick Test Mode.
  2. Replace the Client Key and Client Secret with your Live keys, and save.
  3. Set the Webhook URL in your Live SADAD Pay portal as well.
  4. Place one small real order to check everything works.

See the Go-Live Checklist.

How orders are updated

What happensOrder status in WooCommerce
Customer places the order and goes to the payment pagePending payment
Payment succeeds (customer returns, or the webhook arrives)Processing or Completed, from your Order Status setting
Payment fails or is cancelledFailed

Before it changes the order, the plugin asks SADAD Pay for the invoice and checks that it belongs to that order and is Paid. Each SADAD Pay invoice has your WooCommerce order number as its reference number (ref_Number), so you can find it in the portal under Invoices.

1254

A paid order: “Payment via Sadad Payment”, status Processing, and the order note with the SADAD transaction and invoice IDs

Language

The SADAD Pay payment page opens in Arabic when your WordPress site language is Arabic, and in English otherwise.

Currencies

SADAD Pay invoices are always in KWD. If your store uses another currency, the plugin converts the order total to KWD with SADAD Pay's exchange rate before it creates the invoice. The customer pays the KWD amount.

Refunds

The plugin does not refund from WooCommerce. To refund an order:

  1. Refund the invoice in the SADAD Pay portal under Invoices. See Refunds.
  2. In WooCommerce, open the order, click Refund, enter the amount and click Refund manually. This records the refund and updates your stock and reports, but does not move money.

Troubleshooting

ProblemWhat to check
An error at checkout, and no payment page opensThe Client Key or Client Secret is wrong, or does not match Test Mode (Sandbox keys need Test Mode on).
The checkout shows "Content here"Change the Description in the plugin settings.
Payment succeeds but the order stays Pending paymentThe customer closed the browser before returning, and the webhook is not set or not reaching your store. Check the Webhook URL, and that your firewall or security plugin does not block requests to /?wc-api=sadad_webhook.
"Payment return: Invoice ID not match"The order was paid with a different invoice, for example after the customer retried. Check the invoices for that order number in the SADAD Pay portal.
Sadad Payment does not appear at checkoutCheck that Enable Sadad Payment is ticked and the plugin is active.

Logs

The plugin writes a log file named sadad.log in the WooCommerce logs folder, usually wp-content/uploads/wc-logs/. Send it to [email protected] with the order number when you ask for help.

Next steps