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. At this level, no balance is required. Balances are tracked on the accounts below.id. Store this to reference the customer when creating accounts.
Step 2: Create an account
Create an account under the customer with abalance representing what is owed on this account.
balance is specified in minor units. See Monetary Amounts for details.id. Store this to reference the account when presenting it for payment.
The customer and account can be created in a single request.
Instead of passing a
Moment creates the customer first and then creates the account, returning both IDs in the response. See Create Account.
Instead of passing a
customer ID, pass a customer object with the same fields used in the create customer request.Moment creates the customer first and then creates the account, returning both IDs in the response. See Create Account.
Step 3: Present the account balance for payment
Present the account balance for payment using Electronic Bill Presentment or a Payment Request.Step 4: Handle the payment webhook
When payment is received against the account, Moment sends anobligation.amount_applied event.
data.account_id to identify which account received the payment and data.amount to reconcile against the account balance.
Before processing, verify the event signature. See Webhook Verification.
Respond with a 2xx status code to acknowledge receipt.
Next steps
Quickstart: Customer Balance
Track a single running balance directly on a customer.
Quickstart: Bill Amount Due
Raise a specific bill with an amount due and a due date.
Electronic Bill Presentment
Present account balances to customers via a hosted payment page.
Core Concepts
Understand how customers, accounts, and bills relate to each other.
Common Operations
Examples for updating customer balances, account balances, and bills.

