Prerequisites
- A test API key. See Authentication.
- A registered webhook endpoint. See Webhook Setup to register your URL and obtain your signing key.
Step 1: Create a customer
Create the top-level customer record.id. Store this to reference the customer when creating the account.
Step 2: Create an account
Create an account under the customer. Bills will be raised against this account.id. Store this to reference the account when creating the bill.
Steps 1 and 2 can be combined into a single request.
Instead of passing a
Moment creates the customer first and then creates the account. See Create Account.
Instead of passing a
customer ID when creating an account, pass a customer object with the same fields used in the create customer request.Moment creates the customer first and then creates the account. See Create Account.
Step 3: Create a bill
Raise a bill against the account with anamount_due, bill_date, and due_date.
amount_due is specified in minor units. See Monetary Amounts for details.id and an initial status of unpaid. Store the id to match against the payment webhook.
Bills can also be raised directly against a customer without an account.
To do so, replace
In that case, the response will only include
To do so, replace
"account" with "customer" in the request body and use the customer id from Step 1.In that case, the response will only include
customer_id and not account_id.All three steps can be combined into a single create bill request.
Instead of passing an
Moment creates the customer, then the account, then the bill in sequence. See Create Bill for the customer object and Create Bill for the account object.
Instead of passing an
account ID, pass an account object — and nest a customer object within it.Moment creates the customer, then the account, then the bill in sequence. See Create Bill for the customer object and Create Bill for the account object.
Step 4: Present the bill for payment
Present the bill for payment using Electronic Bill Presentment or a Payment Request.Step 5: Handle the payment webhook
When payment is received against the bill, Moment sends anobligation.amount_applied event.
data.account_id to identify which account the bill belongs to, and data.amount to update the bill’s payment status.
If the bill was raised directly against a customer, the event will include
customer_id instead of account_id.2xx status code to acknowledge receipt.
Next steps
Quickstart: Customer Balance
Track a single running balance directly on a customer.
Quickstart: Account Balance
Track balances across multiple sub-accounts within a customer.
Electronic Bill Presentment
Present bills to customers via a hosted payment page.
Uploading Bills
Ingest bills in bulk via SFTP or file integration.
Common Operations
Examples for updating customer balances, account balances, and bills.

