KuvarPay API
Home
Home
  1. Invoices
  • Overview
  • SDK Integration Guide
  • Webhooks Integration Guide
  • Subscriptions Guide
  • Transactions
    • Calculate Payment Amount
      POST
    • Create Transaction
      POST
    • Get Transactions Details
      GET
    • Get Transactions
      GET
  • Checkout Sessions
    • Create Checkout Session
      POST
    • Get Checkout Session
      GET
  • Transfer Fees
    • /api/v1/optimal-transfer-fee
      GET
  • Sandbox Simulator
    • Force Simulator Scenario
      POST
    • Force Transaction Status
      POST
  • Invoices
    • Create a new invoice
      POST
    • Send invoice email to customer
      POST
  • Payment Links
    • Create a new payment link
      POST
  • Server-Sent Events (SSE)
    • Get Transaction Details
      GET
    • Get Session Details
      GET
  • Subscriptions
    • Create Plans
      POST
    • Get Plans
      GET
    • Get Plans Details
      GET
    • Update Plans Details
      PATCH
    • Create Prices
      POST
    • Get Prices
      GET
    • Update Prices Details
      PATCH
    • Create Checkout Sessions
      POST
    • Get Checkout Sessions Details
      GET
    • Confirm Subscription Checkout
      POST
    • Create Subscriptions
      POST
    • Get Subscriptions
      GET
    • Get Subscriptions Details
      GET
    • Update Subscriptions Details
      PATCH
    • Delete Subscriptions Details
      DELETE
    • Renew Subscription
      POST
    • Confirm Subscription Cancellation
      POST
    • Create Subscription Invoices
      POST
    • Upgrade Subscription
      POST
    • Get Subscription Invoices
      GET
    • Downgrade Subscription
      POST
    • Renew Subscription Authorization
      POST
    • Create Metered Invoices
      POST
    • Get Subscription Invoices Details
      GET
    • Get Charge Attempts
      GET
    • Create Authorizations
      POST
    • Revoke Relay Authorization
      POST
    • Get Relay Authorization Status
      GET
  • Currencies
    • Get Subscription Currencies
    • Get Supported Currencies
    • Get networks supported for subscription payments
    • Get Currencies
    • Get all supported networks
  • Schemas
    • ErrorResponse
    • CreateInvoiceRequest
    • CreatePaymentLinkRequest
    • InvoiceResponse
    • PaymentLinkResponse
    • CreateInvoiceResponse
    • CreatePaymentLinkResponse
    • SendInvoiceEmailRequest
    • SendInvoiceEmailResponse
    • SubscriptionInvoice
Home
Home
  1. Invoices

Create a new invoice

POST
/api/v1/invoices
Invoices

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Invoice created successfully
Body

🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/invoices' \
--header 'x-business-id;' \
--header 'Idempotency-Key;' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customerName": "John Doe",
    "customerEmail": "john@example.com",
    "customerPhone": "+234123456789",
    "customerAddress": "123 Main St, Lagos, Nigeria",
    "items": [
        {
            "description": "Web Development Service",
            "quantity": 2,
            "unitPrice": 50000,
            "currency": "NGN"
        },
        {
            "description": "SEO Optimization",
            "quantity": 1,
            "unitPrice": 25000,
            "currency": "NGN"
        }
    ],
    "dueDate": "2025-02-01T00:00:00Z",
    "notes": "Payment due within 30 days",
    "taxRate": 7.5,
    "discountAmount": 5000,
    "metadata": {
        "project_id": "proj_123",
        "client_type": "premium"
    }
}'
Response Response Example
201 - Success
{
    "success": true,
    "message": "Invoice created successfully",
    "data": {
        "id": "inv_123456",
        "invoiceNumber": "INV-202501-0001",
        "businessId": "biz_123",
        "customerName": "John Doe",
        "customerEmail": "john@example.com",
        "customerPhone": "+234123456789",
        "customerAddress": "123 Main St, Lagos, Nigeria",
        "subtotal": 125000,
        "taxAmount": 9375,
        "discountAmount": 5000,
        "totalAmount": 129375,
        "currency": "NGN",
        "status": "PENDING",
        "dueDate": "2025-02-01T00:00:00Z",
        "notes": "Payment due within 30 days",
        "paymentUrl": "https://payment.rayswap.exchange/invoice/inv_123456",
        "items": [
            {
                "id": "item_123",
                "description": "Web Development Service",
                "quantity": 2,
                "unitPrice": 50000,
                "totalPrice": 100000,
                "currency": "NGN"
            },
            {
                "id": "item_124",
                "description": "SEO Optimization",
                "quantity": 1,
                "unitPrice": 25000,
                "totalPrice": 25000,
                "currency": "NGN"
            }
        ],
        "createdAt": "2025-01-01T12:00:00Z",
        "updatedAt": "2025-01-01T12:00:00Z",
        "metadata": {
            "project_id": "proj_123",
            "client_type": "premium"
        }
    }
}
Modified at 2026-01-06 16:03:55
Previous
Force Transaction Status
Next
Send invoice email to customer
Built with