1. Billing
  • Jokoor API Documentation
  • Getting started
    • Authentication
    • Pagination
    • Quick Start
    • Error Handling
    • Response Format
  • Payments
    • Payment Links
    • Checkouts
    • Payment Status
  • SMS
    • SMS Templates
    • Resending SMS Messages
    • Message Segments
    • SMS Contact Groups
    • SMS Contacts
    • SMS Campaigns
    • Sending SMS Messages
  • Billing
    • Invoices
    • Invoice Payments (Offline/Manual Recording)
    • Receipts
    • Subscriptions
  • Resources
    • Donations
    • Customers
    • Products
    • Transactions
    • Refunds
  • Payouts
    • Payout Requests
    • Bank Accounts
    • Recipient Payouts
    • Payout Recipients
    • Payout Reversals
    • Payout Balance
  • Webhooks
    • Webhook Events
    • Webhook Endpoints
  • APIs
    • Health
      • Health check
    • SMS
      • Send SMS message
      • List SMS messages
      • Get SMS message details
      • Send a draft SMS message
      • Resend failed SMS
      • Batch resend failed messages
    • SMS Templates
      • Create SMS template
      • List SMS templates
      • Get SMS template
      • Update SMS template
      • Delete SMS template
    • SMS Contacts
      • Create contact
      • List contacts
      • Get contact
      • Update contact
      • Delete contact
    • SMS Contact Groups
      • Create contact group
      • List contact groups
      • Get contact group
      • Update contact group
      • Delete contact group
      • Add contacts to group
      • Remove contacts from group
    • SMS Campaigns
      • Create SMS campaign
      • List SMS campaigns
      • Get SMS campaign
      • Update SMS campaign
      • Delete SMS campaign
      • Send SMS campaign
      • Send draft SMS campaign
      • Send campaign asynchronously
      • Get campaign messages
      • Get campaign statistics
      • Resend failed campaign messages
    • SMS Analytics
      • Get segment analytics
      • Preview message segments
    • Checkouts
      • Create checkout session
      • Get checkout session
      • Cancel checkout
    • Payment Links
      • Create payment link
      • List payment links
      • Get payment link
      • Update payment link
      • Delete payment link
    • Invoices
      • Create invoice
      • List invoices
      • Get invoice
      • Update invoice
      • Cancel invoice
      • Finalize draft invoice
      • Send invoice via email
      • Download invoice PDF
      • Record invoice payment
      • List invoice payments
      • Get invoice receipts
    • Receipts
      • List receipts
      • Get receipt by ID
      • Get receipt by number
      • Download receipt PDF
    • Transactions
      • List transactions
      • Get transaction
    • Refunds
      • Refund transaction
      • List refunds
      • Get refund
    • Customers
      • Create or retrieve customer
      • List customers
      • Get customer
      • Update customer
      • Delete customer
    • Products
      • Create product
      • List products
      • Get product
      • Update product
      • Delete product
    • Donations
      • Create donation campaign
      • List donation campaigns
      • Get donation campaign
      • Update donation campaign
      • Delete donation campaign
    • Subscriptions
      • Create subscription
      • List subscriptions
      • Get subscription
      • Update subscription
      • Cancel subscription
      • List subscription invoices
      • Trigger subscription processing
    • Payouts
      • Get payout balance
      • List bank accounts
      • Create payout request
      • List payout requests
      • Get payout request
      • Cancel payout request
    • Payout Recipients
      • Create payout recipient
      • List payout recipients
      • Get payout recipient
      • Update payout recipient
      • Delete payout recipient
      • Send payout to recipient
      • List recipient payouts
      • Get recipient payout
      • Reverse or cancel recipient payout
    • Webhooks
      • Create webhook endpoint
      • List webhook endpoints
      • Get webhook endpoint
      • Update webhook endpoint
      • Delete webhook endpoint
      • Test webhook endpoint
    • Webhook Events
      • List webhook events
      • Get webhook event
      • Retry webhook event
  • Schemas
    • Schemas
      • ErrorResponse
      • HealthResponse
      • SendSMSRequest
      • SMSMessageResponse
      • SMSMessageListResponse
      • BatchResendResponse
      • SMSDashboardResponse
      • SMSPlansListResponse
      • CreateSMSTemplateRequest
      • UpdateSMSTemplateRequest
      • SMSTemplateResponse
      • SMSTemplateListResponse
      • CreateSMSContactRequest
      • UpdateSMSContactRequest
      • SMSContactResponse
      • SMSContactListResponse
      • CreateSMSContactGroupRequest
      • UpdateSMSContactGroupRequest
      • SMSContactGroupResponse
      • SMSContactGroupListResponse
      • CreateSenderIDRequest
      • UpdateSenderIDRequest
      • SenderIDResponse
      • SenderIDListResponse
      • CreateSMSCampaignRequest
      • UpdateSMSCampaignRequest
      • SMSCampaignResponse
      • SMSCampaignListResponse
      • CreateCheckoutRequest
      • CheckoutResponse
      • InitializePaymentRequest
      • InitializePaymentResponse
      • PaymentStatusResponse
      • PaymentSessionResponse
      • CreatePaymentLinkRequest
      • UpdatePaymentLinkRequest
      • PaymentLinkResponse
      • PaymentLinkListResponse
      • CreateInvoiceRequest
      • UpdateInvoiceRequest
      • RecordInvoicePaymentRequest
      • InvoiceResponse
      • InvoiceListResponse
      • InvoicePaymentListResponse
      • InvoiceReceiptInfo
      • Receipt
      • ListReceiptsResponse
      • CreateSubscriptionRequest
      • SubscriptionResponse
      • SubscriptionListResponse
      • UpdateSubscriptionRequest
      • TransactionResponse
      • TransactionListResponse
      • RefundResponse
      • RefundListResponse
      • CreateCustomerRequest
      • UpdateCustomerRequest
      • CustomerResponse
      • CustomerListResponse
      • CreateProductRequest
      • UpdateProductRequest
      • ProductResponse
      • ProductListResponse
      • CreateDonationCampaignRequest
      • UpdateDonationCampaignRequest
      • DonationCampaignResponse
      • DonationCampaignListResponse
      • PayoutBalanceResponse
      • CreateBankAccountRequest
      • BankAccountResponse
      • CreatePayoutRequest
      • PayoutRequestResponse
      • PayoutRequestListResponse
      • CreatePayoutRecipientRequest
      • UpdatePayoutRecipientRequest
      • PayoutRecipientResponse
      • PayoutRecipientListResponse
      • SendRecipientPayoutRequest
      • RecipientPayoutResponse
      • RecipientPayoutListResponse
      • CreateWebhookEndpointRequest
      • UpdateWebhookEndpointRequest
      • WebhookEndpointResponse
      • WebhookEndpointListResponse
      • WebhookEventResponse
      • WebhookEventListResponse
  1. Billing

Invoices

Create and manage invoices with automatic tax calculation and PDF generation.

Create Invoice#

Create a new invoice for a customer.
Endpoint: POST /v1/pay/invoices
Authentication: Required
Request Body:
FieldTypeRequiredDescription
customer_idstringNo*ID of existing customer
customer_emailstringNo*Customer email (required if customer_id not provided)
customer_namestringNo*Customer name (required if customer_id not provided)
customer_addressstringNoCustomer address
customer_phonestringNoCustomer phone number in E.164 format
currencystringYesCurrency code (default: "GMD")
tax_ratenumberNoTax rate as percentage (0-100, default: 0)
due_datestringYesInvoice due date (ISO 8601)
notesstringNoAdditional notes or terms
itemsarrayYesInvoice items (minimum 1)
items[].product_idstringNo**Product ID (auto-fills description and unit_price)
items[].descriptionstringNo**Item description (required if product_id not provided)
items[].quantityintegerYesItem quantity (minimum 1)
items[].unit_pricestringNo**Unit price as decimal (required if product_id not provided)
is_draftbooleanNoCreate as draft (default: false)
metadataobjectNoCustom metadata
*Either customer_id or customer_email+customer_name required
**Either product_id or description+unit_price required per item
Invoice Statuses:
draft - Not finalized, can be edited
pending - Waiting for payment
paid - Fully paid
partially_paid - Partially paid
overdue - Past due date, unpaid
cancelled - Cancelled
Payment Statuses:
unpaid - No payment received
partial - Partially paid
paid - Fully paid
cancelled - Invoice cancelled
TIP
Tax Calculation: Tax is calculated automatically as tax_amount = amount * (tax_rate / 100). The total_amount = amount + tax_amount.
Example:
HTTP
TypeScript
Python
Success Response (201):
{
  "data": {
    "id": "inv_abc123",
    "invoice_number": "INV-2024-12-0001",
    "customer_id": "cus_xyz789",
    "customer_email": "customer@example.com",
    "customer_name": "John Doe",
    "amount": "1000.00",
    "tax_rate": 15,
    "tax_amount": "150.00",
    "total_amount": "1150.00",
    "paid_amount": "0.00",
    "remaining_amount": "1150.00",
    "currency": "GMD",
    "status": "pending",
    "payment_status": "unpaid",
    "payment_url": "https://pay.jokoor.com/invoice/inv_abc123",
    "pdf_url": "/v1/pay/invoices/public/inv_abc123/pdf",
    "due_date": "2024-12-31T23:59:59Z",
    "issued_date": "2024-01-15T10:30:00Z",
    "subscription_id": null,
    "mode": "test",
    "livemode": false,
    "version": 1,
    "items": [
      {
        "description": "Web development services",
        "quantity": 1,
        "unit_price": "1000.00",
        "total": "1000.00"
      }
    ],
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
INFO
Payment URL: The payment_url is only available for invoices that can be paid online:
✅ Available for: pending, partially_paid, overdue invoices
❌ Not available for: draft, paid, cancelled invoices
When available, customers can visit this URL to pay the invoice online using Wave, Afrimoney, Card, etc.

Get Invoice#

Get details of a specific invoice.
Endpoint: GET /v1/pay/invoices/{id}
Authentication: Required
Example:
HTTP
TypeScript
Python

List Invoices#

Get a paginated list of invoices.
Endpoint: GET /v1/pay/invoices
Authentication: Required
Query Parameters:
ParameterTypeRequiredDescription
offsetintegerNoNumber of items to skip (default: 0)
limitintegerNoMaximum number of items to return (default: 20, max: 100)
statusstringNoFilter by status
customer_emailstringNoFilter by customer email
searchstringNoSearch in invoice number or customer name
Example:
HTTP
TypeScript
Python

Update Invoice#

Update an invoice (only draft or pending invoices can be updated).
Endpoint: PUT /v1/pay/invoices/{id}
Authentication: Required
Request Body:
FieldTypeRequiredDescription
customer_emailstringNoCustomer email
customer_namestringNoCustomer name
customer_addressstringNoCustomer address
customer_phonestringNoCustomer phone
tax_ratenumberNoTax rate as percentage (0-100)
due_datestringNoDue date (ISO 8601)
notesstringNoNotes or terms
metadataobjectNoCustom metadata

Finalize Invoice#

Convert a draft invoice to pending status.
Endpoint: POST /v1/pay/invoices/{id}/finalize
Authentication: Required
Example:
HTTP
TypeScript
Python

Send Invoice#

Send an invoice to the customer via email.
Endpoint: POST /v1/pay/invoices/{id}/send
Authentication: Required
Request Body:
FieldTypeRequiredDescription
messagestringNoOptional custom message to include in the email
Example:
HTTP
TypeScript
Python

Cancel Invoice#

Cancel a pending or overdue invoice.
Endpoint: POST /v1/pay/invoices/{id}/cancel
Authentication: Required
Example:
HTTP
TypeScript
Python

Download Invoice PDF#

Download an invoice as a PDF file.
Endpoint: GET /v1/pay/invoices/{id}/pdf
Authentication: Required
Example:
HTTP
TypeScript
Python
Success Response (200): PDF binary data

Paying Invoices#

There are two ways customers can pay invoices:

Option 1: Online Payment (Recommended for Digital Payments)#

For Wave, Afrimoney, Card, and other online payment methods, customers visit the invoice payment_url which provides a hosted payment page.
How it works:
1.
You create and send invoice to customer
2.
Customer receives invoice with payment_url
3.
Customer clicks the URL
4.
Hosted page handles payment method selection and processing
5.
Payment completes automatically
6.
Invoice status updates to paid
Customer Experience:
Customer receives invoice email
  ↓
Clicks "Pay Invoice" → visits payment_url
  ↓
Hosted page shows invoice details
  ↓
Customer selects payment method (Wave, Afrimoney, etc.)
  ↓
Completes payment with provider
  ↓
Returns to success page
Benefits:
✅ Automatic payment processing
✅ No manual work required
✅ Instant status updates
✅ Automatic receipt generation
✅ Multiple payment methods
✅ Mobile-friendly

Option 2: Offline Payment Recording (For Manual Payments)#

For cash, bank transfers, checks, and other offline methods, use the Record Invoice Payment endpoint to manually record payments received outside the platform.
How it works:
1.
Customer pays through offline method (cash, bank transfer, etc.)
2.
You receive the payment
3.
You call the API to record the payment
4.
Invoice status updates
5.
Receipt is automatically generated
When to use:
Customer pays with cash
Customer makes bank transfer to your account
Customer pays by check
Customer uses Western Union, MoneyGram, etc.
Any payment outside Jokoor platform
Example:
HTTP
TypeScript
Python
See Record Invoice Payment for full details.

Quick Decision Guide#

Payment MethodUse This Option
WaveOption 1 (Online - payment_url)
AfrimoneyOption 1 (Online - payment_url)
CardOption 1 (Online - payment_url)
QMoneyOption 1 (Online - payment_url)
CashOption 2 (Offline - record payment)
Bank TransferOption 2 (Offline - record payment)
Check/ChequeOption 2 (Offline - record payment)
Western UnionOption 2 (Offline - record payment)
MoneyGramOption 2 (Offline - record payment)
WARNING
Important: Don't mix these up!
Online payments (Wave, etc.) → Customer uses payment_url
Offline payments (cash, etc.) → You call record payment endpoint
Using the wrong method will cause confusion and payment issues.
Modified at 2025-11-15 15:43:35
Previous
Sending SMS Messages
Next
Invoice Payments (Offline/Manual Recording)
Built with