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.
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
Information on the billing address including the contact details of the payer.
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
city
String
=
OPTIONAL
The city portion of the payers address.
Data can consist of any characters
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
country
String
=
OPTIONAL
The 3 letter ISO standard alpha country code of the payers address.
Data must consist of the characters A-Z
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
postcodeZip
String
=
OPTIONAL
The post code or zip code of the payers address.
Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
stateProvince
String
=
OPTIONAL
The state or province of the payers address.
Data can consist of any characters
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
street
String
=
OPTIONAL
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
billing
Object
=
OPTIONAL
address
Object
=
OPTIONAL
street2
String
=
OPTIONAL
The second line of the address (if provided).
Data can consist of any characters
customer
Object
=
OPTIONAL
email
String
=
OPTIONAL
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
merchant
String
=
COMPULSORY
The unique identifier issued to you by your payment provider.
Data may consist of the characters 0-9, a-z, A-Z, '-', '_'
order
Object
=
COMPULSORY
Information about the order associated with this transaction.
id
String
=
OPTIONAL
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 you create using your merchant profile.
Data can consist of any characters
amount
Number
=
COMPULSORY
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.
currency
String
=
COMPULSORY
The currency of the transaction expressed as an ISO 4217 alpha code, e.g. USD.
Data must consist of the characters A-Z
description
String
=
COMPULSORY
Short textual description of the contents of the order.
Data can consist of any characters
shippingAndHandlingAmount
Number
=
OPTIONAL
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.
taxAmount
Number
=
OPTIONAL
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.
paymentPage
Object
=
COMPULSORY
Information that controls the payer's interaction on the payment page.
billingAddress
Object
=
OPTIONAL
displayControl
String
=
OPTIONAL
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.
HIDE
Hides data fields from the payer.
MANDATORY
Displays data fields and allows the payer to enter data into these fields.
OPTIONAL
Displays data fields and allows the payer to opt out of data entry for these fields.
READ_ONLY
Data is displayed but cannot be modified.
customer
Object
=
OPTIONAL
email
Object
=
OPTIONAL
displayControl
String
=
OPTIONAL
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 READ_ONLY.
Value must be a member of the following list. The values are case sensitive.
HIDE
Hides data fields from the payer.
MANDATORY
Displays data fields and allows the payer to enter data into these fields.
OPTIONAL
Displays data fields and allows the payer to opt out of data entry for these fields.
READ_ONLY
Data is displayed but cannot be modified.
googleAnalytics
Object
=
OPTIONAL
propertyId
String
=
OPTIONAL
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
merchant
Object
=
COMPULSORY
Information that allows you to display your brand and business details on the payment page.
address
Object
=
OPTIONAL
Information on your business address.
line1
String
=
OPTIONAL
The first line of your business address for display to the payer on the payment page.
Data can consist of any characters
line2
String
=
OPTIONAL
The second line of your business address for display to the payer on the payment page.
Data can consist of any characters
line3
String
=
OPTIONAL
The third line of your business address for display to the payer on the payment page.
Data can consist of any characters
line4
String
=
OPTIONAL
The fourth line of your business address for display to the payer on the payment page.
Data can consist of any characters
email
String
=
OPTIONAL
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
logo
String
=
OPTIONAL
The URL of your business logo for display to the payer on the payment page.
The URL must be secure (https), for example, https://yoursite.com/images/logo.gif. You can resize the image; however, the height must not exceed 140 pixels else it will be cropped. For best results, use images in JPEG or PNG formats with dimensions 140 width × 140 height (pixels).
Data must be an absolute URI conforming to the URI syntax published by IETF RFC 2396. The URI must be one of the following schemes : https
name
String
=
COMPULSORY
The name of your business for display to the payer on the payment page
Data can consist of any characters
phone
String
=
OPTIONAL
The phone number of your business for display to the payer on the payment page.
Data can consist of any characters
shipping
Object
=
OPTIONAL
Information on the shipping address including the contact details of the addressee.
address
Object
=
OPTIONAL
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
=
OPTIONAL
The city portion of the address.
Data can consist of any characters
country
String
=
OPTIONAL
The 3 letter ISO standard alpha country code of the address.
Data must consist of the characters A-Z
postcodeZip
String
=
OPTIONAL
The post code or zip code of the address.
Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'
stateProvince
String
=
OPTIONAL
The state or province of the address.
Data can consist of any characters
street
String
=
OPTIONAL
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
street2
String
=
OPTIONAL
The second line of the address (if provided).
Data can consist of any characters
firstName
String
=
OPTIONAL
The first name of the person to whom the order is being shipped.
Data can consist of any characters
lastName
String
=
OPTIONAL
The last name or surname of the person to whom the order is being shipped.
Data can consist of any characters
method
String
=
OPTIONAL
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.
ELECTRONIC
Electronic delivery.
GROUND
Ground (4 or more days).
OVERNIGHT
Overnight (next day).
PRIORITY
Priority (2-3 days).
phone
String
=
OPTIONAL
The phone number of the person to whom the order is being shipped.
Data can consist of any characters
Return Value
None