The Balance
What the balance represents, how to calculate it, and which events change it.
The balance is the list of committed money items on a lease: what the renter was asked to pay, what they paid, what Obligo paid out to you, refunds, and move-out charges with their payouts. Use it to see, per payment type, what was requested, collected and paid out.
Balance items
Each item in balance has one payment type (typeId), one side (relatedEntity.type, either HouseholdRenter or Beneficiary) and a status. See Financial Items for every property.
| Status | Meaning |
|---|---|
Committed | Obligo accepted the item. No money has moved yet. |
InProgress | A payment, payout or refund is processing. |
Settled | The money moved, or Obligo covers it, as with a move-out charge. settledAt records when. |
Failed | The payment, payout or refund failed. A retry moves the item back to InProgress. |
Draft exists only in pending. A committed item moves into balance, except a Deposit item: it waits in pending until approval, and then a billing authorization moves to securities and a traditional cash deposit to balance. See The Security.
Calculate the net balance
The API returns the items, not a balance total, and summary covers only the security. To calculate the net balance for a payment type, add up the amount of every balance item with that typeId, whatever its status.
- A negative net is money requested from the renter that hasn't been paid out to you or refunded yet.
0means everything requested from the renter was paid out to you or refunded.
For a $1,000 rent advance that the renter paid and Obligo paid out:
| Item | relatedEntity.type | amount | status |
|---|---|---|---|
| Request to the renter | HouseholdRenter | -100000 | Settled |
| Payout to you | Beneficiary | 100000 | Settled |
| Net | 0 |
This function returns the net for every payment type in a GET /leases/{leaseId}/financials response:
function netBalanceByType(financials) {
return financials.balance.reduce((net, item) => {
net[item.typeId] = (net[item.typeId] ?? 0) + item.amount;
return net;
}, {});
}To see what has actually moved, filter by status. Settled items moved, Committed and InProgress items are still in flight, and Failed items didn't move.
What changes the balance
- You commit a move-in payment. A negative
HouseholdRenteritem arrives asCommitted, and Obligo adds it to the renter's move-in payment request. - The renter pays. The item moves to
InProgresswhile the payment processes, then toSettled. A failed payment moves it toFailed. - Obligo pays you. Once the request is cleared for payout, Obligo creates a positive
Beneficiaryitem of the same type that brings the type's net back to0. It arrives asCommitted, moves toInProgresswhen the payout is sent, and moves toSettledwhen it lands, or toFailed. - You lower a request or refund the renter. You commit a positive
HouseholdRenteritem of the same type. If the renter hadn't paid yet, it settles with their payment. If they had, it moves toInProgress, then toSettledwhen the refund is sent. - You commit a move-out charge. The negative
Chargeitem arrives alreadySettled, because the billing authorization covers it. - Obligo pays you the charge. Obligo reviews the charges before it pays you. When the payout starts, Obligo creates a positive
BeneficiaryChargeitem asInProgress, withdescription: "Move-out charge"and areferenceCodethat identifies the payout. It moves toSettledwhen the payout lands, or toFailed. Together, the twoChargeitems net to0. - A traditional cash deposit is approved. The
Deposititem moves frompendingtobalanceasSettled. Obligo then pays it out to you as in step 3.
Move-in payments
Obligo applies these rules when you commit a move-in payment:
- The net for a move-in payment type can't go above
0, so you can't credit more than you requested. - An item's
amountcan't be0. - Obligo refuses new move-in payments once the lease is closed, and while it's pending final confirmation by Obligo.
Lowering every line of an unpaid request to 0 cancels the request. If the renter already paid, the request stays open and Obligo refunds the difference.
Adjust a committed item
You can't delete a committed item or update its amount. To adjust one, commit an item of the same type with the opposite sign. This request lowers a $1,000 rent advance to $800:
curl https://api.sandbox.myobligo.com/leases/c25f5555-a13d-4c85-b927-bb4e730ad78f/financials \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Obligo-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"typeId": "3b134e4a-0b93-4a8c-a60e-c2fba6f208c7",
"amount": 20000,
"relatedEntity": { "type": "HouseholdRenter" },
"description": "Rent advance lowered to $800",
"commit": true
}'The response is 201 with the new item's id:
{
"id": "c6be9cfa-0cf9-4020-a95a-db3c8405830f"
}The rent advance now nets to -80000. You can still update metadata and attachmentIds on a committed item with PUT /leases/{leaseId}/financials/{itemId}, and its description while it's blank: missing, empty or only whitespace. On a committed item, a non-blank description is kept. null never clears a description.
Know when you've been paid
Watch the positive Beneficiary items: InProgress means Obligo sent the payout, and Settled means it landed. Obligo sends lease.financials.balanceItemInProgress and lease.financials.balanceItemSettled for these changes. For a move-out charge, match the payout by its referenceCode.
Note: Obligo sends no
lease.financials.*webhooks for changes any API app makes, including the release after an app's own charge. Obligo moves payout items through their statuses itself, so you receive those events. After your own changes, retrieve the ledger withGET /leases/{leaseId}/financials.
See Webhooks.