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
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.
A series of related orders that execute one commercial agreement.
You must provide this data for some types of payments (such as recurring), but you can provide it for any cases where you want to link orders together.
Date at which your agreement with the payer to process payments expires.
Your identifier for the agreement you have with the payer to process payments.
- Recurring payments: you have an agreement with the payer that authorizes you to automatically debit their account at agreed intervals for fixed or variable amounts. For example, gym membership, phone bills, or magazine subscriptions.
- Installment payments: you have an agreement with the payer that authorizes you to process multiple payments over an agreed period of time for a single purchase. For example, the payer purchases an item for $1000 and pays for it in four monthly installments.
- Unscheduled: you have an agreement with the payer that authorizes you to process future payments when required. For example, the payer authorizes you to process an account top-up transaction for a transit card when the account balance drops below a certain threshold.
Information about agreements for recurring payments.
Indicates if all the payments within the agreement use the same amount or if the amount differs between the payments.
FIXED
All payments in the recurring payment agreement have the same amount. Examples include magazine subscriptions or gym memberships.VARIABLE
The amount for the payments within the recurring payment agreement differs between payments. Examples include usage-based charges like utility or phone bills.The minimum number of days between payments agreed with the payer under your agreement with them.
The number of merchant-initiated payments within the recurring payment agreement.
The type of commercial agreement that the payer has with you.
The gateway will use the value you specify for subsequent payments in the series.
INSTALLMENT
An agreement where the payer authorizes the payment for a single purchase to be split into a number of payments processed at agreed intervals. For example, pay for a purchase in six monthly installments.OTHER
An agreement where the merchant wants to link related payments for any purpose other than processing recurring, installment, or unscheduled payments. For example, split tender payments.RECURRING
An agreement where the payer authorizes the merchant to process payments for recurring bills or invoices at agreed intervals (for example, weekly, monthly). The amount might be fixed or variable.UNSCHEDULED
An agreement where the payer authorizes the merchant to automatically deduct funds for a payment for an agreed purchase when required (unscheduled). For example, auto top-ups when the account value falls below a threshold.Details of the payer's billing address.
The payer's billing address.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
The state or province of the address.
The three character ISO 3166-2 country subdivision code for the state or province of the address.
The first line of the address.
The second line of the address (if provided).
Information about any constraints that apply to this transaction.
Information about the payment plan constraints which apply for this transaction.
The allowable number of deferral months for the payment plan.
The allowable number of installments for the payment plan.
The identifiers for the payment plans supported for this transaction.
See Payment Plans for the supported payment plans and their identifiers.
Information about the customer, including their contact details.
The email address of the customer.
The payer's first name.
The payer's last or surname.
The payer's mobile phone or cell phone number in ITU-T E123 format, for example +1 607 1234 5678
The number consists of:
- '+'
- country code (1, 2 or 3 digits)
- 'space'
- national number ( which may embed single spaces characters for readability).
The payer's phone number in ITU-T E123 format, for example +1 607 1234 456
The number consists of:
- '+'
- country code (1, 2 or 3 digits)
- 'space'
- national number ( which may embed single spaces characters for readability).
Details about debt repayment transactions.
Use this field to indicate if the transaction is for a debt repayment.
Information about the device used by the payer for this transaction.
The telephone number captured by ANI (Automatic Number Identification) when the customer calls to place the order.
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.
The mobile phone manufacturer's identifier for the model of the mobile device used to initiate the payment.
Information that controls the payer's checkout interaction.
The property ID for your shop site provided by Google Analytics in the form UA-XXXXX-Y.
The ISO 3166 alpha-3 country code of the payer's country, to be used to present country-specific content to the payer during the interaction.
A group of objects that control the visibility of, and payer-interaction with, displayed information.
Indicates if you require the payer to provide their billing address during the payment interaction.
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.Indicates if you wish to display a 'Confirm Account Number' field for the ACH Account Number entry.
HIDE
Do not display confirm account number.SHOW
Display confirm account number.Indicates if you require the payer to provide their email address on the payment interaction.
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.Indicates if you wish to display a summary of the order before the payer submits their payment.
HIDE
Do not display order summary.SHOW
Display order summary, which may include payment details.SHOW_PARTIAL
Display order summary which may not include payment details.Indicates if you want the payer to confirm the payment details before they submit the payment.
HIDE
Do not display payment confirmation.SHOW
Display payment confirmation.Indicates whether you wish to hide payment terms for a payment plan during the payment interaction.
HIDE
Hides 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_SUPPORTED
Displays the payment terms, if available, to the payer.Indicates if you wish to hide the shipping details on the payment interaction.
HIDE
Hides data fields from the payer.READ_ONLY
Data is displayed but cannot be modified.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).
Information that allows you to display your brand and business details during the payment interaction.
Information on your business address.
The first line of your business address for display to the payer during the payment interaction.
The second line of your business address for display to the payer during the payment interaction.
The third line of your business address for display to the payer during the payment interaction.
The fourth line of your business address for display to the payer during the payment interaction.
The email address of your business for display to the payer during the payment interaction (e.g. an email address for customer service).
The URL of your business logo for display to the payer during the payment interaction.
The name of your business for display to the payer on the payment interaction.
The phone number of your business for display to the payer during the payment interaction.
The URL of your business for display to the payer during the payment interaction.
Indicates the operation that you wish to perform during the Hosted Checkout interaction.
AUTHORIZE
Request for the Hosted checkout interaction to create Authorization transaction for the payment.NONE
Hosted Checkout will collect the payment details from the payer and securely store them against the Hosted Checkout session. No operation will be performed after the payer interaction.PURCHASE
Request for the Hosted checkout interaction to create Purchase transaction for the payment.VERIFY
Request for the Hosted Checkout interaction to verify the payer's account. The payment details are verified using the verification method supported by the acquirer and the data provided in the request.The theme used to control the look and feel of your checkout interaction.
The URL to which you want to return the payer if the payment is not completed in the allowed time.
Your payment service provider might have configured your merchant profile to support several lines of business.
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.
The unique identifier issued to you by your payment provider.
Information about the order associated with this transaction.
A unique identifier for this order to distinguish it from any other order you create.
The total amount for the order. This is the net amount plus any surcharge.
The value of this field in the response may be zero if payer funds are not transferred.
Set this flag if the transaction is a manual cash disbursement transaction, i.e. cash is disbursed upon the acceptance of a card by a financial institution teller.
Indicates if you expect to capture the full order amount for which you are requesting authorization.
ESTIMATED
The amount authorized is an estimate of the amount that will be captured. It is possible that the amount captured will be less, or might not be captured at all.FINAL
The full authorized amount is expected to be captured within the mandated time. The order will only be cancelled in exceptional circumstances (for example, the payer cancelled their purchase).The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.
Information about this order that is of interest to you.
A note from the payer about this order.
The date the payer placed the order.
The payer's own reference for the order.
Short textual description of the contents of the order.
Information about the items the payer purchases with the order.
The brand of the item.
Your category for the item.
Description for the item with information such as size, color, etc.
Provide the industry category to send this line item to your acquirer for specialized processing as industry data.
(order.item.unitPrice + order.item.tax) * order.item.quantity
HEALTHCARE_DENTAL
HEALTHCARE_OTHER
HEALTHCARE_PRESCRIPTION
HEALTHCARE_VISION
A short name describing the item.
The quantity of the item.
The SKU (Stock Keeping Unit) or the item identifier for this item.
The cost price for the item.
The tax amount for the item.
The total item amount for the order.
If you provide both this value and line item data, then the order.itemAmount MUST equal the total item amount.
A 4-digit code used to classify your business by the type of goods or services it offers.This is also known as the Merchant Category Code (MCC).
The amount payable for the order before surcharging is applied.
Your identifier for the part of your organization that is responsible for the order.
The identifier of the order.
The name of the person who requested the goods or services.
The total shipping and handling amount for the order.
Use this parameter group to provide a breakdown of tax types, amount per tax type, and rate per tax type included in order.taxAmount.
The tax amount included in this order for the tax type.
The type of tax included in the order amount.
The total tax amount for the order.
If you provide both this value and line item data, then the order.taxAmount MUST equal the total tax amount.
Your tax registration identifier provided by the Federal/National tax authority (for example, federal tax identification number, ABN).
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.
Identifier of the payment session containing values for any of the request fields to be used in this operation.
Use this field to implement optimistic locking of the session content.
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.
Shipping information for this order.
Indicates whether the shipping address provided is the same as the payer's billing address.
The default value for this field is:
SAME - if the shipping and billing address are supplied, and all fields are the same (ignoring non-alphanumerics).
DIFFERENT - if the shipping and billing address are supplied, and at least one field is different (ignoring non-alphanumerics).
UNKNOWN - either shipping address or billing address is absent.
DIFFERENT
The shipping and billing addresses are different.SAME
The shipping and billing addresses are the same.UNKNOWN
It is not known if the shipping and billing addresses are the same.The address to which this order will be shipped.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
How you obtained the shipping address.
ADDRESS_ON_FILE
Order shipped to an address that you have on file.NEW_ADDRESS
Order shipped to an address provided by the payer for this transaction.The state or province of the address.
The three character ISO 3166-2 country subdivision code for the state or province of the address.
The first line of the address.
The second line of the address (if provided).
Details of the contact person at the address the goods will be shipped to.
The contact person's email address.
The first name of the person to whom the order is being shipped.
The last name or surname of the person to whom the order is being shipped.
The contact person's mobile phone or cell phone number in ITU-T E123 format, for example +1 607 1234 5678
The number consists of:
- '+'
- country code (1, 2 or 3 digits)
- 'space'
- national number ( which may embed single spaces characters for readability).
The contact person's phone number in ITU-T E123 format, for example +1 607 1234 456
The number consists of:
- '+'
- country code (1, 2 or 3 digits)
- 'space'
- national number ( which may embed single spaces characters for readability).
The shipping method used for delivery of this order.
ELECTRONIC
Electronic delivery.GROUND
Ground (4 or more days).NOT_SHIPPED
Order for goods that are not shipped (for example, travel and event tickets)OVERNIGHT
Overnight (next day).PICKUP
Shipped to a local store for pick up.PRIORITY
Priority (2-3 days).SAME_DAY
Same day.Information about this transaction.
Additional information to be passed to acquirer.
Additional information requested by the acquirer which cannot be passed using other available data fields.
This is the value provided to the acquirer to identify the order.
Your note about this transaction.
An optional identifier for this transaction.
Only use the functionality provided in this parameter group if you are a merchant with a card scheme approved Merchant Category Code for Aggregated Transit Fare Collection functionality.
Provide this field if you are submitting an aggregated transit fare.
The Aggregated Transit Fare Collection functionality allows your payers to use their contactless card as both the method of payment as well as their travel ticket.
Use the field to indicate the purpose of this transaction.
AGGREGATION_ACROSS_TRIPS
Indicates a payment where the fare for each journey may not be known at the point of entry into the transit network. Regardless of whether the fare is known or not, tap data is accumulated, and the total fare amount is calculated and charged at the end of the travel period. Also known as Mass Transit Transaction (MTT).
When this value is used, transaction.transit.aggregationStartDate must also be supplied.DEBT_RECOVERY
Indicates that you have initiated a payment to collect an outstanding transit fare. The card schemes place limitations on when and how often you can attempt to clear a transit fare debt. transaction.source for this payment must be set to MERCHANT.
Do not use this value for payments initiated by the payer to pay off fare debts.Provide the transport mode used by the payer for the first trip when fare collection is aggregated across one or more trips as well as on debt recovery transactions.
CABLE_CAR
Cable CarCOACH
CoachCOMMUTER_TRAIN
Commuter TrainEXPRESS_COMMUTER_TRAIN
Express Commuter TrainFUNICULAR_TRAIN
Funicular TrainHIGH_SPEED_TRAIN
High Speed TrainINTERURBAN_BUS
Interurban BusINTER_CITY
Inter CityLIGHT_TRAIN_MASS_TRANSIT
Light Train Mass TransitLOCOMOTIVE
LocomotiveOTHER
OtherPARA_TRANSIT
Para TransitPARKING
ParkingPOWERED_MOTOR_VEHICLE
Powered Motor VehicleREGIONAL_TRAIN
Regional TrainRURAL_BUS
Rural BusSELF_DRIVE_VEHICLE
Self Drive VehicleTAXI
TaxiTOLL
TollTRAILER
TrailerTRAIN
TrainURBAN_BUS
Urban BusWATER_BORNE_VEHICLE
Water Borne VehicleThe person who initiated this transaction.
Return Value
None