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

Information on the billing address including the contact details of the payer.

address Object

The address of the payer to whom the order is being billed.

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
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
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
constraints Object

Information about any constraints which apply to this transaction.

Specify constraints to ensure the transaction conforms to pre-defined criteria. This is useful when your integration does not directly collect all the transaction values. For example, a session based integration or a hosted payment page integration.
customer Object

Information associated with the customer'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
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
externalTokenProvider Object

Additional information about the external token repository you are configured with.

These fields are MANDATORY for MerchantLink merchants and must not contain sensitive data.
customData String

Provide the site code required to save card details against a token.

For example: '{"siteCode":"BNE"}'.
Data can consist of any characters
Min length:1
Max length:4000
merchant String REQUIRED

The unique identifier issued to you by your payment provider.

This identifier can be up to 12 characters in length.
Data may consist of the characters 0-9, a-z, A-Z, '-', '_'
Min length:1
Max length:40
order Object REQUIRED

Information about the order associated with this transaction.

id String

A unique identifier for this order to distinguish it from any other order you create.

Use this identifier when referring to this order in subsequent transactions and in retrieval operations. This value must be unique for every order created by your merchant profile.
Data can consist of any characters
Min length:1
Max length:40
amount Number REQUIRED

The total amount for the order.

If you provide both this value and any of the sub-total amounts (order.itemAmount, order.shippingAndHandlingAmount, order.taxAmount) then the sum of the sub-total amounts MUST equal the order.amount.
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
Min length:1
Max length:14
currency String REQUIRED

The currency of the transaction expressed as an ISO 4217 alpha code, e.g. USD.

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

A note from the payer about this order.

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

The date the payer placed the order.

Data must comply with ISO 8601 extended date format, yyyy-mm-dd. This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data must comply with ISO 8601 extended date format, yyyy-mm-dd
customerReference String

The payer's own reference for the order (for example, the purchase order number).

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data consists of ASCII characters
Min length:0
Max length:25
description String REQUIRED

Short textual description of the contents of the order.

Data can consist of any characters
Min length:1
Max length:127
item Object

Information about the items the payer purchases with the order.

description String

Description for the item with information such as size, color, etc.

For example, 'Color:Red, Size:M'
Data can consist of any characters
Min length:1
Max length:127
name String REQUIRED

A short name describing the item.

Data can consist of any characters
Min length:1
Max length:127
quantity Number REQUIRED

The quantity of the item.

Data is a number between 1 and 9999999999999999 represented as a string.
sku String

The SKU (Stock Keeping Unit) or the item identifier for this item.

Data can consist of any characters
Min length:1
Max length:127
unitPrice Number REQUIRED

The cost price for the item.

This amount is multiplied with the item.quantity to determine the total amount for this item.
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
Min length:1
Max length:14
unitTaxAmount Number

The tax amount for the item.

This amount is multiplied with the item.quantity to determine the total tax amount for this item.
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
Min length:1
Max length:14
itemAmount Number

The total item amount for the order.

If you do not provide this value but provide line item data, then this amount is calculated as the sum of the item.quantity times the item.unitPrice for all the line items (total item amount).
If you provide both this value and line item data, then the order.itemAmount MUST equal the total item amount.
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
Min length:1
Max length:14
productSKU String

Unique SKU (Stock Keeping Unit) for the single, most expensive product associated with this order.

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data can consist of any characters
Min length:1
Max length:15
reference String

The identifier of the order.

For example, a shopping cart number, an order number, or an invoice number.
Data can consist of any characters
Min length:1
Max length:40
requestorName String

The name of the person who requested the goods or services.

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data can consist of any characters
Min length:1
Max length:100
shippingAndHandlingAmount Number

The total shipping and handling amount for the order.

Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
Min length:1
Max length:14
taxAmount Number

The total tax amount for the order.

If you do not provide this value but provide line item data, then this amount is calculated as the sum of the item.quantity times the item.unitTaxAmount for all the line items (total tax amount).
If you provide both this value and line item data, then the order.taxAmount MUST equal the total tax amount.
This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
Min length:1
Max length:14
taxRegistrationId String

Your tax registration identifier provided by the tax authority (for example, federal tax identification number, ABN).

This data may be used to qualify for better interchange rates on corporate purchase card transactions.
Data can consist of any characters
Min length:1
Max length:20
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
paymentPage Object REQUIRED

Information that controls the payer's interaction on the payment page.

billingAddress Object
displayControl String

Indicates if you require the payer to provide their billing address on the payment page.

By default, it will be assumed that this field 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.
customer Object
email Object
displayControl String

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

By default, it will be assumed that this field 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.
googleAnalytics Object
propertyId String

This is the property ID for your shop site provided by Google Analytics in the form UA-XXXXX-Y.

Provide this ID if you want to track interactions with your payment page using Google Analytics, see www.google.com/analytics.
Data can consist of any characters
Min length:1
Max length:20
locale String

A language identifier or IETF language tag to control the language of the payment page displayed to the payer.

For example, 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, then the payment page 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 on the payment page.

address Object

Information on your business address.

line1 String

The first line of your business address for display to the payer on the payment page.

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 on the payment page.

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 on the payment page.

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 on the payment page.

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 on the payment page.

For example, 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 page

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 on the payment page.

Data can consist of any characters
Min length:0
Max length:20
paymentTerms Object
displayControl String

Indicates whether you wish to hide payment terms for a payment plan on the payment page.

By default, this field is set to SHOW_IF_SUPPORTED.
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.
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
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
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
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
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.
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
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
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