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.
consumerIdstringUnique identifier for consumer that applied.
applicationIdstringUnique identifier for the current application.
continuationTokenstringA unique token after applying. Use this token during checkout to prevent re-collecting information and allow a seamless process for the client.
lenderStatusArray

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

lenderStatus:

NameTypeDescription
idstringThe lenderā€™s unique identifier in our system
namestringThe lenderā€™s name
statusstringLender Application status:
'Pending'
| 'Declined'
| 'NonUsable'
| 'PartiallyApproved'
| 'PreApproved'
| 'Approved'
| 'Error'

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