Take payments

Payment links

A link you can send on WhatsApp, with no checkout page of your own.

A payment link is a page Harbour hosts, for one amount and one description, that anyone can pay without you building a checkout. Businesses create them in the dashboard or the app; you can create them through the API when the amount comes out of your system — an invoice, a deposit, a subscription renewal someone will pay by hand.

Create a link

PHP
SDK language
  • PHP
  • Node.jsComing soon
  • PythonComing soon
  • JavaComing soon
  • GoComing soon
  • .NETComing soon
Any language can call the API today
<?php

use Nordaxiz\HarbourConnect\Harbour;

$link = Harbour::links()->create(12_000_00, 'Aso-ebi order, 12 yards', [
    'customer'        => ['name' => 'Funke Adeyemi', 'phone' => '+2348031234567'],
    'expires_in_days' => 7,        // 1 to 90, default 7
    'provider'        => 'auto',
]);

$link->id;      // "lnk_…"
$link->url;     // "https://pay.harbour.africa/okafor-textiles/k2m9x"
$link->status;  // "active"

The amount and description are required: the description is what the customer reads on the page, so write it the way you would in a message ("Aso-ebi order, 12 yards", not "INV-1043").

Share it

$link->url is a plain, short URL on pay.harbour.africa. Send it however the customer already talks to the business: WhatsApp, SMS, an email, a QR code on a counter. The dashboard has a share action that opens WhatsApp with the message written; through the API you send it yourself.

A paid link raises link.paid, whose data is the transaction, exactly like charge.succeeded:

PHP
SDK language
  • PHP
  • Node.jsComing soon
  • PythonComing soon
  • JavaComing soon
  • GoComing soon
  • .NETComing soon
Any language can call the API today
<?php

use Nordaxiz\HarbourConnect\Webhook\Event;

if ($event->type === Event::LINK_PAID) {
    $transaction = $event->transaction();
    $invoice = Invoice::findByReference($transaction->merchantReference);
    $invoice?->markPaid($event->id);
}

Or ask, if you are reconciling in a job rather than reacting:

PHP
SDK language
  • PHP
  • Node.jsComing soon
  • PythonComing soon
  • JavaComing soon
  • GoComing soon
  • .NETComing soon
Any language can call the API today
<?php

$link = Harbour::links()->retrieve('lnk_…');

$link->status;          // active | paid | expired | cancelled
$link->transactionId;   // the payment, once someone pays