The Apply Completion Callback

The "Apply Completion" Callback

The callback field is optional and is used to provide a callback function that is invoked upon application flow completion, to provide the merchant with potentially relevant information (see below).

This function accepts the following parameters:

Data:

NameTypeDescription
consumerIdstringTo be used for post-sale actions, such as creating new Charges for the consumer.
consumerDetailsobjectNon-sensitive consumer details that they entered during the application flow - use this information to process the order in the merchant’s systems.
availableCreditarrayArray of objects - one for each proposal - with the lender info and credit amount, as detailed below
lenderobjectIf application is pending, the relevant lender will be returned here.

availableCredit:

NameTypeDescription
lenderobjectThe lender that is behind the selected financing option, as detailed below
creditAmountstringThe amount that the consumer was approved for

lender:

NameTypeDescription
idstringThe lender’s unique identifier in our system
namestringThe lender’s name

Error:
An error object containing details about the failure. This parameter will be null in case of a successful checkout flow. The object type will be:

{
    "code": "Error code",
    "message": "Human readable description of the error"
}

Error codes:

CodeDescription
CONSUMER_CANCELLEDConsumer intentionally closed the Apply UI
CREATE_APPLICATION_FAILEDApplication creation or merchant settings fetch failed
BILLING_SHIPPING_MISMATCHBilling and shipping address must be the same
PENDINGApplication is pending
BACK_TO_STOREConsumer clicked the “Back to Store” button
CREATE_CHECKOUT_FAILEDCheckout creation or merchant settings fetch failed
MISSING_CHECKOUT_DATASome of the required data are missing