Collection Request Service
Manages collection requests (invoices) for the Kulpay Collection API. Collection requests represent invoices or bills issued by a business to a payer, with support for multiple collection methods, payer details, and full invoice metadata.
Create Collection Request
POST /v1/collection-requests
Creates a new collection request (invoice) for a payer.
Request Body:
{
"description": "Fatura mensal de servicos de contabilidade",
"collection_method_ids": ["cm_mpesa_001", "cm_emola_002"],
"amount": {
"currency": "MZN",
"value": 15000.00
},
"payer": {
"first_name": "Carlos",
"last_name": "Mondlane",
"legal_name": "Mondlane & Filhos Lda",
"vat_number": "400123456",
"address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Av. 25 de Setembro",
"line1": "Edificio 33, 4 Andar"
},
"contact": {
"phone_number": "+258841234567",
"email": "carlos@mondlane.co.mz"
},
"type": "business",
"delivery_method": "email"
},
"third_party_reference": "ERP-INV-2025-0042",
"metadata": {
"department": "finance",
"contract_id": "CTR-2025-100"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | Human-readable description of the collection request |
collection_method_ids | string[] | Yes | IDs of collection methods to use for this request |
amount | object | Yes | Amount object with currency and value |
payer | object | Yes | Payer details (see Payer model) |
third_party_reference | string | No | External reference from your system (e.g., ERP invoice ID) |
metadata | map<string,string> | No | Arbitrary key-value metadata |
Response:
{
"object": "collection_request",
"id": "cr_abc12345",
"collection_method_ids": ["cm_mpesa_001", "cm_emola_002"],
"description": "Fatura mensal de servicos de contabilidade",
"bill_info": {
"bill_id": "bill_mz_98765",
"bill_number": "KULPAY-2025-00042",
"status": "pending",
"due_date": "2025-02-28T00:00:00Z"
},
"amount": {
"currency": "MZN",
"value": 15000.00
},
"collection_method_details": [
{
"collection_method_id": "cm_mpesa_001",
"name": "M-Pesa",
"type": "mobile_money",
"status": "active"
},
{
"collection_method_id": "cm_emola_002",
"name": "e-Mola",
"type": "mobile_money",
"status": "active"
}
],
"payer": {
"first_name": "Carlos",
"last_name": "Mondlane",
"legal_name": "Mondlane & Filhos Lda",
"vat_number": "400123456",
"address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Av. 25 de Setembro",
"line1": "Edificio 33, 4 Andar"
},
"contact": {
"phone_number": "+258841234567",
"email": "carlos@mondlane.co.mz"
},
"type": "business",
"delivery_method": "email"
},
"third_party_reference": "ERP-INV-2025-0042",
"status": "pending",
"metadata": {
"department": "finance",
"contract_id": "CTR-2025-100"
},
"created_at": "2025-01-20T09:15:00Z"
}
Get Collection Request
GET /v1/collection-requests/{id}
Retrieves a single collection request by ID.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Collection request ID (pattern: cr_*) |
Response:
{
"object": "collection_request",
"collection_request": {
"id": "cr_abc12345",
"account_id": "acc_biz_001",
"description": "Fatura mensal de servicos de contabilidade",
"amount": {
"currency": "MZN",
"value": 15000.00
},
"payer": {
"first_name": "Carlos",
"last_name": "Mondlane",
"legal_name": "Mondlane & Filhos Lda",
"vat_number": "400123456",
"address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Av. 25 de Setembro",
"line1": "Edificio 33, 4 Andar"
},
"contact": {
"phone_number": "+258841234567",
"email": "carlos@mondlane.co.mz"
},
"type": "business",
"delivery_method": "email"
},
"third_party_reference": "ERP-INV-2025-0042",
"collection_method_details": [
{
"collection_method_id": "cm_mpesa_001",
"name": "M-Pesa",
"type": "mobile_money",
"status": "active"
}
],
"invoice_metadata": {
"invoice_number": "KULPAY-2025-00042",
"issue_date": "2025-01-20T09:15:00Z",
"due_date": "2025-02-28T00:00:00Z",
"invoice_type": "standard",
"source_channel": "api",
"reference_number": "REF-MZ-00042",
"payment_link": "https://pay.kulpay.co.mz/inv/cr_abc12345"
},
"financial_details": {
"line_items": "Servicos de contabilidade - Janeiro 2025",
"products_info": {
"quantity": 1,
"unit_price": 15000.00,
"subtotals": 15000.00
},
"tax_info": {
"iva": 16.0
},
"discount": 0.00,
"total_amount": {
"currency": "MZN",
"value": 17400.00
},
"fx_rate": 1.0
},
"payment_reconciliation": {
"payment_status": "pending",
"payment_type": "mobile_money",
"gateway_transaction_id": null,
"reconciliation_status": "unmatched",
"date_payment": null,
"date_reconciliation": null
},
"integration_routing": {
"source_system": "erp",
"callback_url": "https://api.mondlane.co.mz/webhooks/kulpay"
},
"compliance_audit": {
"payer_nuit": "400123456",
"issuer_nuit": "500987654",
"invoice_validity": "2025-03-31T23:59:59Z",
"attached_contract": "CTR-2025-100",
"user_issuer": "usr_admin_001",
"user_modifier": null,
"user_remover": null,
"issued_at": "2025-01-20T09:15:00Z",
"viewed_at": null,
"paid_at": null,
"reconciled_at": null
},
"biller": {
"account_id": "acc_biz_001",
"business_name": "TechServ Mocambique Lda",
"logo": {
"file_id": "file_logo_techserv",
"file_bucket": "logos",
"file_link": "/files/logos/file_logo_techserv"
},
"contact": {
"phone_number": "+258821000000",
"email": "facturacao@techserv.co.mz"
},
"issuer_nuit": "500987654",
"billing_address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Rua da Imprensa",
"line1": "Nr. 256, RC"
}
},
"status": "pending",
"created_at": "2025-01-20T09:15:00Z",
"updated_at": "2025-01-20T09:15:00Z"
}
}
List Collection Requests
GET /v1/collection-requests
Lists all collection requests with pagination.
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page_size | integer | 50 | Max results per page (max: 100) |
page_token | string | - | Token for next page |
Response:
{
"object": "list",
"items": [
{
"id": "cr_abc12345",
"account_id": "acc_biz_001",
"description": "Fatura mensal de servicos de contabilidade",
"amount": {
"currency": "MZN",
"value": 15000.00
},
"payer": {
"first_name": "Carlos",
"last_name": "Mondlane",
"legal_name": "Mondlane & Filhos Lda",
"type": "business",
"delivery_method": "email"
},
"status": "pending",
"created_at": "2025-01-20T09:15:00Z",
"updated_at": "2025-01-20T09:15:00Z"
},
{
"id": "cr_def67890",
"account_id": "acc_biz_001",
"description": "Renda do escritorio - Fevereiro 2025",
"amount": {
"currency": "MZN",
"value": 45000.00
},
"payer": {
"first_name": "Ana",
"last_name": "Machel",
"legal_name": "Machel Properties Lda",
"type": "business",
"delivery_method": "sms"
},
"status": "paid",
"created_at": "2025-01-18T14:30:00Z",
"updated_at": "2025-01-25T11:00:00Z"
}
],
"error": null
}
List Collection Requests by Phone Number (Unsecured)
GET /v1/kulpay/collection-requests/list-by-phone-number/{phone_number}
Retrieves all collection requests associated with a payer's phone number.
Note: This endpoint is unsecured -- designed for Kulpay mobile app integration. Do not expose on public networks without additional application-level controls.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
phone_number | string | Payer's phone number in E.164 format (e.g., +258841234567) |
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page_size | integer | 50 | Max results per page (max: 100) |
page_token | string | - | Token for next page |
Response:
{
"object": "list",
"items": [
{
"id": "cr_abc12345",
"description": "Fatura mensal de servicos de contabilidade",
"amount": {
"currency": "MZN",
"value": 15000.00
},
"status": "pending",
"created_at": "2025-01-20T09:15:00Z"
}
],
"error": null
}
Get Collection Request (Unsecured)
GET /v1/kulpay/collection-requests/get-request/{id}
Retrieves a single collection request by ID without authentication.
Note: This endpoint is unsecured -- designed for Kulpay mobile app integration. Do not expose on public networks without additional application-level controls.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Collection request ID (pattern: cr_*) |
Response:
{
"object": "collection_request",
"collection_request": {
"id": "cr_abc12345",
"account_id": "acc_biz_001",
"description": "Fatura mensal de servicos de contabilidade",
"amount": {
"currency": "MZN",
"value": 15000.00
},
"payer": {
"first_name": "Carlos",
"last_name": "Mondlane",
"legal_name": "Mondlane & Filhos Lda",
"vat_number": "400123456",
"address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Av. 25 de Setembro",
"line1": "Edificio 33, 4 Andar"
},
"contact": {
"phone_number": "+258841234567",
"email": "carlos@mondlane.co.mz"
},
"type": "business",
"delivery_method": "email"
},
"third_party_reference": "ERP-INV-2025-0042",
"collection_method_details": [
{
"collection_method_id": "cm_mpesa_001",
"name": "M-Pesa",
"type": "mobile_money",
"status": "active"
}
],
"invoice_metadata": {
"invoice_number": "KULPAY-2025-00042",
"issue_date": "2025-01-20T09:15:00Z",
"due_date": "2025-02-28T00:00:00Z",
"invoice_type": "standard",
"source_channel": "api",
"reference_number": "REF-MZ-00042",
"payment_link": "https://pay.kulpay.co.mz/inv/cr_abc12345"
},
"financial_details": {
"line_items": "Servicos de contabilidade - Janeiro 2025",
"products_info": {
"quantity": 1,
"unit_price": 15000.00,
"subtotals": 15000.00
},
"tax_info": {
"iva": 16.0
},
"discount": 0.00,
"total_amount": {
"currency": "MZN",
"value": 17400.00
},
"fx_rate": 1.0
},
"payment_reconciliation": {
"payment_status": "pending",
"payment_type": "mobile_money",
"gateway_transaction_id": null,
"reconciliation_status": "unmatched",
"date_payment": null,
"date_reconciliation": null
},
"compliance_audit": {
"payer_nuit": "400123456",
"issuer_nuit": "500987654",
"invoice_validity": "2025-03-31T23:59:59Z",
"attached_contract": "CTR-2025-100",
"user_issuer": "usr_admin_001",
"user_modifier": null,
"user_remover": null,
"issued_at": "2025-01-20T09:15:00Z",
"viewed_at": null,
"paid_at": null,
"reconciled_at": null
},
"biller": {
"account_id": "acc_biz_001",
"business_name": "TechServ Mocambique Lda",
"logo": {
"file_id": "file_logo_techserv",
"file_bucket": "logos",
"file_link": "/files/logos/file_logo_techserv"
},
"contact": {
"phone_number": "+258821000000",
"email": "facturacao@techserv.co.mz"
},
"issuer_nuit": "500987654",
"billing_address": {
"country": "MZ",
"state_province": "Maputo",
"city": "Maputo",
"street": "Rua da Imprensa",
"line1": "Nr. 256, RC"
}
},
"status": "pending",
"created_at": "2025-01-20T09:15:00Z",
"updated_at": "2025-01-20T09:15:00Z"
}
}
Update Collection Request
PUT /v1/collection-requests/{id}
Updates an existing collection request. Only provided fields are updated.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Collection request ID (pattern: cr_*) |
Request Body:
{
"name": "Fatura actualizada - servicos de contabilidade",
"type": "recurring",
"account_id": "acc_biz_002",
"details": {
"collection_method_id": "cm_mpesa_001",
"name": "M-Pesa",
"type": "mobile_money",
"status": "active"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated name for the collection request |
type | string | No | Updated type classification |
account_id | string | No | Reassign to a different account |
details | object | No | Updated collection method detail (see CollectionMethodDetail) |
Response:
{
"object": "collection_request",
"collection_request": {
"id": "cr_abc12345",
"name": "Fatura actualizada - servicos de contabilidade",
"type": "recurring",
"account_id": "acc_biz_002",
"status": "pending",
"created_at": "2025-01-20T09:15:00Z",
"updated_at": "2025-01-22T16:45:00Z"
},
"error": null
}
Delete Collection Request
DELETE /v1/collection-requests/{id}
Deletes a collection request from the system.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Collection request ID (pattern: cr_*) |
Response:
{
"object": "collection_request",
"error": null
}
Data Models
Payer
Represents the individual or business being billed.
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | Yes | Payer's first name |
last_name | string | Yes | Payer's last name |
legal_name | string | Yes | Legal business name (for business payers) |
vat_number | string | Yes | VAT / NUIT number |
address | object | No | Payer's address (see Address) |
contact | object | No | Payer's contact information (see Contact) |
type | string | Yes | Payer type (e.g., business, individual) |
delivery_method | string | Yes | How to deliver the invoice: email, sms, or erp |
Address
| Field | Type | Description |
|---|---|---|
country | string | ISO 3166-1 alpha-2 country code (e.g., MZ) |
state_province | string | State or province name |
city | string | City name |
street | string | Street name |
line1 | string | Additional address line (building, floor, suite) |
Contact
| Field | Type | Description |
|---|---|---|
phone_number | string | Phone number in E.164 format |
email | string | Email address |
InvoiceMetadata
Invoice-level metadata attached to the collection request.
| Field | Type | Description |
|---|---|---|
invoice_number | string | System-generated invoice number |
issue_date | string | ISO 8601 date when the invoice was issued |
due_date | string | ISO 8601 payment due date |
invoice_type | string | Invoice type (e.g., standard, proforma, credit_note) |
source_channel | string | Channel that originated the request (e.g., api, portal, erp) |
reference_number | string | Internal reference number |
payment_link | string | URL where the payer can complete payment |
FinancialDetails
Detailed financial breakdown for the collection request.
| Field | Type | Description |
|---|---|---|
line_items | string | Description of line items |
products_info | object | Product details: quantity, unit_price, subtotals |
tax_info | object | Tax details: iva (Mozambique VAT percentage) |
discount | number | Discount amount applied |
total_amount | object | Final amount with currency and value |
fx_rate | number | Foreign exchange rate applied (1.0 for local currency) |
PaymentAndReconciliation
Tracks payment status and reconciliation state.
| Field | Type | Description |
|---|---|---|
payment_status | string | pending, in_process, paid, or failed |
payment_type | string | Payment method type used |
gateway_transaction_id | string | Transaction ID from the payment gateway |
reconciliation_status | string | matched or unmatched |
date_payment | string | ISO 8601 date when payment was received |
date_reconciliation | string | ISO 8601 date when reconciliation completed |
Payment Status Values
| Status | Description |
|---|---|
pending | Invoice issued, awaiting payment |
in_process | Payment initiated, processing |
paid | Payment received in full |
failed | Payment attempt was unsuccessful |
Reconciliation Status Values
| Status | Description |
|---|---|
matched | Payment has been reconciled with the invoice |
unmatched | Payment has not yet been reconciled |
ComplianceAndAudit
Regulatory compliance and audit trail fields.
| Field | Type | Description |
|---|---|---|
payer_nuit | string | Payer's NUIT (tax identification number) |
issuer_nuit | string | Issuer's NUIT (tax identification number) |
invoice_validity | string | ISO 8601 date when the invoice expires |
attached_contract | string | Reference to an attached contract |
user_issuer | string | User ID who created the collection request |
user_modifier | string | User ID who last modified the collection request |
user_remover | string | User ID who deleted the collection request |
issued_at | string | ISO 8601 timestamp when the request was issued |
viewed_at | string | ISO 8601 timestamp when the payer first viewed the request |
paid_at | string | ISO 8601 timestamp when payment was completed |
reconciled_at | string | ISO 8601 timestamp when reconciliation completed |
AccountDetails (Biller)
Information about the business that issued the collection request.
| Field | Type | Description |
|---|---|---|
account_id | string | Biller's account ID |
business_name | string | Registered business name |
logo | object | Business logo with file_id, file_bucket, and file_link |
contact | object | Biller contact: phone_number and email |
issuer_nuit | string | Biller's NUIT (tax identification number) |
billing_address | object | Biller's address (see Address) |