JavaScript is required to view this page
WooCommerce

WooCommerce

The BlinkPay NZ for WooCommerce plugin adds Blink PayNow to a WooCommerce checkout without any custom API work. At checkout the customer is sent to the BlinkPay-hosted Gateway, chooses their bank (or card, when card payments are enabled for your merchant account), authorises the payment and returns to your store. The plugin then confirms the outcome through the API and updates the order.

The plugin is free and open source. It is listed in the WordPress.org plugin directory, and its source code and releases are on GitHub.

When to Use

Use the plugin if your store runs on WooCommerce and you want one-off payments at checkout. It uses Quick Payments with the Gateway flow and does not support recurring payments (Blink AutoPay). If you need recurring payments or a custom checkout, integrate with the API directly using the Quick Start or one of the SDKs.

Requirements

RequirementVersion or setting
WordPress6.0 or later, with WP-Cron enabled
WooCommerce7.0 or later (classic and block-based checkout supported)
PHP7.4 or later
Store currencyNZD
BlinkPay accessA client ID and client secret for each environment

Sandbox and production credentials are separate. Your client ID is shown in this portal under Settings > API Settings (open the environment's row). The portal never displays an existing client secret: select Rotate Secret to generate a new one, which is shown only once, in the confirmation dialog, so store it somewhere safe. Rotating replaces the previous secret immediately, so update any store already using it at the same time.

Installation and Setup

  1. In WordPress admin, go to Plugins > Add New, search for "BlinkPay NZ for WooCommerce", then install and activate it.
  2. Go to WooCommerce > Settings > Payments > BlinkPay.
  3. Enter your sandbox Client ID and Client secret, leave Sandbox mode ticked, and enable the gateway.
  4. Copy the Callback URL shown on the settings screen.
  5. In this portal, go to Settings > API Settings, open the Sandbox row and add the callback URL under Whitelisted Redirect URLs. Payments cannot be created until the URL is whitelisted.
  6. Place a test order to confirm everything works.

Keep the client secret out of the database

Instead of saving credentials on the settings screen, you can define them in wp-config.php. Constants take precedence over saved settings.

define( 'BLINKPAY_CLIENT_ID', 'your-client-id' );
define( 'BLINKPAY_CLIENT_SECRET', 'your-client-secret' );

Settings

SettingPurpose
Enable/DisableShows or hides BlinkPay at checkout
TitlePayment method name shown at checkout (default "Checkout with BlinkPay")
DescriptionPayment method description shown at checkout
Sandbox modeUses the sandbox environment. Untick it only when you've entered production credentials
Client ID / Client secretYour credentials for the selected environment
Callback URLRead-only. The URL to whitelist under Settings > API Settings for each environment
Bank statement particularsShown on the customer's bank statement, up to 12 characters (default "Order"). The order number is sent as the reference
Debug loggingLogs API activity to WooCommerce > Status > Logs (source blinkpay). Credentials and tokens are never logged

How Orders Are Updated

The plugin never treats the customer's return to your store as proof of payment. When the customer returns, it checks the payment status through the API, and the result sets the order status.

Payment outcomeWooCommerce order status
Payment settledProcessing or Completed
Consent or payment rejectedFailed
Payment still being processedOn hold
Settled amount differs from order totalOn hold, with a note naming both amounts

Bank settlement is asynchronous, so a payment made in the evening may not settle until the next morning. For orders on hold, WP-Cron keeps checking the payment. It checks every minute at first and backs off to every two hours, for up to 36 hours, and completes the order automatically once the payment settles. While those checks are still running, WooCommerce's unpaid-order cancellation won't cancel the order.

If surcharging (fee forwarding) is enabled for your merchant account, BlinkPay adds the surcharge on the hosted gateway, where the customer sees and authorises the combined amount. The plugin records the amount actually charged and the surcharge on the order, with a note to help you reconcile it.

Refunds

Use Refund via BlinkPay on the order screen. How the refund works depends on how the customer paid:

Paid byWhat the refund does
CardBlinkPay refunds the customer through the card network, in full or in part.
BankNo money moves automatically. The BlinkPay manual refunds panel on the order shows the account number the customer paid from, so you can send the refund from your own bank.

For bank payments, the account number is fetched from the BlinkPay API each time the panel loads and is never stored in WordPress. It is also shown on the payment's details page in this portal. The customer gets an order note saying the refund will arrive by bank transfer.

WooCommerce's Refund manually button is hidden for BlinkPay orders so that a refund can't be recorded without going through BlinkPay. The refund button appears only when your API credentials have refund permissions.

Going Live

When sandbox testing is complete, replace the credentials with your production client ID and secret and untick Sandbox mode. Then whitelist the same callback URL for the production environment under Settings > API Settings, because each environment has its own whitelist. See Going Live for the full production checklist.

Troubleshooting

For general issues, see the Troubleshooting Guide. Quick checks specific to the plugin:

  • BlinkPay doesn't appear at checkout — check that the store currency is NZD and that both credentials are set.
  • Every payment fails with "We could not start your BlinkPay payment" — the callback URL probably isn't whitelisted for the environment you're using. The notes on the failed order show the exact error.
  • Orders stay on hold — this is expected until the payment settles. If your host disables WP-Cron, run wp-cron.php from a real cron job. If the order is still on hold after 36 hours, check the payment in this portal and update the order manually.
  • Need more detail — enable Debug logging and read WooCommerce > Status > Logs (source blinkpay).

For Developers

The plugin provides two filters:

  • wc_blinkpay_quick_payment_payload changes the quick payment request body.
  • wc_blinkpay_icon changes the checkout logo URL.

The payment ID is set as the order's transaction ID, and the quick payment ID is stored in the _blinkpay_quick_payment_id order meta, so you can match orders to payments in this portal. The customer identifier sent to BlinkPay is a SHA-256 hash of the WooCommerce customer ID, or of the billing email for guest orders.

Testing

In sandbox mode, choose the PNZ test bank at the gateway and use the credentials from the Testing Guide. Sandbox payments never move real money.