💸 Flow of Funds

Implement the ACH debit from Livble's disbursement account

🫡

This is the most sensitive part of the implementation


Let's start by recapping a very important question.

How do funds get from Livble to the Landlord/PMC? - You as the software will create an ACH Debit from Livble's disbursement account and direct the funds to the Landlord/PMC.


Non-Livble ACH payment flow

Now let's try to describe very simplistically how your backend deals with an non-Livble ACH payment today


Function ProcessTenantPayment(tenant, amount, paymentMethodId, ...) 

    // Step 1: Validate the payment request
    ValidateRequest(tenant, amount, paymentMethodId, ...)

    // Step 2: Retrieve tenant's payment method details (e.g., account, routing, or tokenized info)
    tenantPaymentMethodDetails = GetTenantPaymentMethod(tenant, paymentMethodId)

    // Step 3: Retrieve PMC/Landlord payment details
    pmcPaymentMethodDetails = GetAssociatedPmcPaymentMethod(tenant)

    // Step 4: Initiate ACH Debit transaction
    transaction = SendACHDebitTransactionToProcessor(
        source = tenantPaymentMethodDetails,
        destination = pmcPaymentMethodDetails,
        amount = amount
    )

    // Step 5: Record the transaction, update ledger and more
    StoreTransaction(transaction)
    UpdateTenantLedger(tenant, transaction)
    ...

End Function

Livble ACH payment flow

And now let's try to describe the change needed in order to implement the flow of funds with Livble.
Please notice the ONLY change is in step 2.


Function ProcessTenantPayment(tenant, amount, paymentMethodId, ...) 

    // Step 1: Validate the payment request
    ValidateRequest(tenant, amount, paymentMethodId, ...)


    // CHANGE HERE
    // Step 2: Retrieve tenant's payment details OR Livble payment method details. On-the-fly swap
    if (paymentMethodId == "Livble")
        tenantPaymentDetails = GetLivblePreConfiguredPaymentMethod()
    else
        tenantPaymentDetails = GetTenantPaymentMethod(tenant, paymentMethodId)

    // Step 3: Retrieve PMC/Landlord payment details
    pmcPaymentDetails = GetAssociatedPmcPaymentMethod(tenant)

    // Step 4: Initiate ACH Debit transaction
    transaction = SendACHDebitTransactionToProcessor(
        source = tenantPaymentDetails,
        destination = pmcPaymentDetails,
        amount = amount
    )

    // Step 5: Record the transaction, update ledger and more
    StoreTransaction(transaction)
    UpdateTenantLedger(tenant, transaction)
    ...

End Function

🔫 Triggers

Let's try to describe the triggers that initiate the flow described above


Non-Livble ACH payment flow triggers

For a non-Livble ACH payment, we can assume there are 2 main triggers for your PMS to initiate a transaction of this sort:

  1. An API call initiated by your frontend
  2. An AutoPay scheduled event


Livble ACH payment flow triggers

In the case of a Livble payment the triggers will be:

  1. Frontend SDK onEvent SPLIT_RENT callback. This should be the main way to handle flow of funds. For more information on this read here.
  2. Backend Webhook (settlement.created)

ACH processor note

In your dev/sandbox environments you will use your dev/sandbox processor integration and ONLY in your production environment you will use your production processor integration (i.e: debits real funds from Livble)