Launch and grow your payment experience with PAYSEED

API Reference v1

PAYSEED API Documentation

Integrate PAYSEED to accept payments, verify transactions, process refunds, and manage your account programmatically.

Authentication

PAYSEED uses API keys for authentication. Include your secret key in the Authorization header of every request:

Authorization: Bearer PS_SK_TEST_xxxxxxxx

Important: Never expose your secret key in client-side code, browser storage, or public repositories.

Secret keys (PS_SK_*) must only be used on your backend. Public keys (PS_PK_*) may be used in client-facing components.

Amounts

All monetary amounts in the PAYSEED API are expressed in the smallest currency unit (e.g., pesewas for GHS, kobo for NGN). This avoids floating-point rounding errors.

Example conversions:

  • GHS 250.00amount: 25000 (250 × 100 pesewas)
  • NGN 1,500.00amount: 150000 (1500 × 100 kobo)
  • GHS 1.00amount: 100

Endpoints

POST
/api/v1/payments/initialize
GET
/api/v1/payments/:reference
POST
/api/v1/payments/:reference/refund
GET
/api/v1/transactions
GET
/api/v1/customers
POST
/api/v1/payment-links
GET
/api/v1/settlements

Initialize a payment

POST
/api/v1/payments/initialize

Request body

amount
required
— integer, smallest currency unit
currency
required
— string, e.g. "GHS", "NGN"
email
required
— string, customer email
reference
required
— string, unique merchant reference
callback_url
optional
— string, URL to redirect customer after payment
metadata
optional
— object, custom key-value pairs

Example request

curl -X POST https://api.payseed.example/v1/payments/initialize \
  -H "Authorization: Bearer PS_SK_TEST_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 50000,
    "currency": "GHS",
    "email": "customer@example.com",
    "reference": "merchant_unique_reference",
    "callback_url": "https://merchant.example.com/payment-return",
    "metadata": {
      "order_id": "ORDER-1024"
    }
  }'

Example response

{
  "status": true,
  "message": "Payment session created",
  "data": {
    "reference": "PS_TEST_123456789",
    "checkout_url": "https://checkout.payseed.example/PS_TEST_123456789",
    "status": "initiated"
  }
}

Payment verification

Never mark a payment as successful simply because the customer was redirected to your callback URL. Always verify the payment using one of these methods:

  1. Server-side verification: Call GET /api/v1/payments/:reference from your backend and check the status, amount, and currency match your records.
  2. Webhook verification: Listen for the payment.successful webhook event, verify its signature, and confirm the transaction details before delivering value.

Critical rule

Customers must only be credited after a verified server-side payment confirmation — never because the payment page redirects them back. PAYSEED verifies the transaction directly with the upstream provider and checks the reference, amount, and currency before confirming a payment.

Webhooks

PAYSEED sends signed webhook events to your configured endpoints. Available events:

payment.initiated
payment.pending
payment.successful
payment.failed
payment.reversed
refund.processing
refund.successful
refund.failed
settlement.processing
settlement.successful
settlement.failed
dispute.created
dispute.updated

Signature verification

Each webhook delivery includes a Payseed-Signature header. Verify it by computing an HMAC-SHA256 of the request body using your webhook signing secret:

import crypto from 'crypto';

const signature = crypto
  .createHmac('sha256', WEBHOOK_SECRET)
  .update(rawBody)
  .digest('hex');

if (signature !== request.headers['payseed-signature']) {
  return res.status(401).send('Invalid signature');
}

Error codes

CodeDescription
200Successful request
201Resource created successfully
400Bad request — invalid parameters
401Unauthorized — invalid or missing API key
404Resource not found
409Conflict — duplicate reference or idempotency key
429Rate limit exceeded
500Server error — please retry

Pagination & Rate limits

List endpoints return 25 items per page. Use page and per_page query parameters for pagination.

Rate limit: 100 requests per minute per API key. Responses include X-RateLimit-Remaining and X-RateLimit-Reset headers.

Use the Idempotency-Key header to prevent duplicate operations. PAYSEED stores the key for 24 hours and returns the original response for duplicate requests.

SDKs

Node.js
Available
npm install payseed
PHP
Available
composer require payseed/payseed
Python
Available
pip install payseed
Go
Coming soon
go get payseed