Custom payment gateways

Pro ships with Stripe, Paystack and Flutterwave. Its payment system is modular, so a developer can add another gateway without changing the checkout or the webhook handler.

How it is organized

Gateways are classes that extend ACQUIS_Pay_Gateway and register themselves through the acquis_pay_register_gateways filter. The built-in three use exactly the same mechanism.

What a gateway must implement

Method Purpose
get_slug() A unique lowercase identifier, used in the webhook address (gateway=slug)
get_label() The name shown in the admin
is_configured() Whether the required keys are present
initiate_checkout( $order ) Start a payment and return where to send the buyer
verify_webhook_signature( $raw_body, $headers ) Confirm a webhook really came from the gateway
parse_webhook_event( $raw_body ) Turn the gateway’s payload into a normalised event (status, amount, currency, references)

Optionally override get_supported_currencies().

Registering it

add_filter( 'acquis_pay_register_gateways', function ( $gateways ) {
    $gateways[] = new My_Custom_Gateway();
    return $gateways;
} );

Once registered

  • It is offered among the gateways in Payment Settings.
  • Its webhook address is https://yoursite.com/?acquis_pay_webhook=1&gateway=your-slug.
  • Orders, transactions, success screens, emails and automation behave exactly as with the built-in gateways.

Advice

  • Always verify signatures; never trust an unauthenticated webhook.
  • Read the existing gateway classes in the Pro plugin as working examples.
  • Test with the gateway’s sandbox before touching live money. See Testing payments.

Related: Hooks and filters.

Still stuck?Our support team replies by email. Contact support

Share with