PingPaid

Home / Developers

Developers

Build on PingPaid

Hooks and ready-to-use code snippets for PingPaid Premium. React when an order is confirmed, connect your own tools, and adjust what customers see, without editing the plugin.

PingPaid Premium 1.1.0WordPress 6.4+ · WooCommerce 8.5+ · PHP 7.4+Updated November 2026

Overview

PingPaid confirms WooCommerce orders when an Interac e-Transfer arrives. Everything on this page runs on your own WordPress site, uses standard WordPress hooks, and keeps working when you update PingPaid.

ActionsRun your code when an order is paid, partly paid or needs review.
FiltersTurn individual PingPaid emails on or off and adjust the payment box.
SnippetsCopy-and-paste examples, tested with the version shown on each one.

Adding custom code

We recommend the free Code Snippets plugin. It keeps your code separate from your theme, survives theme updates, and lets you switch a snippet off with one click.

  1. In WordPress, go to Plugins → Add New Plugin, search for Code Snippets, then install and activate it.
  2. Go to Snippets → Add New and paste the code.
  3. Choose Run snippet everywhere, then click Save Changes and Activate.
Always copy code with the Copy button on this page. Copying from an email can turn straight quotes into curly ones, which breaks PHP. Try changes on a staging site first if you have one.

Actions

Use add_action() to run code when something happens in PingPaid. Actions only notify you; they don’t change how payments are matched.

HookRuns when
pingpaid_order_paid$order, $payment, $howAn order is marked paid. $how is auto or manual (confirmed from the review queue).
pingpaid_order_partially_paid$order, $payment, $received, $totalAn e-Transfer covers only part of an order. Amounts are in cents.
pingpaid_payment_needs_review$paymentAn e-Transfer couldn’t be matched safely and is waiting in Review.
pingpaid_claim_unmatched$order, $irefA customer entered an Interac reference number, and no matching e-Transfer arrived within 10 minutes.
pingpaid_cancelled_with_money$order, $receivedA cancelled order already had e-Transfers applied to it. $received is in cents.

Filters

Use add_filter() and return false to switch something off. Each email filter receives the same order and payment details as the actions above.

HookControls
pingpaid_send_review_email$send, $paymentThe email to the store when a payment needs review.
pingpaid_send_partial_email$send, $order, $paymentThe email to the store when an order is partly paid.
pingpaid_send_customer_balance_email$send, $order, $paymentThe email to the customer showing what’s still due.
pingpaid_send_claim_unmatched_email$send, $order, $irefThe email asking the customer to check the reference number they entered.
pingpaid_box_alignwide$wide, $orderWhether the payment box uses the wide layout on block themes.

Code snippets

Ready-to-use examples. Change the values marked in the comments, and nothing else.

Post to Slack when a payment needs review

Get a message in your team’s Slack channel whenever an e-Transfer is waiting in Review, with the amount, sender and a link to it.

Tested with 1.0.19Uses pingpaid_payment_needs_reviewStore team only
pingpaid-slack-review.php
/**
 * PingPaid: post to Slack when an e-Transfer needs review.
 */
add_action( 'pingpaid_payment_needs_review', function ( $payment ) {
	// Paste your Slack incoming webhook URL here.
	$webhook = 'https://hooks.slack.com/services/XXXX/XXXX/XXXX';

	$amount = number_format( (int) $payment['amount_cents'] / 100, 2 );
	$from   = ! empty( $payment['payer_name'] ) ? $payment['payer_name'] : 'Unknown sender';
	$link   = admin_url( 'admin.php?page=pingpaid&tab=payments&status=review' );

	wp_remote_post( $webhook, array(
		'headers'  => array( 'Content-Type' => 'application/json' ),
		'body'     => wp_json_encode( array(
			'text' => "e-Transfer of \${$amount} from {$from} needs review: {$link}",
		) ),
		'timeout'  => 5,
		'blocking' => false, // Don't slow down your site.
	) );
} );
  1. In Slack, create an incoming webhook for the channel you want and copy its URL.
  2. Paste the URL in place of https://hooks.slack.com/services/XXXX/XXXX/XXXX.
  3. Activate the snippet. The next payment that needs review posts to that channel.
The message includes the sender’s name. Post it to a private channel for your store team, and keep the webhook URL private: anyone with it can post to that channel.

Support policy

We want custom code to be safe and predictable for your store.

What we support
  • PingPaid itself, and the hooks listed on this page
  • The snippets here, with the version they were tested on
  • Questions about which hook fits what you want to do
What’s yours to maintain
  • Custom code you write or change
  • Other plugins and themes your code relies on
  • Testing changes before they go live on your store

Hooks not listed on this page are internal and may change without notice. Need something that isn’t here? Email us at support@pingpaid.ca.