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.
9TH SWIFT STANDARD API CHECKOUT
Welcome to the 9thSwift Payment Gateway API
The 9thSwift API provides a secure and reliable way to integrate payments, payouts, and bill payments into your applications.
All requests to the API must be authenticated and transmitted over HTTPS to ensure data integrity and security.
Base URL
https://server.9thswift.com/api/v1Authentication
To interact with the API, you need to include the following headers in your requests:
1. Authorization Header
- Pass your secret key as a Bearer token.
- Example: Authorization: Bearer your_secret_key
2. Encryption Header (HMAC Signature)
- Required only for Payouts and Bill Payments.
- Signatures are generated using HMAC-SHA512, applied to the request payload, and signed with your API key.
- This ensures the request payload has not been altered during transmission.
Security Measures
Signature Authentication
- Provides secure request validation.
- Ensures both authenticity and integrity of your payload.
IP Whitelisting
- As part of our firewall security, you must set your TEST and LIVE IPs on your dashboard before making requests.
- Only whitelisted IPs will be allowed to access the API.
TRANSACTIONS
Standard Checkout
The Transactions API allows you to create and manage payments on your integration.
INITIALIZE TRANSACTION
{{url}}/transaction/init
Initialize a transaction from your backend.
Endpoint: /transaction/init
Header
| Param | Type | Required? | Description |
|---|---|---|---|
| authorization | string | Yes | Set value to Bearer SECRET_KEY |
| content-type | string | Yes | Set value to application/json |
Parameters
| Param | Type | Required? | Description |
|---|---|---|---|
| amount | number | Yes | Amount you are debiting customer. |
| currency | string | Yes | Currency charge should be performed in. Allowed values are: NGN, USD or GBP. It defaults to your integration currency. |
| reference | string | Yes | Unique case sensitive transaction reference. Only -,_,= and alphanumeric characters allowed. |
| callback_url | string | No | Function that redirects user after payment completion. |
Example Request
curl --location -g '{{url}}/transaction/init' \
--data-raw '{
"reference": "MCD-12345667",
"amount": 3000,
"currency": "NGN",
"callback_url": "https://www.google.com",
"customer": {
"payerName": "John Doe",
"email": "[email protected]",
"phoneNumber": "09088563125"
}
}'Example Response
{
"status": "success",
"message": "Invoice created successfully",
"data": {
"statusCode": "00",
"data": {
"checkout": "https://staging.9thswift.com/mepvwkmf-SW-ESHI",
"accessCode": "mepvwkmf-SW-EGoHJylSWS",
"reference": "MCD-12345667"
}
}
}INITIALIZE REVENUE TRANSACTION
{{url}}/transaction/init-revenue-payment
This endpoint initializes a revenue payment transaction and creates an invoice for government revenue collection. Upon successful initialization, it returns a checkout URL where the payer can complete the payment.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Unique transaction reference identifier (e.g., "GLOB-KLLK9XCFGRGA"). Must be unique for each transaction. |
| amount | number | Yes | Transaction amount in the smallest currency unit (e.g., 200 for NGN 2.00 or ₦200 depending on implementation). |
| currency | string | Yes | Three-letter ISO currency code (e.g., "NGN" for Nigerian Naira). |
| revenueCode | string | Yes | Government revenue code identifier (e.g., "ENUG60123"). |
| taxPayerNumber | string | Yes | Tax identification number of the payer (e.g., "2019873451"). |
| callback_url | string | No | URL to redirect the user after payment completion. |
Example Request
curl --location -g '{{url}}/transaction/init-revenue-payment' \
--data-raw '{
"reference": "GLOB-KLLK9XCFGRGA",
"amount": 200,
"currency": "NGN",
"revenueCode": "ENUG60123",
"taxPayerNumber": "2019873451",
"callback_url": "https://www.google.com",
"customer": {
"payerName": "John Doe",
"email": "[email protected]",
"phoneNumber": "09088563125"
}
}'Example Response
{
"status": "success",
"message": "Invoice created successfully",
"data": {
"statusCode": "00",
"data": {
"checkout": "https://checkout.9thswift.com/MLNGP00V-SW-G-SHYPCJBW",
"accessCode": "MLNGP00V-SW-G-SHYPCJBW",
"reference": "GLOB-KLLK9XCFGRGA"
}
}
}Usage Notes
- 1.Unique References: Always generate a unique reference for each transaction to avoid conflicts.
- 2.Amount Format: Verify the amount format with your implementation - confirm whether amounts are in kobo/cents or the base currency unit.
- 3.Revenue Codes: Ensure you have the correct revenue code from the government authority before initiating transactions.
- 4.Callback URL: The callback URL must be publicly accessible to receive payment status webhooks.
- 5.Checkout Flow: After receiving the response, redirect the customer to the checkout URL to complete payment.
- 6.Transaction Tracking: Store the accessCode and reference for transaction verification and reconciliation.
Best Practices
- •Validate all customer information before submitting the request
- •Implement proper error handling for failed initialization attempts
- •Use HTTPS for callback URLs to ensure secure webhook delivery
- •Log transaction references for audit trails and customer support
- •Consider implementing idempotency checks using the reference field
VERIFY TRANSACTION
{{url}}/transaction/verify/:reference
The Transactions API allows you to verify payments on your integration.
Endpoint: /transaction/verify/:reference
Method: GET
Path Variables
| Param | Type | Required? | Description |
|---|---|---|---|
| reference | string | Yes | Payment reference id |
Header
| Param | Type | Required? | Description |
|---|---|---|---|
| authorization | string | Yes | Set value to Bearer SECRET_KEY |
| content-type | string | Yes | Set value to application/json |
Example Request
curl --location -g '{{url}}/transaction/verify/MCD-00345667'Example Response
{
"status": "success",
"message": "Invoice verified successfully",
"data": {
"statusCode": "00",
"data": {
"reference": "MCD-00345667",
"status": "success",
"amount": 307.5,
"settledAmount": 300,
"feeCharged": 7.5,
"currency": "NGN",
"channel": "card",
"customerEmail": "[email protected]"
}
}
}PAYOUT
ADD PAYOUT RECIPIENT
{{url}}/transaction/add-payout-recipient
The API allows you to create recipient for payout.
Add payout Recipient
Note: after successful creation, this end point will return a 'recipientCode' which will be part of the payload when requesting for a payout
Endpoint: /transaction/add-payout-recipient
Method: POST
Header
| Param | Type | Required? | Description |
|---|---|---|---|
| authorization | string | Yes | Set value to Bearer SECRET_KEY |
| content-type | string | Yes | Set value to application/json |
Parameters
| Param | Type | Required? | Description |
|---|---|---|---|
| type | string | Yes | Recipient type (e.g., "nuban") |
| name | string | Yes | Recipient name |
| accountNumber | string | Yes | Bank account number |
| bankCode | string | Yes | Bank code |
| bankName | string | Yes | Bank name |
| currency | string | Yes | Currency charge should be performed in. Allowed values are: NGN, USD or GBP. It defaults to your integration currency. |
Example Request
curl --location -g '{{url}}/transaction/add-payout-recipient' \
--data '{
"type": "nuban",
"name": "Oloyede Chizorom",
"accountNumber": "8104656733",
"bankCode": "305",
"bankName": "PAYCOM (OPAY)",
"currency": "NGN"
}'Example Response
{
"status": "success",
"message": "Invoice created successfully",
"data": {
"statusCode": "00",
"data": {
"recipientCode": "SW-JTEQBHESCV-RECIPIENT"
}
}
}INITIATE PAYOUT
{{url}}/transaction/init-payout
The API allows you to create recipient for payout.
Add payout Recipient
Note: after successful creation, this end point will return a 'recipientCode' which will be part of the payload when requesting for a payout
Endpoint: /transaction/add-payout-recipient
Method: POST
Header
| Param | Type | Required? | Description |
|---|---|---|---|
| authorization | string | Yes | Set value to Bearer SECRET_KEY |
| content-type | string | Yes | Set value to application/json |
Parameters
| Param | Type | Required? | Description |
|---|---|---|---|
| source | string | Yes | Payout source (e.g., "wallet") |
| recipientCode | string | Yes | Recipient code from payout recipient creation |
| reason | string | Yes | Reason for payout |
| amount | number | Yes | Payout amount |
| reference | string | Yes | Unique transaction reference |
| currency | string | Yes | Currency charge should be performed in. Allowed values are: NGN, USD or GBP. It defaults to your integration currency. |
Example Request
curl --location -g '{{url}}/transaction/init-payout' \
--data '{
"source": "wallet",
"recipientCode": "SW-JTEQBHESCV-RECIPIENT",
"reason": "Vendor 2 withdwal",
"amount": 500,
"reference": "UIOUV-980L980",
"currency": "NGN"
}'Example Response
{
"status": "success",
"message": "Transfer successfully logged and Processing",
"data": {
"statusCode": "00"
}
}BANK
GET BANKS LIST
{{url}}/config/bank-list
AUTHORIZATION Bearer Token
Example Request
curl --location -g '{{url}}/config/bank-list'Example Response
{
"status": "success",
"message": "Bank list retrieved",
"data": {
"statusCode": "00",
"currency": "NGN",
"banks": [
{
"bankName": "7B FINANCE COMPANY LIMITED",
"bankCode": "110072",
"logoUrl": "https://cdn.buildwithcedar.com/356/3830/283b1ss.png"
}
]
}
}ACCOUNT NAME VERIFICATION
{{url}}/config/account-name-verify
AUTHORIZATION Bearer Token
This endpoint allows you to verify account name and number for bank accounts.
WEBHOOKS
WEBHOOK PAYLOAD TO EXPECT
your-web-hook-url
WEBHOOK PAYLOAD TO EXPECT
Endpoint: your-web-hook-url
Method: POST
The webhook service allows real-time communication of transaction notifications between your system and ours. you can receive transaction details promptly, enabling you to process them efficiently within your application.
Webhook URL
You can add you webhook url from your dashboard. Example :
https://api.yourdomain.com/webhookSignature validation
Events sent from 9thSwift carries ApiKey header . The value of this header is your api key. Verifying the header signature should be done before processing the event. See code sample below
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;
// Do something with event
});Example Request
curl --location 'your-web-hook-url' \
--data-raw '{
"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
}
}'Body raw (text)
{
"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
}
}EventType
| EventType | Description |
|---|---|
| payment.success | Successful Transaction for all channels |
| payment.failed | Failed Transaction for channels |
| payment.pending | Pending Transaction for all channels |
| transfer.success | Successful Payout Transfer |
| transfer.failed | Failed Payout Transfer |
| refund.processed | Processing Refund |
Here are some points to take notes
- 1.Add the webhook URL on your 9thSwift dashboard
- 2.Ensure your webhook URL is publicly available (localhost URLs cannot receive events)
- 3.Test your webhook to ensure you're getting the JSON body and returning a 200 OK HTTP response
- 4.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
- 5.If we don't get a 200 OK HTTP response from your webhooks, we flagged it as a failed attempt
- 6.If we are unable to deliver webhook to you, there is an api to re call failed webhook notification.
WALLET
GET WALLET BALANCE
{{url}}/wallet/wallet-balance
Verify Payment
The Transactions API allows you to verify payments on your integration
Endpoint: /transaction/verify/:reference
Method: GET
AUTHORIZATION Bearer Token
Parameter
| Param | Type | Required? | Description |
|---|---|---|---|
| reference | string | Yes | Payment refrence id |
Example Request
curl --location -g '{{url}}/wallet/wallet-balance'Example Response
{
"status": "success",
"message": "Wallet balance retrieved successfully",
"data": {
"statusCode": "00"
}
}RESPONSE DATA ENUMS
Payment Status
| Type | Description |
|---|---|
| success | Transaction successful |
| pending | Transaction still pending |
| Failed | Transaction failed |
| abandoned | Expired invoice |
| refunded | Refund was processed |
Payment Channel
| Type | Description |
|---|---|
| card | Card Transaction |
| transfer | Virtual account transfer Transaction |
| ussd | USSD bank Transaction |
Payment Currency
| Type | Description |
|---|---|
| NGN | Nigeria Naira |
| USD | United state of america dollar |
| GBP | Great britsh pounds |