Skip to main content
PATCH
/
billing
/
accounts
/
{account}
curl --request PATCH \
  --url https://api.momentco.io/billing/accounts/{account} \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Premium Subscription Account",
  "metadata": {
    "account_tier": "premium",
    "updated_by": "admin"
  }
}'
{
"id": "bacc_H4jp6KnU5cPw263v1jyz4",
"external_reference": "UAR1234567890",
"customer_id": "bcus_H4jp6KnU5cPw263v1jyz4",
"name": "Premium Subscription Account",
"currency": "ZAR",
"balance": 2000,
"payment_rules": {
"min_amount": 100,
"max_amount": 500000,
"underpayment_allowed": true,
"overpayment_allowed": false
},
"metadata": {
"account_type": "subscription",
"billing_cycle": "monthly",
"account_tier": "premium",
"updated_by": "admin"
}
}

Path Parameters

account
required

Account identifier - either the unique ID provided by Moment or the external reference provided by the merchant.

The unique ID provided by Moment to identify this account

Example:

"bacc_H4jp6KnU5cPw263v1jyz4"

Body

application/json

Request payload for updating an existing account

name
string

Name for the account

Maximum string length: 255
Example:

"Subscription Account"

currency
any
balance
integer

Current balance of the entity. If balance is negative, the entity has credit; if positive, the entity owes this amount. If not specified, no balance tracking.

The value is in the smallest currency unit (e.g., cents for ZAR).

Note: If balance is specified, the currency field must also be provided.

Example:

2000

metadata
any

Response

Account updated successfully

An account represents a sub-organization within a customer for separate balance tracking and payment management.

id
string
required

Unique identifier for an account

Example:

"bacc_H4jp6KnU5cPw263v1jyz4"

external_reference
any
required
customer_id
string
required

Unique identifier for a customer

Example:

"bcus_H4jp6KnU5cPw263v1jyz4"

name
string

Name for the account

Maximum string length: 255
Example:

"Subscription Account"

currency
unknown
balance
integer

Current balance of the entity. If balance is negative, the entity has credit; if positive, the entity owes this amount. If not specified, no balance tracking.

The value is in the smallest currency unit (e.g., cents for ZAR).

Note: If balance is specified, the currency field must also be provided.

Example:

2000

payment_rules
object

Payment rules associated with the entity. If not specified, the entity cannot be paid against.

metadata
unknown