Creating direct bill payments
Use the following endpoint to create a direct bill payment:
- POST
/billing/v1/account/{accountId}/db-money-rcvds
Minimum creation criteria
At a minimum, you must specify the following:
amount- AMonetaryAmountvalue that specifies both amount and currencycurrency- A typekey from theCurrencytypelistpaymentInstrument- The ID of the associated payment instrumentreceivedDate- The date the payment was received.
Note that the payment's currency is specified twice - as part of the
amount field and in the currency field.
A payment with only the minimum required fields has no target and will be placed in the account's unapplied fund.
For example, the following request creates a payment of $120 USD in cash (payment instrument bc:111) received on March 3, 2024 for account bc:99.
Command
Request body
When creating a payment, the payment instrument must be cash, check, or a non-universal payment instrument associated with the account.
Payments with a specific target
A payment can target a specific policy period or invoice. To do so, include either the
policyPeriod or invoice field in the request. Set
the field to the target's id.
For example, the following request creates a payment of $50 USD in cash (payment instrument bc:111) received on March 3, 2024 for account bc:99. The payment targets invoice bc:3300.
Command
Request body
Similarly, the following request creates a payment of $50 USD in cash (payment instrument bc:111) received on March 3, 2024 for account bc:99. The payment targets policy period bc:775.
Command
Request body
Restrictions
A single payment cannot target both a policy period and an invoice, even if the
invoice is for the given policy period. You can set only the
policyPeriod, only the invoice, or neither.
When you specify neither, the payment targets only the account.
All direct bill payments pass through an unapplied fund. However, a payment cannot
target an unapplied fund directly, as the unappliedFund field is
read-only. The relevant unapplied fund is determined by other settings for the
account and the payment itself.
- For accounts that use policy-level billing with cash separation:
- If the payment has a specified
policyPeriodorinvoice, it is initially placed in the associated policy's unapplied fund.
- If the payment has no specified
policyPeriodorinvoice, it is initially placed in the account's unapplied fund.
- If the payment has a specified
- For accounts that use account-level billing or policy-level billing without cash
separation:
- The payment is initially placed in the account's unapplied fund.