Checkout configure()

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

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.

billing Object

Details of the payer's billing address.

address Object

The payer's billing address.

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
city String

The city portion of the address.

Data can consist of any characters
Min length:1
Max length:100
company String

The name of the company associated with this address.

Data can consist of any characters
Min length:1
Max length:100
country String

The 3 letter ISO standard alpha country code of the address.

Data must consist of the characters A-Z
Min length:3
Max length:3
postcodeZip String

The post code or zip code of the address.

Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'
Min length:1
Max length:10
stateProvince String

The state or province of the address.

Data can consist of any characters
Min length:1
Max length:20
street String

The first line of the address.

For example, this may be the street name and number, or the Post Office Box details.
Data can consist of any characters
Min length:1
Max length:100
street2 String

The second line of the address (if provided).

Data can consist of any characters
Min length:1
Max length:100
constraints Object

Information about any constraints that apply to this transaction.

Specify constraints to ensure that the transaction conforms to predefined criteria. This is useful if your integration does not directly collect all the transaction values (e.g. a session-based integration or a checkout integration).
customer Object

Information about the customer, including their contact details.

email String

The email address of the customer.

The field format restriction ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses.
Ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses
firstName String

The payer's first name.

Data can consist of any characters
Min length:1
Max length:50
lastName String

The payer's last or surname.

Data can consist of any characters
Min length:1
Max length:50
mobilePhone String

The contact person's mobile phone or cell phone number.

Data can consist of any characters
Min length:1
Max length:20
phone String

The phone number of the person to whom the order is being billed.

Data can consist of any characters
Min length:1
Max length:20
device Object

Information associated with the device's source of transaction.

ani String

The telephone number captured by ANI (Automatic Number Identification) when the customer calls to place the order.

Data can consist of any characters
Min length:1
Max length:10
aniCallType String

The 2 digit ANI information identifier provided by the telephone company to indicate the call type, for example, cellular (61-63), toll free (24,25), etc.

Data can consist of any characters
Min length:1
Max length:2
mobilePhoneModel String

The mobile phone manufacturer's identifier for the model of the mobile device used to initiate the payment.

Data can consist of any characters
Min length:1
Max length:255
interaction Object REQUIRED

Information that controls the payer's checkout interaction.

googleAnalytics Object
cancelUrl String REQUIRED

The URL to which you want to redirect the payer's browser if they cancel their payment.

This could be a link to the payer's shopping cart, or the home page of your website.
Data must be an absolute URI conforming to the URI syntax published by IETF RFC 2396. The following schemes are forbidden : javascript
displayControl Object

A group of objects that control the visibility of, and payer-interaction with, displayed information.

billingAddress String

Indicates if you require the payer to provide their billing address during the payment interaction.

If you do not provide this field, the billing address will be optional.
Value must be a member of the following list. The values are case sensitive.
HIDEHides data fields from the payer.
MANDATORYDisplays data fields and allows the payer to enter data into these fields.
OPTIONALDisplays data fields and allows the payer to opt out of data entry for these fields.
READ_ONLYData is displayed but cannot be modified.
customerEmail String

Indicates if you require the payer to provide their email address on the payment interaction.

If you do not provide this field, the payer's email address will be hidden.
Value must be a member of the following list. The values are case sensitive.
HIDEHides data fields from the payer.
MANDATORYDisplays data fields and allows the payer to enter data into these fields.
OPTIONALDisplays data fields and allows the payer to opt out of data entry for these fields.
READ_ONLYData is displayed but cannot be modified.
orderSummary String

Indicates if you wish to display a summary of the order before the payer submits their payment.

If you do not provide a value for this field, the gateway defaults the value to SHOW.
Value must be a member of the following list. The values are case sensitive.
HIDEDo not display order summary.
SHOWDisplay order summary, which may include payment details.
SHOW_PARTIALDisplay order summary which may not include payment details.
paymentConfirmation String

Indicates if you want the payer to confirm the payment details before they submit the payment.

If you do not provide a value for this field, the gateway defaults the value to HIDE.
Value must be a member of the following list. The values are case sensitive.
HIDEDo not display payment confirmation.
SHOWDisplay payment confirmation.
paymentTerms String

Indicates whether you wish to hide payment terms for a payment plan during the payment interaction.

If you do not provide this field the payment terms for a payment plan will be displayed.
Value must be a member of the following list. The values are case sensitive.
HIDEHides the payment terms from the payer. Note that offering Plan AMEX in some regions may require you to inform the payer of the payment terms before processing the payment.
SHOW_IF_SUPPORTEDDisplays the payment terms, if available, to the payer.
shipping String

Indicates if you wish to hide the shipping details on the payment interaction.

If you don't provide this field, shipping details will be displayed to the payer.
Value must be a member of the following list. The values are case sensitive.
HIDEHides data fields from the payer.
READ_ONLYData is displayed but cannot be modified.
locale String

A language identifier or IETF language tag to control the language of the payment interaction with the payer (e.g. en_US, es, fr-CA).

By default, the language is determined from the payer's browser. Supply a value for this field only if you wish to override the default behavior. If the language you specify is not supported by the gateway, the payment is displayed in the best matching language.
Data must be a language identifier or IETF language tag
Min length:2
Max length:5
merchant Object REQUIRED

Information that allows you to display your brand and business details during the payment interaction.

address Object

Information on your business address.

line1 String

The first line of your business address for display to the payer during the payment interaction.

Data can consist of any characters
Min length:0
Max length:100
line2 String

The second line of your business address for display to the payer during the payment interaction.

Data can consist of any characters
Min length:0
Max length:100
line3 String

The third line of your business address for display to the payer during the payment interaction.

Data can consist of any characters
Min length:0
Max length:100
line4 String

The fourth line of your business address for display to the payer during the payment interaction.

Data can consist of any characters
Min length:0
Max length:100
email String

The email address of your business for display to the payer during the payment interaction (e.g. an email address for customer service).

Ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses
name String REQUIRED

The name of your business for display to the payer on the payment interaction.

Data can consist of any characters
Min length:1
Max length:40
phone String

The phone number of your business for display to the payer during the payment interaction.

Data can consist of any characters
Min length:0
Max length:20
theme String

The theme used to control the look and feel of your checkout interaction.

If you do not provide this field the default theme is will be used.
Data may consist of the characters 0-9, a-z, A-Z, '-', '_'
Min length:1
Max length:50
lineOfBusiness String

Your payment service provider might have configured your merchant profile to support several lines of business.

Each line of business can have different payment parameters, such as bank account, supported cards or such.

For example, lineOfBusiness = TICKET_SALES can have a different bank account from lineOfBusiness = MERCHANDISING. One line of business on your profile might be "null". To use that, do not provide the lineOfBusiness field.
Data can consist of any characters except space
Min length:1
Max length:100
partnerSolutionId String

If, when integrating with the gateway, you are using a solution (e.g. a shopping cart or e-commerce solution) provided, supported or certified by your payment service provider, enter the solution ID issued by your payment service provider here.

If your payment service provider has not provided you with a solution ID, you should ignore this field.
Data can consist of any characters
Min length:1
Max length:40
session Object
id String

Identifier of the payment session containing values for any of the request fields to be used in this operation.

Values contained in the session will override values provided by the request.
Data consists of ASCII characters
Min length:31
Max length:35
version String

Use this field to implement optimistic locking of the session content.

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.
Data consists of ASCII characters
Min length:10
Max length:10
shipping Object

Information on the shipping address including the contact details of the addressee.

address Object

The address to which the goods contained in this order are being shipped.

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
city String

The city portion of the address.

Data can consist of any characters
Min length:1
Max length:100
company String

The name of the company associated with this address.

Data can consist of any characters
Min length:1
Max length:100
country String

The 3 letter ISO standard alpha country code of the address.

Data must consist of the characters A-Z
Min length:3
Max length:3
postcodeZip String

The post code or zip code of the address.

Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'
Min length:1
Max length:10
stateProvince String

The state or province of the address.

Data can consist of any characters
Min length:1
Max length:20
street String

The first line of the address.

For example, this may be the street name and number, or the Post Office Box details.
Data can consist of any characters
Min length:1
Max length:100
street2 String

The second line of the address (if provided).

Data can consist of any characters
Min length:1
Max length:100
contact Object

Details of the contact person at the address the goods will be shipped to.

email String

The contact person's email address.

The field format restriction ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses.
Ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses
firstName String

The first name of the person to whom the order is being shipped.

Data can consist of any characters
Min length:1
Max length:50
lastName String

The last name or surname of the person to whom the order is being shipped.

Data can consist of any characters
Min length:1
Max length:50
mobilePhone String

The contact person's mobile phone or cell phone number.

Data can consist of any characters
Min length:1
Max length:20
phone String

The phone number of the person to whom the order is being shipped.

Data can consist of any characters
Min length:1
Max length:20
method String

The shipping method code to indicate the time frame and the priority of the order.

Value must be a member of the following list. The values are case sensitive.
ELECTRONICElectronic delivery.
GROUNDGround (4 or more days).
OVERNIGHTOvernight (next day).
PRIORITYPriority (2-3 days).
SAME_DAYSame day.
transaction Object

Information about this transaction.

acquirer Object

Additional information to be passed to acquirer.

customData String

Additional information requested by the acquirer which cannot be passed using other available data fields.

This field must not contain sensitive data.
Data can consist of any characters, but sensitive data will be rejected
Min length:1
Max length:2048
transactionId String

This is the value provided to the acquirer to identify the order.

Ideally this will be the order.id, however if that value cannot be used directly, it will be transformed by the gateway to a unique value that the acquirer will accept. If that behavior is not suitable, you can directly provide the value in this field and it will be passed to the acquirer. You then take responsibility for its correctness. (Note: Contact your payment provider to see if this is supported for your acquirer).
Data can consist of any characters, but sensitive data will be rejected
Min length:1
Max length:100
frequency String

Indicates the frequency of the transaction offered to the payer.

Value must be a member of the following list. The values are case sensitive.
INSTALLMENTIndicates an installment transaction where the payer authorizes you to deduct multiple payments over an agreed period of time for a single purchase.
RECURRINGIndicates a recurring transaction where the payer authorizes you to automatically debit their accounts for bill or invoice payments.
SINGLEIndicates a single transaction where a single payment is used to complete the order.
merchantNote String

Your note about this transaction.

Data can consist of any characters
Min length:1
Max length:250
reference String

An optional identifier for this transaction.

Data can consist of any characters
Min length:1
Max length:40
userId String

The person who initiated this transaction.

For Merchant Administration, the person is identified by their logon name.
Data can consist of any characters
Min length:1
Max length:256

Return Value

None