Gateway Integration

πŸ” Payment Gateway API Integration Guide

This guide covers how to integrate with the AkuPay Payment Gateway using RESTful APIs. It includes two main endpoints:

  • Initialize Transaction
  • Verify Transaction

πŸ“ API Overview

  • Staging URL:
https://sandbox-api.nectargateway.com
  • Live URL:
https://api.akupay.africa

Authentication:

Authorization: <your_public_api_key>

Response is in JSON format.


🏁 Initialize Transaction

Endpoint:

POST /transaction/initialize

The authorization at the point of initializing a transaction is your public key


πŸ”§ Request Body

{
  "amount": 100000,
  "email": "[email protected]",
  "currency": "NGN",
  "reference": "{{$randomUUID}}",
  "callbackUrl": "{{$randomUrl}}",
  "channels": ["card", "bank"],
  "bearer": 1,
	"metadata": {
    "customerId": "CUST12345",
    "orderId": "ORDER67890" }

ParameterTypeRequiredDescription
amountintegerYesAmount in lowest currency unit (e.g., Kobo)
emailstringYesCustomer’s email address
currencystringYese.g., NGN, USD
referencestringYesUnique transaction reference
callbackUrlstringNoURL for transaction status notifications
channelsarrayYesPayment methods e.g., ["card", "bank"]
bearerintegerYes1 = Merchant bears fee, 2 = Customer
metadataobjectNoCustom metadata

βœ… Sample Response

{
  "status": 200,
  "message": "Request successfully processed",
  "data": {
    "authorizationUrl": "https://gateway.akupay.africa/S0h-Jcxbpd_1O_MkUZ-i",
    "reference": "{Merchant Ref}",
    "accessCode": "S0h-Jcxbpd_1O_MkUZ-i"
  },
  "errors": []
}

FieldTypeDescription
statusstringRequest status (e.g., 200)
authorizationUrlstringURL to redirect customer for payment
referencestringMerchant's reference
accessCodestringInternal transaction ID

πŸ” Verify Transaction

Endpoint:

GET /transaction/verify/{transactionReference}

The authorization at the point of initializing a transaction is your private key


ParameterTypeRequiredDescription
transactionReferencestringYesReference of the transaction to verify

βœ… Sample Response

{
  "status": 200,
  "message": "Request successfully processed",
  "data": {
    "merchant": "Kiwi Nectarlive",
    "reference": "S0h-Jcxbpd_1O_MkUZ-i",
    "merchantRef": "2d059b6a-4626-47e2-8f35-f903ce7a5f22",
    "grossAmount": 50.75,
    "requestedAmount": 50.00,
    "transactionFee": 0.75,
    "settlementAmount": 50.00,
    "customerId": "[email protected]",
    "currencyCode": "NGN",
    "callbackUrl": "https://test-gateway.akupay.africa/receipt",
    "transactionDate": "2025-03-10T14:04:15.158112",
    "channel": "Card",
    "status": 2
  },
  "errors": []
}
FieldTypeDescription
merchantstringMerchant name
referencestringPayment gateway reference
merchantRefstringMerchant's transaction reference
grossAmountfloatTotal amount charged
transactionFeefloatFee charged
settlementAmountfloatNet amount received
customerIdstringCustomer identifier (email)
statusintegerTransaction status code
authorizationTypestringe.g., ISW_OTP
channelstringe.g., Card
transactionDatedatetimeISO timestamp

🧾 Status Codes

CodeStatusDescription
0COMPLETEDTransaction completed successfully
1PENDINGAwaiting processing
2AUTHORIZEDAuthorization successful
3CAPTUREDFunds captured
4DECLINEDPayment declined
5CANCELEDTransaction cancelled
6REFUNDEDFully refunded
7CHARGED_BACKDispute raised
8IN_PROGRESSStill processing
9VOIDEDVoided by merchant or system
10PENDING_REVIEWUnder manual review
11PARTIALLY_REFUNDEDPartially refunded
12UNDER_INVESTIGATIONUnder investigation
13FAILED_TO_CAPTUREFailed capture post-authorization
14EXPIREDAuthorization expired
15SUSPENDEDTemporarily paused
16TRANSFERREDSettled/finalized elsewhere
17SCHEDULEDFuture-dated transaction