REST API Documentation v1.0

Build powerful
finance integrations.

Automate your invoicing, sync inventory across platforms, and programmatically manage your African SME operations using the Kredo API.

Introduction

The Kredo API is organized around REST. Our API has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can use the API in test mode, which does not affect your live data. The base URL for all API requests is:

BASE URL
https://api.trykredo.com/v1

Authentication

Authenticate your account by including your secret API Key in the request header. You can generate and manage your API keys from the API Integrations section of your dashboard.

Keep your keys safe

Your API keys carry many privileges. Ensure they are kept secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, or front-end applications.

All API requests must include the following headers:

Header Value Description
Authorization Bearer YOUR_SECRET_KEY Pass your API key as a Bearer token.
Content-Type application/json Required for all POST/PUT requests.
Accept application/json To ensure JSON responses.

Errors

Kredo uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, 4xx range indicate an error based on provided information (e.g., missing parameter), and 5xx range indicate an error with Kredo's servers.

ERROR RESPONSE EXAMPLE
{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "The value 'amount' must be greater than 0."
  }
}

Documents (Invoices)

POST
/v1/documents/generate
Core Concept

Create a new document

Instantly generate a highly professional invoice or receipt. This endpoint creates the record in your ledger, computes taxes, deducts inventory (if linked), and returns a Public URL you can directly text or email to your customer.

Body Parameters
type *
string
The type of document. Must be either invoice or receipt.
customer_name *
string
The full name of the customer.
customer_email
string
Customer's email address. Useful for automated follow-ups.
items *
array
Array of objects containing description, qty, and price.
Example Request
{
  "type": "invoice",
  "customer_name": "AfriTech Solutions",
  "customer_email": "billing@afritech.test",
  "items": [
    {
      "description": "Server Migration setup",
      "qty": 1,
      "price": 250000
    }
  ],
  "status": "unpaid"
}
Example Response (200 OK)
{
  "success": true,
  "data": {
    "public_id": "INV-94A2B7F1C",
    "document_number": "INV-2026-0089",
    "view_url": "https://trykredo.com/shared/INV-94A2B7F1C",
    "status": "unpaid",
    "total": 250000
  }
}
GET
/v1/documents

List all documents

Returns a paginated list of all invoices and receipts associated with your business account. The documents are returned sorted by creation date, with the most recent documents appearing first.

Query Parameters
limit
integer
A limit on the number of objects to be returned, between 1 and 100. Default is 50.
status
string
Filter by status. e.g. paid, unpaid, draft.

Webhooks

Webhooks allow your application to receive real-time HTTP POST notifications when events occur within your Kredo account. This is essential for syncing data in real-time without constantly polling the API.

Incoming Webhook Payload

When a customer pays an invoice via the digital portal, Kredo fires an invoice.paid event to your configured endpoint URL.

{
  "event": "invoice.paid",
  "environment": "production",
  "data": {
    "document_id": "INV-94A2B7F1C",
    "amount_paid": 250000,
    "payment_method": "Card (Paystack API)",
    "paid_at": "2026-04-15T14:30:00Z"
  }
}
Configure Webhooks

Ready to go live?

Generate your production keys and start automating your financial operations today.

Sign up for API Access