Create a Bill
Creates a new bill for a customer or account.
Bills represent payment requests that can be associated directly with customers or with specific accounts under customers.
Documentation Index
Fetch the complete documentation index at: https://docs.momentco.io/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Authentication using Bearer tokens. Include your API key in the Authorization header.
Key Types:
- Test Keys:
sk_test_*for development and testing - Live Keys:
sk_*for production environments - Public Keys:
pk_test_*orpk_*for client-side operations
📩 Need access? Contact Support to request your API keys.
Usage:
Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dcHeaders
A unique key to prevent duplicate operations. Use the same key for retries to ensure idempotent behavior.
Best Practices:
- Use UUIDs or other cryptographically unique identifiers
- Maintain keys for at least 24 hours for retry scenarios
- Use different keys for different operations
- Monitor
Idempotent-Replayedheader for cache hits
1 - 255^[a-zA-Z0-9-]+$Body
Request payload for creating a new bill
External reference for reconciliation or tracking purposes. Must be unique within your merchant account.
255^[a-zA-Z0-9_-]+$"INV-2024-001"
The ISO 4217 currency code for the payment.
"ZAR"
Payment amount due at the time of bill creation.
The value is in the smallest currency unit (e.g., cents for ZAR).
1 <= x <= 999999992000
Customer association for the bill. Required if bill is directly associated with customer or if creating new account.
^bcus_[a-zA-Z0-9]+$"bcus_H4jp6KnU5cPw263v1jyz4"
Account association for the bill. Required if bill is directly associated with account.
^bacc_[a-zA-Z0-9]+$"bacc_H4jp6KnU5cPw263v1jyz4"
The date the bill was raised in ISO 8601 format (YYYY-MM-DD). Defaults to current date if not provided.
"2025-01-01"
The due date for bill payment in ISO 8601 format (YYYY-MM-DD)
"2025-01-31"
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. NEW Limitations:
- Maximum 20 keys
- Key names must be strings (max 40 characters)
- Values must be strings (max 500 characters)
{
"customer_id": "cust_123456",
"order_id": "ord_789012"
}Response
Bill created successfully
A bill represents a payment request that can be associated with a customer or specific account.
Unique identifier for a bill
^bill_[a-zA-Z0-9]+$"bill_H4jp6KnU5cPw263v1jyz4"
External reference for reconciliation or tracking purposes. Must be unique within your merchant account.
255^[a-zA-Z0-9_-]+$"INV-2024-001"
Unique identifier for a customer
^bcus_[a-zA-Z0-9]+$"bcus_H4jp6KnU5cPw263v1jyz4"
Current status of the bill
unpaid, paid, voided "unpaid"
The ISO 4217 currency code for the payment.
"ZAR"
Payment amount due at the time of bill creation.
The value is in the smallest currency unit (e.g., cents for ZAR).
1 <= x <= 999999992000
The amount that has been paid against this bill.
The value is in the smallest currency unit (e.g., cents for ZAR).
Note: If amount_paid is specified, the currency field must also be provided.
0 <= x <= 999999991500
The amount remaining to be paid against this bill.
The value is in the smallest currency unit (e.g., cents for ZAR).
Note: If amount_remaining is specified, the currency field must also be provided.
0 <= x <= 99999999500
Unique identifier for an account
^bacc_[a-zA-Z0-9]+$"bacc_H4jp6KnU5cPw263v1jyz4"
The date the bill was raised in ISO 8601 format (YYYY-MM-DD). Defaults to current date if not provided.
"2025-01-01"
The due date for bill payment in ISO 8601 format (YYYY-MM-DD)
"2025-01-31"
Payment rules associated with the entity. If not specified, the entity cannot be paid against.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. NEW Limitations:
- Maximum 20 keys
- Key names must be strings (max 40 characters)
- Values must be strings (max 500 characters)
{
"customer_id": "cust_123456",
"order_id": "ord_789012"
}
