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 Copied to clipboard
Checkout.configure(configuration);
Example Copied to clipboard
Checkout.configure({ session: { id: '<your_session_id>' } });
Arguments Copied to clipboard
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.Airline industry specific data.
The record locator used to access a specific Passenger Name Record (PNR).
The type of charge associated with the transaction.
ADDITIONAL_COLLECTION
Additional CollectionAGENCY_EXCHANGE_ORDER
Agency Exchange OrderAGENCY_GROUP_TICKET
Agency Group TicketAGENCY_MISCELLANEOUS_CHARGE_ORDER
Agency Misc. Charge Order (MCO)AGENCY_PASSENGER_TICKET
Agency Passenger TicketAGENCY_TOUR_ORDER_OR_VOUCHER
Agency Tour Order/VoucherAIR_FREIGHT
SPD/Air FreightANIMAL_TRANSPORTATION_CHARGE
Animal Transportation ChargeCATALOGUE_MERCHANDISE_ORDERED
Catalogue Merchandise OrderedCLUB_MEMBERSHIP_FEE
Club Membership FeeCOUPON_BOOK
Coupon BookCREDIT_CLASS_SERVICE_ADJUSTMENT
Credit Class of Service AdjustmentCREDIT_DENIED_BOARDING
Credit Denied BoardingCREDIT_EXCHANGE_REFUND
Credit Exchange RefundCREDIT_LOST_TICKET_REFUND
Credit Lost Ticket RefundCREDIT_MISCELLANEOUS_REFUND
Credit Misc. RefundCREDIT_MULTIPLE_UNUSED_TICKETS
Credit Multiple Unused TicketsCREDIT_OVERCHARGE_ADJUSTMENT
Credit Overcharge AdjustmentCREDIT_UNUSED_TRANSPORTATION
Credit Unused TransportationDEBT_ADJUSTMENT_DUPLICATE_REFUND_OR_USE
Debt Adjustment Duplicate Refund/UseDUTY_FREE_SALE
Duty Free SaleEXCESS_BAGGAGE
Excess BaggageEXCHANGE_ADJUSTMENT
Exchange AdjustmentEXCHANGE_ORDER
Exchange OrderFIREARMS_CASE
Firearms CaseFREQUENT_FLYER_FEE_OR_PURCHASE
Frequent Flyer Fee/PurchaseFREQUENT_FLYER_FULFILLMENT
Frequent Flyer FulfillmentFREQUENT_FLYER_OVERNIGHT_DELIVERY_CHARGE
Frequent Flyer Overnight Delivery ChargeGROUP_TICKET
Group TicketIN_FLIGHT_ADJUSTMENT
In-flight AdjustmentIN_FLIGHT_CHARGES
In-flight ChargesIN_FLIGHT_DUTY_FREE_PURCHASE
In-flight Duty Free PurchaseIN_FLIGHT_MERCHANDISE_ORDERED
In-flight Merchandise OrderedIN_FLIGHT_PHONE_CHARGES
In-flight Phone ChargesKENNEL_CHARGE
Kennel ChargeLOST_TICKET_APPLICATION
Lost Ticket ApplicationMISCELLANEOUS_CHARGE_ORDER_OR_PREPAID_TICKET_ADVICE
Misc. Charge Order (MCO) / Prepaid Ticket Auth.MISCELLANEOUS_TAXES_FEES
Miscellaneous Tax(es) Fee(s)PASSENGER_TICKET
Passenger TicketSELF_SERVICE_TICKETS
Self-Service Ticket(s)SENIOR_CITIZEN_DISCOUNT_BOOKLETS
Senior Citizen Discount BookletsSMALL_PACKAGE_DELIVERY
Small Package DeliverySPECIAL_SERVICE_TICKET
Special Service TicketSUPPORTED_REFUND
Supported RefundTICKET_BY_MAIL
Ticket by MailTOUR_DEPOSIT
Tour DepositTOUR_ORDER_VOUCHER
Tour Order VoucherUNDERCHARGE_ADJUSTMENT
Undercharge AdjustmentUNSUPPORTED_REFUND
Unsupported RefundUPGRADE_CHARGE
Upgrade ChargeVENDOR_REFUND_CREDIT
Vendor Refund CreditVENDOR_SALE
Vendor SaleItinerary details
Travel leg details.
The 2-character IATA airline code or 3 digit accounting code or both of the airline carrier for the trip leg.
The ticket containing the coupon for this leg for an itinerary with more than four trip legs.
The coupon number on the ticket for the trip leg.
The 3 character IATA airport code of the departure airport for the trip leg.
Date of departure for the trip leg.
Tax payable on departure for the trip leg.
Departure time in local time for the departure airport for this trip leg.
The 3 character IATA airport code for the destination airport for the trip leg.
Arrival date in local time for the destination airport for this trip leg.
Arrival time in local time for the destination airport for this trip leg.
Restrictions (e.g. non-refundable) or endorsements applicable to the trip leg.
New ticket number issued when a ticket is exchanged for the trip leg.
Total fare payable for the trip leg.
Code defining the rules forming the basis of the fare (type of fare, class entitlement, etc.)
Total fees payable for the trip leg.
The flight number for the trip leg.
Indicates if a stopover is permitted for the trip leg.
Total taxes payable for the trip leg.
The industry code indicating the class of service (e.g. Business, Coach) for the leg.
Number of passengers associated with this booking.
The 3 character ISO 3166-1 alpha-3 country code of the country of origin for the itinerary.
Passenger details
First name of the passenger to whom the ticket is being issued.
Frequent Flyer or Loyalty Program number for this passenger.
Last name of the passenger to whom the ticket is being issued.
Middle name of the passenger to whom the ticket is being issued.
Passenger specific information recorded on the ticket.
Title of the passenger to whom the ticket is being issued.
Plan number supplied by the airline for this booking.
Ticket details
Indicates if a conjunction ticket with additional coupons was issued.
Indicates if an electronic ticket was issued.
The original ticket number when this is a transaction for an exchanged ticket.
Ticket issue information.
The address where the ticket was issued.
The 2-character IATA airline code or 3 digit accounting code or both of the airline carrier issuing the ticket.
Name of airline carrier issuing the ticket.
The city/town where the ticket was issued.
The 3 character ISO 3166-1 alpha-3 country code of the country where the ticket was issued.
The date the ticket was issued.
Industry code of the travel agent issuing the ticket.
Name of the travel agent issuing the ticket.
Indicates if the issued ticket is refundable.
Breakdown of the ticket taxes, airport taxes, charges and fees for an airline ticket purchase.
The tax, charge or fee amount payable.
The tax, charge or fee type code as assigned by IATA.
The airline ticket number associated with the transaction.
Total fare for all trip legs on the ticket.
Total fee for all trip legs on the ticket.
Total taxes for all trip legs on the ticket.
The type of transaction performed against this airline booking.
EXCHANGE_TICKET
Exchange TicketMISCELLANEOUS_CHARGE
Miscellaneous ChargeREFUND
RefundREVERSAL
ReversalTICKET_PURCHASE
Ticket PurchaseTOUR_ORDER
Tour OrderInformation about how the payer's identity is verified.
This parameter group include payer authentication options available to you, parameters you need to perform payer authentication for an available method, and the results of payer authentication.
Information about payer authentication using 3-D Secure authentication.
Parameters in this group apply to both 3-D Secure authentication version 1 and 3-D Secure Authentication version 2.
Depending on the 3-D Secure authentication version applicable you will also need additional parameters:
- 3-D Secure authentication version 1: see the authentication.3ds1 parameter group.
- 3-D Secure authentication version 2: see the authentication.3ds2 parameter group.
Indicates the security level of the transaction.
The base64 encoded value generated by the issuer.
For 3DS version 2, this field corresponds to the Authentication Value.
A unique identifier for the 3-D Secure authentication transaction.
For 3DS version 2, this field corresponds to the identifier assigned by the scheme directory server.
This identifier should be used in subsequent operation requests unaltered.
An XID submitted in this field must be in base64 format.
Information about payer authentication using 3-D Secure authentication version 1.
Indicates the result of payer authentication with the issuer.
Indicates whether or not payer authentication is available for the card number you provided.
This is the value returned in the 'enrolled' field of the Verify Enrollment Response (VERes) message from the card scheme's Directory Server. For example, Y, N, or U. Refer to the relevant documentation for Mastercard SecureCode™, Verified by Visa™, JCB J/Secure™, American Express SafeKey™, or Diners Club ProtectBuy™.
Information about payer authentication using 3-D Secure authentication version 2.
The version of the EMV 3-D Secure protocol used to perform 3-D Secure authentication, in the format specified by EMVCo.
A code indicating the reason for the transaction status returned in authentication.3ds2.transactionStatus.
Indicates the result of payer authentication with the issuer.
Refer to the EMVCo specification for 3-D Secure.
This parameter group is only applicable if you are subject to the Regulatory Technical Standards (RTS) requirements for Strong Customer Authentication (SCA) under the Payment Services Directive 2 (PSD2) regulations in the European Economic Area.
Indicates why this payment qualifies for exemption from Strong Customer Authentication (SCA) under the Payment Services Directive 2 (PSD2).
- For recurring payments provide the RECURRING_PAYMENT value only if the amount is the same. If the amount varies, provide MERCHANT_INITIATED_TRANSACTION instead.
LOW_RISK
Exemption is claimed because the acquirer has a low fraud rate.LOW_VALUE_PAYMENT
Exemption is claimed as the amount is below 30 Euro.MERCHANT_INITIATED_TRANSACTION
The transaction is excluded as it was initiated by the merchant based on an agreement with the payer. For example, a recurring payment (for a varied or fixed amount), installment payment, or account top-up. In these cases, the payer is not present and cannot participate in an authentication interaction. Merchant initiated transactions are only applicable to subsequent transactions on the order and are out of scope of the PSD2 RTS on Strong Customer Authentication (SCA). The payer must be authenticated during the first transaction that established the agreement.NONE
An exemption is not claimed for this transaction. The merchant requires Strong Customer Authentication (SCA) be performed.RECURRING_PAYMENT
The transaction is exempt as it was initiated by the merchant based on an agreement with the payer for a recurring payment for a fixed amount. This value is only applicable to subsequent transactions on the order. In this case, the payer is not present and cannot participate in an authentication interaction. The payer must be authenticated during the first transaction that established the agreement.SECURE_CORPORATE_PAYMENT
The transaction is exempt as it is a corporate or Business-to-Business (B2B) payment performed using dedicated payment processes and protocols that are not available to consumers and offer at least equivalent security levels.The transactionId you used for the Initiate Authentication operation.
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.
Cruise industry data.
The cruise booking reference.
Information about the cruise line.
Address of the cruise line.
The city portion of the 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 first line of the address.
The second line of the address (if provided).
Contact details of the cruise line.
The cruise line registered office telephone number in ITU-T E123 format.
The customer service phone number in ITU-T E123 format.
The cruise departure/ sail date.
This field is required when cruise industry data is provided.
Cruise passenger details.
The first name of the passenger.
The folio number assigned to the passenger.
The last name of the passenger.
The middle name of the passenger.
The title of the passenger.
The cruise return/ sail end date.
This field is required when cruise.departureDate is provided and the value must be equal to or later than cruise.departureDate.
The name of the cruise ship.
The industry code of the travel agent booking the cruise.
The name of the travel agent booking the cruise.
A comma separated list of the travel items that are included as part of a cruise travel package.
If the value CRUISE_ONLY is provided then other items are not permitted in the list.
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 URL to which you want to redirect the payer's browser if they cancel their payment.
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.
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.
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.
The unique identifier that allows the issuer to link related transactions (for example, Merchant Initiated Transactions).
If you provide this value in the request, gateway will use this value in preference to the gateway's selected value.
This is the value provided to the acquirer to identify the order.
Your note about this transaction.
An optional identifier for this transaction.
The person who initiated this transaction.
Return Value Copied to clipboard
None