Completing an Order

At this point, the customer has completed the financing application process, agreed to financing with Koalafi and an order has been placed with a merchant. In order to initiate financing, the merchant must deliver the purchased items to the customer. This mutation is the same for both a lease or a loan.

Once a merchant has delivered the purchased items to the customer, use markOrderDelivered mutation to notify Koalafi that the customer has the merchandise and the loan/lease should be funded. To use this mutation, you will need the same Koalafi orderId that was used throughout the financing process.

For this mutation, the input looks like:

{
  "input": { 
    "orderId": "<your orderID>",
    "estimatedDeliveryDate": "YYYY-MM-DD"
  }
}

markOrderDelivered returns the markOrderDeliveredResponse object which only contains markOrderDeliveredErrors. This mutation must succeed to successfully move the lease/loan into funding. Therefore we recommend a mutation that looks something like:

mutation updateOrderItems($input: MarkOrderDeliveredInput! ) {  
  markOrderDelivered(input: $input) {   
    markOrderDeliveredErrors {
      __typename
      ... on FatalError {
        message
      }
      ... on InvalidApp {
        message
      }
      ... on NotFound {
        message
      }
       ... on BadRequest {
        message
      }
    }
  }

A FatalError is returned when there was an internal error within our API. If you get a FatalError you should retry the mutation. An InvalidApp, NotFound or BadRequest error indicates that we were either not able to find an application for the orderID you passed or there is a downstream error with the application. For these errors, we recommend verifying the information sent in the input and retrying. If the issue persists, you can reach out to our team at [email protected] and we can provide more information and assist with manual resolution.

Once markOrderDelivered is successfully completed there are no more actions you need to take with Koalafi.