configure()

The configure function is used to prepare the Checkout library for a payment. It must be called before either showEmbeddedPage() or showPaymentPage() to store payment details.

Usage

Checkout.configure(configuration);

Example

Checkout.configure({
    session: {
        id: '<your_session_id>'
    }
});

Arguments

configuration Object COMPULSORY

The configuration object describes the merchant, customer, payment, and checkout appearance and behaviour. Fields in the object can contain literal values or a function that returns the value. Functions will be invoked before showing the payment interface.

Validation problems with the configuration object will be delivered to the error callback.

session Object = OPTIONAL

Fixed value

id String = OPTIONAL

Values contained in the session will override values provided by the request.
Fixed value
Validation Rules
Data consists of ASCII characters
minimum length
31
maximum length
35

version String = OPTIONAL

Do this if you make business decisions based on data from the session and wish to ensure that the same data is being used for the request operation.

To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.

If session.version provided by you does not match that stored against the session, the gateway will reject the operation with error.cause=INVALID_REQUEST.

See Making Business Decisions Based on Session Content.
Fixed value
Validation Rules
Data consists of ASCII characters
minimum length
10
maximum length
10

Return Value

None

Copyright © 2023 UniCredit Bank