Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Add Manual Balance Entry

Add a manual balance entry
client.v1.contracts.addManualBalanceEntry(ContractAddManualBalanceEntryParamsbody, RequestOptionsoptions?): void
post/v1/contracts/addManualBalanceLedgerEntry

Add a manual balance entry

Parameters
bodyidstringamountnumbercustomer_idstringreasonstringsegment_idstringcontract_idstringtimestampstringContractAddManualBalanceEntryParams
Hide ParametersShow Parameters
idstring

ID of the balance (commit or credit) to update.

formatuuid
amountnumber

Amount to add to the segment. A negative number will draw down from the balance.

customer_idstring

ID of the customer whose balance is to be updated.

formatuuid
reasonstring

Reason for the manual adjustment. This will be displayed in the ledger.

segment_idstring

ID of the segment to update.

formatuuid
contract_idstring
optional

ID of the contract to update. Leave blank to update a customer level balance.

formatuuid
timestampstring
optional

RFC 3339 timestamp indicating when the manual adjustment takes place. If not provided, it will default to the start of the segment.

formatdate-time
import Metronome from '@metronome/sdk';

const client = new Metronome({
  bearerToken: 'My Bearer Token',
});

await client.v1.contracts.addManualBalanceEntry({
  id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
  amount: -1000,
  customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
  reason: 'Reason for entry',
  segment_id: '66368e29-3f97-4d15-a6e9-120897f0070a',
  contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
});