Skip to main content

Invoice Lifecycle

The invoice lifecycle describes the end-to-end flow of a collection request — from creation by a biller, through delivery and payment, to reconciliation. This process is the core business flow of the Kulpay Collection API.

Participants

ParticipantRoleChannel
BillerIssues invoices and tracks paymentsPortal Web / ERP Integration
Kulpay Collection APIManages invoice lifecycle, routes payments, and triggers notifications
Payer (Customer)Receives and pays invoicesKulpay App / Bank / SIMO ERV
Payment ProviderProcesses the payment transactionBank / SIMO ERV

Process Flow

Step-by-Step

Phase 1: Invoice Creation

  1. Biller creates a collection request via the API or the bill-created webhook
  2. The system generates a unique collection request ID
  3. Collection method details are attached (SIMO ERV reference or interbank NIB)
  4. A customer bill record is created with invoice metadata

API Endpoints:

  • POST /v1/collection-requests — Create via API
  • POST /v1/collection-requests/web-hook/bill-created — Create via webhook

Phase 2: Invoice Delivery

  1. Based on the payer's delivery_method, the invoice is delivered:
    • SMS: Payment reference and amount sent to payer's phone
    • Email: Full invoice with payment link sent to payer's email
    • ERP: Invoice synced back to the biller's ERP system
    • Kulpay App: Push notification sent to the customer's Kulpay account
  2. The bill-delivered webhook confirms delivery

API Endpoints:

  • POST /v1/collection-requests/{id}/web-hook/bill-delivered — Delivery confirmation
  • POST /v1/collection-requests/{id}/web-hook/kulpay — App notification

Phase 3: Customer Engagement

  1. Customer opens/views the invoice
  2. The bill-opened webhook tracks this event
  3. The system updates the invoice status history

API Endpoints:

  • POST /v1/collection-requests/{id}/web-hook/bill-opened — View tracking

Phase 4: Payment

  1. Customer pays using one of the available methods:
    • Kulpay App: Direct in-app payment → triggers customer-paid webhook
    • SIMO ERV: Customer pays using entity number + reference at any bank or ATM
    • Bank Transfer: Customer transfers to the biller's NIB
  2. For external payments (SIMO/bank), the payment is ingested via the Payment Ingest endpoint
  3. The bill-paid webhook notifies the biller

API Endpoints:

  • POST /v1/collection-requests/{id}/web-hook/customer-paid — In-app payment
  • POST /v1/payments/ingest — External payment ingestion
  • POST /v1/collection-requests/{id}/web-hook/bill-paid — Payment notification

Phase 5: Reconciliation

  1. The system matches the payment to the collection request
  2. Reconciliation status is updated:
    • Matched: Payment amount matches the invoice → automatically reconciled
    • Unmatched: Discrepancy detected → flagged for manual review
  3. Compliance and audit fields are updated (paid_at, reconciled_at)

Invoice Status Values

StatusDescription
pendingInvoice created, not yet delivered or paid
deliveredInvoice delivered to payer
viewedPayer has opened/viewed the invoice
in_processPayment is being processed
paidPayment confirmed and reconciled
failedPayment attempt failed

Payment Reconciliation Status

StatusDescription
matchedPayment amount matches invoice — automatically reconciled
unmatchedPayment discrepancy — requires manual review
EndpointPurpose
POST /v1/collection-requestsCreate a new invoice
GET /v1/collection-requests/{id}Check invoice status
GET /v1/paymentsList payments for a collection request
POST /v1/payments/ingestIngest external payment
See Webhooks & EventsAll webhook endpoints

Business Rules

  • Invoices can have multiple collection methods (both SIMO ERV and interbank)
  • The delivery_method on the payer determines how the invoice is sent
  • Partial payments are tracked but require manual reconciliation
  • All invoices include compliance fields (payer NUIT, issuer NUIT) for regulatory requirements
  • Invoice metadata includes fx_rate for cross-currency scenarios
  • IVA (Value-Added Tax) is tracked in the financial details