Financial Items
The line items on a lease's ledger — payment requests, payments, payouts, refunds, charges, and security changes.
A financial item is one line on a lease's ledger: a payment request, a payment, a payout, a refund, a move-out charge, or a change to the security. Create items to tell Obligo what to collect from the renter, charge, release or pay out.
Properties
An item's properties depend on the list it's in.
| Property | Type | pending | balance | securities | Description |
|---|---|---|---|---|---|
id | string | Yes | Yes | Yes | The item's UUID. A security item created at approval keeps the id of its Deposit item. |
typeId | string | Yes | Yes | No | The UUID of the payment type. |
type | enum | No | No | Yes | Always BillingAuthorization. |
amount | integer | Yes | Yes | Yes | The signed amount in cents. |
description | string or null | Yes | Yes | No | Your description, up to 2,048 characters. |
metadata | object | Yes | Yes | No | Your own key-value data. |
status | enum | Yes | Yes | No | Draft or Committed in pending. Committed, InProgress, Settled or Failed in balance. |
relatedEntity | object | Yes | Yes | No | The side of the money the item is on. type is HouseholdRenter or Beneficiary. |
attachmentIds | array of strings | Yes | Yes | No | The IDs of files attached to the item. |
paymentStatus | enum or null | Yes | No | Yes | For the Full deposit held by Obligo option, the renter's payment of the deposit cash: NotStarted, InProgress, Settled or Failed. Otherwise null. |
charged | boolean | No | No | Yes | true for a move-out charge. false for an approval, an increase, a decrease or a release. |
createdAt | string | No | Yes | Yes | ISO 8601 date-time when the item was created. |
settledAt | string or null | No | Yes | No | ISO 8601 date-time when the item settled. |
referenceCode | string or null | No | Yes | No | Obligo's reference for a charge payout. |
Obligo sends a webhook with the item when its paymentStatus changes to InProgress, Failed or Settled:
- In
pending:lease.financials.pendingItem.paymentStatusInProgressandlease.financials.pendingItem.paymentStatusFailed. - In
securities:lease.financials.securityItem.paymentStatusInProgress,lease.financials.securityItem.paymentStatusFailedandlease.financials.securityItem.paymentStatusSettled.
See Webhooks.
What an item does
No property names an item's kind. Its role comes from its payment type, its relatedEntity.type and the sign of its amount.
| Role | Payment type | relatedEntity.type | Sign | Created by |
|---|---|---|---|---|
| Raise the security | Deposit | HouseholdRenter | Negative | You |
| Lower or release the security | Deposit | HouseholdRenter | Positive | You, or Obligo when the lease closes |
| Move-in payment request | Any other type, such as RentAdvance | HouseholdRenter | Negative | You |
| Lower a request, or refund the renter | The request's type | HouseholdRenter | Positive | You |
| Payout to you | The request's type | Beneficiary | Positive | Obligo, or you to approve a payout |
| Move-out charge | Charge | HouseholdRenter | Negative | You |
| Charge payout to you | Charge | Beneficiary | Positive | Obligo, when the payout starts |
Submit a charge as a negative Charge item on the renter's side: Obligo rejects negative Beneficiary amounts. Retrieve the payment type IDs with GET /payment-types.
Lifecycle
- Create.
POST /leases/{leaseId}/financialsrecords the item as aDraftinpending. - Commit.
POST /leases/{leaseId}/commit-financialscommits the drafts you name. You can also sendcommit: truewhen you create the item. - Apply. Committed items move to
balanceand follow its statuses. A committedDeposititem stays inpendingasCommitteduntil the renter is approved, then becomes a security item. A move-out charge skipsCommittedand arrives inbalanceasSettled.
Items that Obligo creates appear the same way. The charge payout item has description: "Move-out charge" and a referenceCode.
Create an item
Send these parameters to POST /leases/{leaseId}/financials:
typeId(string, required) — The UUID of the payment type.amount(integer, required) — The signed amount in cents.relatedEntity(object, required) — The side of the money the item is on. There's no default.relatedEntity.type(enum, required) — One ofHouseholdRenter,Beneficiary.description(string, optional) — A description of up to 2,048 characters.attachmentIds(array of strings, optional) — The IDs of files you uploaded to the same account withPOST /files. A file from another account returns404. See Files.metadata(object, optional) — Key-value data for your own use. Keys can't start with_. Values are strings of up to 255 characters, numbers, booleans ornull.commit(boolean, optional) — A flag that commits the item in the same request. If the commit fails, Obligo deletes the new item and returns the error.
Request
This request creates a $500 move-out charge with an invoice attached:
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": "26c473e5-23cd-42fd-a54d-2b742b7a448c",
"amount": -50000,
"relatedEntity": { "type": "HouseholdRenter" },
"description": "Carpet replacement in the living room",
"attachmentIds": ["2eeeafda-9355-4724-8bdb-539a202f6295"],
"metadata": { "workOrder": "WO-1182" }
}'Response
The response is 201 with the new item's id:
{
"id": "e608bc66-cf02-4753-b731-fd8521f4d7fd"
}Commit items
Send the IDs of the drafts to commit in ids.
Request
curl https://api.sandbox.myobligo.com/leases/c25f5555-a13d-4c85-b927-bb4e730ad78f/commit-financials \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Obligo-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"ids": ["e608bc66-cf02-4753-b731-fd8521f4d7fd"]
}'Response
| Code | Meaning |
|---|---|
| 204 | The commit succeeded. |
| 400 | The commit broke a rule. errorCode is CommitFailed, or ChargesAreNotAllowed for a charge after the state's deadline. |
A CommitFailed error's message names the rule:
| Rule | message |
|---|---|
No item's amount is 0. | Item amount cannot be 0 |
No Beneficiary amount is negative. | Cannot set negative amount for related entity type 'Beneficiary' |
| The security total stays at or below zero. | Security balance cannot exceed zero |
After approval, a new security amount passes SecurityInMinMaxRange and ValidSecurityToRentRatio. | New security amount is invalid. |
Charges don't exceed summary.securities.available. | Not enough balance to charge |
| A move-in payment type's net stays at or below zero. | Balance cannot exceed zero in Move-in stage |
| No new move-in payments on a closed lease. | Creating Payments is forbidden when the lease is inactive |
The ids include at least one draft. | No items to commit |
{
"statusCode": 400,
"error": "Bad Request",
"message": "Not enough balance to charge",
"errorCode": "CommitFailed",
"requestId": "2a873c06-ec24-4749-b923-7c8da4bf07b4"
}A commit also returns 400 with CommitFailed while another commit on the same lease is still processing.
Update and delete
PUT /leases/{leaseId}/financials/{itemId} updates an item. You can update amount and typeId only while the item is a Draft: a new amount for a committed item returns 400. You can update description on a draft, and on a committed item only while its description is blank: missing, empty or only whitespace. On a committed item, a non-blank description is kept. null never clears a description. You can update metadata and attachmentIds on pending and balance items at any time.
DELETE /leases/{leaseId}/financials/{itemId} deletes a draft. Deleting a committed item returns 400. To reverse a committed item, commit one of the same type with the opposite sign. See The Balance.
Items at move-in and move-out
| Stage | You create | Obligo creates |
|---|---|---|
| Move-in | The Deposit item, in POST /leases, with POST /leases/{leaseId}/financials or on the lease record's Deposit tab. A Deposit Policy can also set it. Move-in payment items, through the API or the Move-in payments tab. The renter pays them at checkout. | The security item when the renter is approved. The Deposit balance item when a traditional cash deposit is approved. The Beneficiary payout items when a move-in payment request is cleared for payout. |
| Move-out | Negative Charge items, through the API or the Obligo dashboard's "Charge the security" wizard. To close with no charges, a positive Deposit item equal to available. | A negative security item with charged: true for the charge, and one with charged: false for the release. The Beneficiary Charge item that pays you. |
The "Charge the security" wizard uploads your files, creates the Charge items and commits them. The dashboard's "Close without charging" commits a positive Deposit item equal to available.
When the lease closes, Obligo commits any Charge drafts still in pending, so delete unwanted drafts first. See Submit Charges.