Developer Documentation

Build with Payport

Everything you need to accept payments, integrate via API, and manage your payment operations β€” from first login to production deployment.

REST API
Paystack-Powered
Webhook Callbacks
Dashboard Included
πŸ—ΊοΈ

Overview

How Payport works end-to-end

Payport is a payment management platform that wraps Paystack to give you a clean API and a rich dashboard. You initialize a payment from your app, redirect your user to the Paystack checkout, and Payport handles the rest β€” verifying the transaction, recording it, and notifying your server via a callback.

πŸ’‘
Quick mental model: Your server calls Initialize β†’ user pays on Paystack β†’ Payport fires a Callback to your server β†’ you confirm with Verify or Requery as needed.
Step Action Who does it
1Call Initialize with payment detailsYour server
2Redirect user to payment_urlYour app
3User completes payment on PaystackPayer
4Payport receives Paystack webhook, fires callback to your URLPayport
5Verify or Requery to confirm statusYour server
πŸ”

Logging In

Accessing your Payport dashboard

Open the Payport URL provided to you in a browser and sign in with your credentials. If you are accessing a demo environment, use the credentials below.

FieldValue
Emaildemo@beeport.com
Passwordpassword
⚠️
First login: Change your password immediately at Settings β†’ Password and enable two-factor authentication at Settings β†’ Two-Factor Auth.
πŸ”‘

API Keys & Callback URL

Generating your credentials for API access

Every API request requires an API key. Keys are created inside the dashboard under Settings β†’ API Keys (requires the manage-api-keys permission β€” Super Admin has this by default).

Generating a key

1
Go to Settings β†’ API Keys Navigate from the sidebar inside the dashboard.
2
Set a label and Postback URL (optional) The postback URL is where Payport will send payment results. You can override this per-request too.
3
Click "Generate API key" The plain key is shown once only. Copy it immediately and store it securely.
4
Use the key in every API request Send it via the X-API-Key header or as a Bearer token.
⚠️
One-time display: The full API key is shown only once at creation time. If you lose it, revoke it and generate a new one. Never share your key publicly.

Managing keys

The Your API Keys table lists all keys you have created. Each entry shows a key prefix (e.g. bpt_…), label, postback URL, creation date, and last used date. Click Revoke to permanently disable a key.

πŸ›‘οΈ

Authentication

How to send your API key with every request

All payment API endpoints require your API key. There are two equivalent methods β€” use whichever fits your stack:

Preferred β€” Custom header
X-API-Key: YOUR_API_KEY
Alternative β€” Bearer token
Authorization: Bearer YOUR_API_KEY
πŸ’‘
The base URL for all API paths is the Payport URL provided to you, e.g. https://your-payport-domain.com. All endpoints below are prefixed with /api.
πŸš€

Initialize Payment

Create a new payment transaction and get a checkout URL

Creates a Paystack transaction and a local payment record. Returns a payment_url which you redirect the payer to for checkout.

POST /api/payments/initialize

Requires X-API-Key header. Body must be JSON.

Required fields

FieldTypeDescription
matric_norequiredstringStudent application or matric number
studentnamerequiredstringFull name of the payer
amountrequirednumberAmount in kobo β€” e.g. 10000 = ₦100.00
refnorequiredstringYour own receipt or reference number
sessionrequiredstringAcademic session (e.g. "2024/2025")
programmerequiredstringProgramme name
emailrequiredstringPayer's email address (valid format)
paymentforrequiredstringDescription, e.g. "School fees"

Optional fields

FieldDescription
postback_urloptionalOverride callback URL for this specific request
phone_number, address, faculty, department, level, disciplineAdditional payer / academic metadata
programme_type, indigene_status, mode_of_admission, postal_stateAdditional classification fields

Example request

HTTP Request
POST /api/payments/initialize HTTP/1.1
Host: your-payport-domain.com
Content-Type: application/json
X-API-Key: YOUR_API_KEY

{
  "matric_no":    "ATA1000110",
  "studentname":  "Jane Doe",
  "amount":       10000,
  "refno":        "RCP-2025-001",
  "session":      "2024/2025",
  "programme":    "B.Sc Computer Science",
  "email":        "jane@example.com",
  "paymentfor":   "School fees"
}

Success response β€” 201 Created

JSON Response
{
  "payment_url":     "https://checkout.paystack.com/...",
  "reference":       "BPT-XXXXXXXXXX",
  "access_code":     "...",
  "amount":          10000,
  "receipt_number":  "RCP-2025-001"
}
βœ…
Redirect the payer to payment_url to complete the transaction. Save the reference β€” you will need it for verify and requery calls.

Error responses

400Validation failed β€” missing or invalid fields. Response includes error and details.
401Missing or invalid API key.
500Server error β€” message may be generic in production.
βœ…

Verify Payment

Confirm a payment and mark it as paid

Checks the payment status with Paystack. If successful, marks the local payment as Paid and returns the amount and student identifier.

GET /api/payment/verify-payment

Pass one of: ?reference=, ?trxref=, or ?refno= as a query parameter.

Example request

HTTP Request
GET /api/payment/verify-payment?reference=BPT-XXXXXXXXXX HTTP/1.1
Host: your-payport-domain.com
X-API-Key: YOUR_API_KEY

Success response

Payment confirmed β€” 200
{
  "status":   "success",
  "message":  "Payment verified successfully",
  "data": {
    "amount_paid":  10000.0,
    "student":      "ATA1000110"
  }
}
Payment not confirmed β€” 200
{
  "status":   "failed",
  "message":  "Payment not confirmed.",
  "data": {
    "amount_paid":  0,
    "student":      "ATA1000110"
  }
}

Error responses

400No reference provided. Send reference, trxref, or refno.
404No payment found for the given reference or refno.
πŸ”„

Requery Payment

Sync a payment after a webhook delay

Use Requery when a payment may have been completed on Paystack but the local record hasn't been updated yet (e.g. due to webhook delay). If Paystack confirms success, the payment is marked Paid.

GET /api/payment/requery-payment

Pass one of: ?reference=, ?trxref=, or ?refno= as a query parameter.

Example request

HTTP Request
GET /api/payment/requery-payment?reference=BPT-XXXXXXXXXX HTTP/1.1
Host: your-payport-domain.com
X-API-Key: YOUR_API_KEY

Responses

200{ "message": "Payment already confirmed." }
200{ "message": "Payment pending or not confirmed." }
400Missing reference parameter.
404No payment found for the given reference or refno.
πŸ“‘

Callback (Postback)

Receiving payment notifications on your server

When a payment is confirmed, Payport sends a POST request to your configured callback URL. Set it on your API key in Settings β†’ API Keys, or pass postback_url per-request in the Initialize body.

πŸ’‘
URL format: Payport appends ?ref=BPT-XXXXXXXXXX to your postback URL. Your endpoint should return a 2xx response so Payport can log success.

Payload fields

FieldTypeDescription
payment_idnumberInternal Payport payment ID
referencestringPayport reference (BPT-…) β€” use to match in your system
receipt_numberstringYour original refno from Initialize
statusstring"Paid" when callback is fired after success
amount / amount_paidnumberAmounts in kobo
balance_duenumberRemaining balance (0 for full payment)
payment_datestringHuman-readable date (e.g. "14-03-2025 02:30:45 PM")
matric_no, studentname, email, programmestringPayer details from Initialize
paystack_verifiedbooleantrue when Paystack has confirmed
paystack_statusstring"success" on confirmed payment
metadataobjectPaystack metadata including responseCode and isSuccessful

Example callback payload

POST to your server
{
  "payment_id":         123,
  "reference":          "BPT-XXXXXXXXXX",
  "receipt_number":     "RCP-2025-001",
  "status":             "Paid",
  "amount":             10000,
  "amount_paid":        10000,
  "balance_due":        0,
  "payment_date":       "14-03-2025 02:30:45 PM",
  "matric_no":          "ATA1000110",
  "studentname":        "Jane Doe",
  "session":            "2024/2025",
  "programme":          "B.Sc Computer Science",
  "email":              "jane@example.com",
  "paymentfor":         "School fees",
  "paystack_verified":  true,
  "paystack_status":    "success",
  "metadata": {
    "responseCode":   "0000",
    "isSuccessful":  true,
    "error":         null
  }
}
πŸ–₯️

Dashboard Pages

What's available in your Payport dashboard

After logging in, the sidebar gives you access to the following pages based on your assigned permissions:

/dashboard
Dashboard
Overview of total students, payments, and amounts collected. Recent payments and audit log. Date range and status filters.
/students
Student Records
Full payer list with application number, name, programme, level, and payment count. Search, filter, and download CSV.
/payments
Payments
All payment records with status. Query or requery individual payments. Filter by session, matric, status. Download CSV.
/payments/summary
Payment Summary
Charts and breakdowns by payment type, with totals and date range filters.
/users
Users
Manage dashboard users and assign roles (Super Admin only). View per-user audit trails.
/fee-categories
Fee Categories
Create and manage payment templates: amount, Paystack charge, tech fee, and split codes.
βš™οΈ

Profile & Settings

Managing your account details and password

Profile

Go to Settings β†’ Profile to update your name and email. All changes are recorded in the audit log.

Password

Go to Settings β†’ Password. Enter your current password, then the new password and its confirmation. Use a strong, unique password.

πŸ”’

Two-Factor Authentication

Adding a second layer of security to your login

Go to Settings β†’ Two-Factor Auth. Once enabled, you will need both your password and a time-based code from an authenticator app (e.g. Google Authenticator) to sign in.

βœ…
Recommended: Enable 2FA for all dashboard users, especially Super Admins with API key management access. Enabling and disabling 2FA is recorded in the audit log.

To disable 2FA, go to the same page and confirm using your current 2FA code or recovery codes.

πŸ“‹

Audit Logs

A full record of who did what and when

Payport tracks every significant action β€” logins, API key creation and revocation, profile updates, 2FA changes, and file downloads.

Where to findWhat it shows
Dashboard (main page) Recent activity across all users β€” quick overview of the last few actions
Users β†’ [User name] Full audit trail for that specific user: onboarding, API keys, profile changes, 2FA, downloads