Tranzakt APIs
  1. Invoices
Tranzakt APIs
  • Introduction
  • Collections
    • Get Collection by ID
      GET
    • Get Collection Invoices
      GET
  • Invoices
    • Create Invoice
      POST
    • Get Invoice by ID
      GET
    • Invalidate Invoice
      POST
  • Webhooks
    • Webhooks 🔔
  1. Invoices

Create Invoice

POST
https://api.tranzakt.finance/api/v1/invoices
Creates a new invoice with specified payer details and payment information.
Note: Amount and invoiceBeneficiaries are required if not already set on the collection.

Request

Header Params

Body Params application/json

Example
{
    "collectionId": "string",
    "title": "string",
    "payerName": "string",
    "payerEmail": "string",
    "payerPhoneNumber": "string",
    "billerMetaData": {
        "key1": "string"
    },
    "amount": 0,
    "callBackUrl": "string",
    "invoiceBeneficiaries": [
        {
            "linkedAccountId": "string",
            "amount": 0
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.tranzakt.finance/api/v1/invoices' \
--header 'x-api-key: Your secret key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "collectionId": "string",
    "title": "string",
    "payerName": "string",
    "payerEmail": "string",
    "payerPhoneNumber": "string",
    "billerMetaData": {
        "key1": "string"
    },
    "amount": 0,
    "callBackUrl": "string",
    "invoiceBeneficiaries": [
        {
            "linkedAccountId": "string",
            "amount": 0
        }
    ]
}'

Responses

🟢201Created
application/json
Body

Examples
{
    "status": "success",
    "message": "Invoice created successfully",
    "data": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "title": "Invoice #123",
        "collectionName": "Q1 Sales Collection",
        "payerName": "John Doe",
        "payerEmail": "john@example.com",
        "payerPhoneNumber": "2348012345678",
        "billerName": "ABC Company",
        "amount": 1000,
        "serviceCharge": 50,
        "vat": 75,
        "totalAmount": 1125,
        "invoiceStatus": "Unpaid",
        "paymentUrl": "https://payment.example.com/invoice/123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2024-03-21T10:00:00Z"
    }
}
Modified at 2024-11-13 11:09:44
Previous
Invoices
Next
Get Invoice by ID
Built with