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 :

Name

Type

Description

consumerId

string

To be used for post-sale actions, such as creating new Charges for the consumer.

consumerDetails

object

Non-sensitive consumer details that they entered during the application flow - use this information to process the order in the merchant’s systems.

availableCredit

array

Array of objects - one for each proposal - with the lender info and credit amount, as detailed below

  • availableCredit:

Name

Type

Description

lender

object

The lender that is behind the selected financing option, as detailed below

creditAmount

string

The amount that the consumer was approved for

-- lender:

Name

Type

Description

id

string

The lender’s unique identifier in our system

name

string

The 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:

Code

Description

CONSUMER_CANCELLED

Consumer intentionally closed the Apply UI

CREATE_APPLICATION_FAILED

Application creation or merchant settings fetch failed

BILLING_SHIPPING_MISMATCH

Billing and shipping address must be the same

GENERAL

Some general error occurred (message should provide more information)


Did this page help you?