Skip to main content
This guide explains how to implement the Billing File (SFTP File Ingestion) pattern with Moment.
It enables merchants to present bills across Moment’s online and in-person network using a low-code, file-based workflow.

Pattern Overview

A low-code, standardized pattern that works with any billing system using one pre-defined schema. Merchants:
  • Populate billing data
  • Deliver files via SFTP
Moment handles validation, ingestion, and bill presentation.

When to Use This Pattern

Use this pattern if:
  • You want minimal engineering effort
  • You prefer SFTP file delivery over APIs
  • You want the fastest path to bill presentment
You may migrate to the Billing API later for real-time needs.

Integration Responsibilities

What the Merchant Provides

Billing File Format

Each billing file includes:
  1. Customer information (Items 1–6)
  2. Amount payable (Items 7–8)
  3. Optional metadata — biller-specific fields that support internal system requirements

File Schema

ItemItem NameField NameTypeExampleRequired
1First Namefirst_nameStringJohnTrue
2Last Namelast_nameStringDoeTrue
3Passport Numberpassport_numberStringP12345678Either 3 or 4
4SA ID Numbersa_identification_numberDecimal8501015800085Either 3 or 4
5Mobilemobile_phone_numberDecimal0821234567False
6EmailemailString[email protected]False
7Due Datedue_dateDate2025-02-20False
8Amount Dueamount_dueDecimal240.00True
Identifier rules:
  • Merchant may choose any unique identifier (account number, policy number, subscriber ID, etc.)
  • Prefer numeric, under 16 digits
  • Moment can generate identifiers on request

File Delivery Requirements

File TypeCadenceDelivery Time (UTC)TypeNaming Convention
Full customer fileOne-timeN/ACSV[country]_[merchant]_moment_all-customers_YYYY-MM-DD.csv
Daily incremental fileDaily6am SASTCSV[country]_[merchant]_dailyfile_YYYY-MM-DD.csv

Missed File Handling

If a daily file is missed, include all applicable updates in the next file.
DateDaily FileNotes
1 FebNot delivered
2 FebDeliveredIncludes updates from 1 and 2 Feb

What Moment Does

  • Validates file structure and content
  • Ingests bills
  • Makes bills discoverable via all payment channels
  • Generates settlement and reconciliation files

What Customers See

  1. Enter identifier
  2. View bill details
  3. Confirm and pay

End-to-End Flow

1. Billing File Creation
Merchant prepares a billing CSV file.
2. Secure File Delivery (SFTP)
Daily cadence may introduce up to 24 hours of data staleness.
3. Validation and Intake
Moment validates and ingests the file.
4. Enquiry at Payment Channel
Customer enters identifier → Channel queries Moment → Bill returned.
5. Payment
Customer pays → Channel notifies Moment.
6. Reconciliation
Moment provides webhook notifications or SFTP settlement files.

Sequence Flow


Best Practices and Notes

Identifier Consistency

The identifier used in your billing file must be the same identifier entered by customers during enquiry. The merchant defines this identifier (e.g., account number, subscriber ID, policy number).

Data Freshness

Choose a file delivery cadence that aligns with your business needs:
CadenceTrade-Off
HourlyNear real-time updates; higher operational overhead
DailyMost common; straightforward to maintain; amounts may be up to 24 hours old
WeeklySuitable for non-urgent billing cycles

Fulfillment and Financial Reporting

  • SFTP reconciliation and settlement files are the source of truth
  • Optional webhooks allow near-real-time notifications
  • Reconciliation files should be used for internal posting and ledger updates

Security

  • SFTP keys and access credentials are provisioned securely during onboarding
  • Access is permissioned per merchant and monitored