🎉New feature launched

9th Swift Documentation

We help African businesses get paid by anyone, anywhere in the world—while giving them the tools to collect payments, access loans, and manage daily operations through a complete business banking solution.

9thSwift Webhook Documentation

Introduction

The webhook service allows real-time communication of transaction notifications between your system and 9thSwift. You can receive transaction details promptly, enabling you to process them efficiently within your application.

Quick Start

  1. Add your webhook URL on the 9thSwift dashboard.
  2. Ensure your webhook URL is publicly available (localhost URLs cannot receive events).
  3. Implement signature validation using the ApiKey header.
  4. Test your webhook to ensure you’re getting the JSON body and returning a 200 OK HTTP response.

Webhook URL

You can add your webhook URL from your dashboard. Example: https://api.yourdomain.com/webhook

Endpoint: POST your-web-hook-url

Signature Validation

Events sent from 9thSwift carry an ApiKey header. The value of this header is your API secret key. Verifying the header signature should be done before processing the event.

Signature Validation Example (Node.js/Express)
const apiKey = process.env.SECRET_KEY;
app.post("/my/webhook/url", function(req, res) {
 //validate event
 const signature = req.header('ApiKey')!.replace('ApiKey ', '');
 if (!signature || (signature !== apiKey)) {
 throw new Error('Webhook notification not from 9th Swift');
 }
 // Retrieve the request's body
 const event = req.body;
 // Send acknowledge
 res.status(200).send('ok');
 // Do something with event 
});

Supported Events

Event TypeDescription
payment.successSuccessful Transaction for all channels
payment.failedFailed Transaction for channels
payment.pendingPending Transaction for all channels
transfer.successSuccessful Payout Transfer
transfer.failedFailed Payout Transfer
refund.processedProcessing Refund

Payload Format

Webhook payloads are JSON objects containing information about the event. Below is an example payload for a payment.success event:

Sample Payload (payment.success)
{
  "id": "67ec7641416a8374c865a167",
  "type": "payment.success",
  "created": "2025-09-03T10:40:18.742+00:00",
  "data": {
    "reference": "MFNRCBW0-SW-AFHJTTSA-M",
    "status": "success",
    "amount": 1025,
    "settledAmount": 1000,
    "chargedFee": 25,
    "currency": "NGN",
    "paymentChannel": "card",
    "processorResponse": "Card 3DS verification successfully",
    "ip_address": "1.345.907.234",
    "paidAt": "2025-08-27 14:06:02",
    "customer": {
      "fullName": "John Doe",
      "email": "[email protected]",
      "phoneNumber": "909665234187"
    },
    "paymentDetails": {
      "method": "card",
      "first6Digits": "123456",
      "last4Digits": "1992",
      "cardType": "master",
      "expiry": "04/26"
    },
    "environment": "live",
    "log": {
      "time_spent": null,
      "attempts": null,
      "authentication": null,
      "errors": 3,
      "success": true,
      "channel": "card",
      "history": [
        {
          "id": 8422,
          "type": "TRANSACTION RECORDED",
          "message": "success",
          "time": null,
          "reference": "METYZHJT-SW-LK12MUJCV7",
          "channel": "S2S",
          "ip_address": "102.91.102.183",
          "device": "axios/1.11.0"
        }
      ]
    }
  }
}

Handling Webhooks

  1. Receive the webhook payload via POST request.
  2. Validate the ApiKey header against your secret key.
  3. Parse the JSON payload to extract event details.
  4. Process the event according to your business logic.
  5. Respond with a 200 OK status code to acknowledge receipt.

Avoid long-running tasks

If your webhook function has long-running tasks, you should first acknowledge receiving the webhook by returning a 200 OK before proceeding with the long-running tasks.

Important Notes

  • If we don’t get a 200 OK HTTP response from your webhooks, we flag it as a failed attempt.
  • If we are unable to deliver a webhook to you, there is an API to recall failed webhook notifications (contact support for details).

Retry & Recall

Failed deliveries (non-2xx responses) are flagged for manual recall via our API. Contact support for the recall endpoint details.

Was this page helpful?

© Copyright 2025 9thSwift. All rights reserved.

🎉New feature launched

Empowering Your Business with Seamless Financial Solutions

Experience the future of payment processing with 9th Swift. Our all-in-one platform offers seamless transactions, global reach, and robust security, empowering your business to thrive in the digital age.

01

How long until I receive payments?

Settlement happens within 24 hours, depending on payment method and verification status.
02

Are there hidden charges?

No. What you see is what you pay. All fees are clear up front.
03

What kinds of businesses are supported?

From small merchants to mid-size enterprises, especially those serving domestic and international clients.
04

What is required to get started?

Basic business verification (legal documents, bank account info). We try to make onboarding simple.