WooCommerce Plugin

Royat Pay payment method for WordPress and WooCommerce

Overview

The Royat Pay WooCommerce plugin lets WordPress stores accept payments through Royat Pay with a simple payment method inside WooCommerce checkout.

Branding: The plugin uses Royat Pay naming and Royat branding only.

Customer stores should use the Royat Pay client API token only. Do not place the central payment integration token inside WordPress.

Package Location

The plugin source is available in the Royat Pay repository under:

packages/royat-pay-wordpress

Download the current ZIP package:

https://panel.royat.sa/downloads/royat-pay-wordpress.zip

Installation

  1. Compress the royat-pay-wordpress folder into a ZIP file.
  2. Open WordPress Admin.
  3. Go to Plugins > Add New > Upload Plugin.
  4. Upload and activate the ZIP file.
  5. Go to WooCommerce > Settings > Payments > Royat Pay.
  6. Enable the payment method and paste the Royat Pay client API token.

Settings

Setting Value
Royat Pay URL https://panel.royat.sa
API Token The client token from the Royat Pay dashboard.
Embedded checkout Enabled by default to keep customers on the store page when possible.
Logo URL https://www.royat.sa/wp-content/uploads/2024/03/logo_header1-1-Recovered.png

Checkout Flow

  1. WooCommerce sends the customer to the Royat Pay receipt page.
  2. The plugin calls /api/payment/initiate-session.
  3. The plugin loads /royatpay.js and renders the embedded checkout inside the store.
  4. After the customer chooses a payment method, the plugin calls /api/payment/execute using SessionId.
  5. If 3DS/OTP is required, the plugin opens the verification URL inside an iframe.
  6. After return, the plugin calls /api/payment/status and updates the WooCommerce order.

Main Account Settlement

If the store should settle to the main Royat account, configure that client in Royat Pay with settlement code 0. The WordPress plugin still uses only the Royat Pay client token.

Current Package Status

This is the first internal package version. Test it on a staging WooCommerce store before giving it to production customers.