Skip to content
Products Solutions Developers Company Pricing
Documentation / Introduction

Introduction

FleakStack provides a REST API for accepting payments, managing transactions and receiving payment events. This documentation covers the core resources and how to work with them. Content on this page is illustrative and will be expanded as the API evolves.

Quick Start

To start integrating, create an account and generate a set of test API keys. Use these keys to create your first payment in test mode before switching to live keys.

quick-start.http
POST /api/v1/payments
Authorization: Bearer sk_test_xxxxxxxxxxxxxxxx

{
  "amount": 25000,
  "currency": "NGN",
  "email": "customer@example.com"
}

Authentication

Every request must include an Authorization header with your secret key. Keys are prefixed with sk_test for test mode and sk_live for live mode.

HeaderDescription
AuthorizationBearer token containing your secret key
Content-Typeapplication/json for all requests

Create Payment

Create a new payment by sending an amount, currency and customer email.

create-payment.http
POST /api/v1/payments

{
  "amount": 25000,
  "currency": "NGN",
  "email": "customer@example.com",
  "reference": "ORDER-10001"
}

# Response
{
  "status": "success",
  "reference": "FSK-PAY-10001",
  "amount": 25000,
  "currency": "NGN"
}

Payment Status

Retrieve the current status of a payment using its reference.

payment-status.http
GET /api/v1/payments/FSK-PAY-10001

Checkout

FleakStack Checkout provides a hosted payment interface that collects customer details and completes the payment on your behalf.

Transactions

List transactions and filter them by status, date range or reference to reconcile against your own records.

list-transactions.http
GET /api/v1/transactions?status=success&limit=20

Webhooks

Register a webhook URL to receive real-time notifications when a payment's status changes. Verify the signature on each event to confirm it came from FleakStack.

webhook-payload.json
{
  "event": "payment.success",
  "reference": "FSK-PAY-10001",
  "amount": 25000
}

Create a payment link for a fixed amount that customers can open and pay without any integration on their side.

Refunds

Refund a successful payment in part or in full by referencing its original transaction.

Errors

FleakStack uses standard HTTP status codes. Error responses include a code and message describing what went wrong.

StatusMeaning
400The request was malformed or missing required fields
401The API key is missing or invalid
404The requested resource does not exist
500An unexpected error occurred on FleakStack's side

Test Mode

Test mode lets you build your full integration using sk_test keys without moving real money.

Live Mode

Switch to sk_live keys once your integration is ready to process real payments.