PlatformIntegrations
Financials

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.

PropertyTypependingbalancesecuritiesDescription
idstringYesYesYesThe item's UUID. A security item created at approval keeps the id of its Deposit item.
typeIdstringYesYesNoThe UUID of the payment type.
typeenumNoNoYesAlways BillingAuthorization.
amountintegerYesYesYesThe signed amount in cents.
descriptionstring or nullYesYesNoYour description, up to 2,048 characters.
metadataobjectYesYesNoYour own key-value data.
statusenumYesYesNoDraft or Committed in pending. Committed, InProgress, Settled or Failed in balance.
relatedEntityobjectYesYesNoThe side of the money the item is on. type is HouseholdRenter or Beneficiary.
attachmentIdsarray of stringsYesYesNoThe IDs of files attached to the item.
paymentStatusenum or nullYesNoYesFor the Full deposit held by Obligo option, the renter's payment of the deposit cash: NotStarted, InProgress, Settled or Failed. Otherwise null.
chargedbooleanNoNoYestrue for a move-out charge. false for an approval, an increase, a decrease or a release.
createdAtstringNoYesYesISO 8601 date-time when the item was created.
settledAtstring or nullNoYesNoISO 8601 date-time when the item settled.
referenceCodestring or nullNoYesNoObligo'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.paymentStatusInProgress and lease.financials.pendingItem.paymentStatusFailed.
  • In securities: lease.financials.securityItem.paymentStatusInProgress, lease.financials.securityItem.paymentStatusFailed and lease.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.

RolePayment typerelatedEntity.typeSignCreated by
Raise the securityDepositHouseholdRenterNegativeYou
Lower or release the securityDepositHouseholdRenterPositiveYou, or Obligo when the lease closes
Move-in payment requestAny other type, such as RentAdvanceHouseholdRenterNegativeYou
Lower a request, or refund the renterThe request's typeHouseholdRenterPositiveYou
Payout to youThe request's typeBeneficiaryPositiveObligo, or you to approve a payout
Move-out chargeChargeHouseholdRenterNegativeYou
Charge payout to youChargeBeneficiaryPositiveObligo, 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

  1. Create. POST /leases/{leaseId}/financials records the item as a Draft in pending.
  2. Commit. POST /leases/{leaseId}/commit-financials commits the drafts you name. You can also send commit: true when you create the item.
  3. Apply. Committed items move to balance and follow its statuses. A committed Deposit item stays in pending as Committed until the renter is approved, then becomes a security item. A move-out charge skips Committed and arrives in balance as Settled.

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 of HouseholdRenter, 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 with POST /files. A file from another account returns 404. 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 or null.
  • 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

CodeMeaning
204The commit succeeded.
400The 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:

Rulemessage
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

StageYou createObligo creates
Move-inThe 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-outNegative 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.