Direct API (Less Common)

For customers who want to use their UI for application, checkout or both, the mutations below can be used to facilitate the full Direct API experience.

If you are supporting our Full Spectrum experience, start with the loan application. If the customer is declined for a loan, then move to the lease application.

Full Spectrum API Flow

  1. Use the createOrder mutation to start all applications
  2. Collect the fields needed for the application through your UI, and send the application to Koalafi for a decision using apply call
  3. In response to the loan application you will receive one of three statuses: 'Approved', 'Declined', or 'Errors Found'
    1. If the customer is approved, continue to selectLoanOptionType then to step 4. Note that you only need to perform this step if you're offering the approval first flow and the purchase amount wasn't sent in the application object.
    2. If you receive an application status of ‘errors found’, we were unable to verify the information provided by the customer. Ask the customer to review the application and resubmit.
    3. If the application is declined, move to the lease application described in step 9.
  4. Customers can be approved for one to three loan products, which will be returned as part of the apply response. Use selectLoanOptionType to designate which product the customer will be using, which will determine the payment details of their loan.
  5. After the loan is fully created, you can generateLoanDocs for review of all payment and loan details.
  6. Once the customer reviews the loan agreement, you will need to capture their consent with signLoanAgreement. Once the customer has signed the agreement, merchants should submit the purchase in their system for processing.
  7. Once you have delivered the purchased items to the customer, use markOrderDelivered to notify Koalafi that the customer has the merchandise and the loan should be funded. Customers will start making payments on their loan after delivery is completed.

Lease Application Waterfall

  1. If a customer is declined for a loan, use submitLeaseApp to submit their application information for a lease decision.
  2. If the customer is approved for a lease, continue to updateOrderItems. Note that you only need to perform this step if you're offering the approval first flow and the purchase items weren't sent in the application object.
  3. Next, we will need some additional information about the customer to account for the differences in leases and loans. The customer will need to provide information about their pay frequency and last pay date, which should be sent to Koalafi using updateEmployment.
  4. If the customer shipping address is different from the billing address provided in the application, provide their shipping address to Koalafi using updateShippingAddress. This ensures we pay taxes to the correct states.
  5. At this point, the customer will need to provide a debit card that will be authorized for the initial payment. This is used to verify a payment source. We will attempt to authorize a charge for the initial payment on the debit card provided as soon as you call updateDebitInfo, and charge the card once the customer signs the lease agreement. If the lease is not signed, the authorization will be removed.
  6. Once we successfully confirm the employment, shipping address and debit card provided by the customer, you will be able to generate payment terms and the lease document with generateContract.
  7. After the customer has reviewed all payment and lease terms and has consented to entering the lease agreement, capture their consent using signLeaseAgreement.
  8. Once you have delivered the purchased items to the customer, use markOrderDelivered to notify Koalafi that the customer has the merchandise and the lease should be funded. Customers will start making payments on their loan after delivery is completed

Loan API Flow

Loan API FlowLoan API Flow

Loan API Flow

  1. Use the createOrder mutation to start all applications
  2. Collect the fields needed for the application through your UI, and send the application to Koalafi for a decision using submitLoanApp
  3. In response to the loan application you will receive one of three statuses: 'Approved', 'Declined', or 'Errors Found'
    1. If the customer is approved, continue to updateLoanAmount then to step 4. Note that you only need to perform this step if you're offering the approval first flow and the purchase amount wasn't sent in the application object.
    2. If you receive an application status of ‘errors found’, we were unable to verify the information provided by the customer. Ask the customer to review the application and resubmit. Applications can be submitted up to three times before being declined.
  4. Customers can be approved for one to three loan products, which will be returned as part of the submitLoanApp response. Use selectLoanProduct to designate which product the customer will be using, which will determine the payment details of their loan.
  5. Once the customer is approved and the product is selected, use createLoan to finalize creation of the loan.
  6. After the loan is fully created, you can generateLoanDocs for review of all payment and loan details.
  7. Once the customer reviews the loan agreement, you will need to capture their consent with signLoanAgreement. Once the customer has signed the agreement, merchants should submit the purchase in their system for processing.
  8. Once you have delivered the purchased items to the customer, use markOrderDelivered to notify Koalafi that the customer has the merchandise and the loan should be funded. Customers will start making payments on their loan after delivery is completed.

Lease API Flow

  1. Use the createOrder mutation to start all applications
  2. Collect the fields needed for the application through your UI, and send the application to Koalafi for a decision using submitApp
  3. If the customer is approved for a lease, continue to updateOrderItems. Note that you only need to perform this step if you're offering the approval first flow and the purchased items weren't sent in the application object
  4. Next, we will need some additional information about the customer to account for the differences in leases and loans. The customer will need to provide information about their pay frequency and last pay date, which should be sent to Koalafi using updateEmployment.
  5. If the customer shipping address is different from the billing address provided in the application, provide their shipping address to Koalafi using updateShippingAddress. This ensures we pay taxes to the correct states.
  6. At this point, the customer will need to provide a debit card that will be authorized for the initial payment. This is used to verify a payment source. We will attempt to authorize a charge for the initial payment on the debit card provided as soon as you call updateDebitInfo, and charge the card once the customer signs the lease agreement. If the lease is not signed, the authorization will be removed.
  7. Once we successfully confirm the employment, shipping address and debit card provided by the customer, you will be able to generate payment terms and the lease document with generateContract.
  8. After the customer has reviewed all payment and lease terms and has consented to entering the lease agreement, capture their consent using signLeaseAgreement.
  9. Once you have delivered the purchased items to the customer, use markOrderDelivered to notify Koalafi that the customer has the merchandise and the lease should be funded. Customers will start making payments on their loan after delivery is completed.