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.
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.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.
The maximum amount for a single payment in the series as agreed with the payer under your agreement with them.
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 frequency of the payments within the series as agreed with the payer under your agreement with them.
AD_HOC
The agreement if for payments on an ah-hoc basis.DAILY
The agreement if for a daily payment.FORTNIGHTLY
The agreement if for a fortnightly payment.MONTHLY
The agreement if for a monthly payment.OTHER
The agreement is for payments according to a schedule other than the ones listed in the other enumeration values for this field.QUARTERLY
The agreement if for a quarterly payment.TWICE_YEARLY
The agreement if for a payment twice a year.WEEKLY
The agreement if for a weekly payment.YEARLY
The agreement if for a yearly payment.Information 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.
Additional information returned by the scheme or issuer in the authentication response that must be included (together with the standard authentication details) when submitting the transaction for processing by the acquirer.
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.
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.
Cruise industry data.
A departurePort is the port where the passenger(s) boarded the cruise ship when the cruise trip started
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 code of the address.
The first line of the address.
The second line of the address (if provided).
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).
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.
The person who initiated this transaction.
Information that controls the payer's checkout interaction.
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 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 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 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.
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.
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 a Mastercard transaction this identifier must contain the scheme issued transaction identifier, network code and network date, and is also known as the Trace ID. For a Visa or American Express transaction this identifier matches the scheme issued transaction identifier, also known as Transaction Identifier or TID. Refer to the scheme's documentation for more details.
Payment in a Series
You must provide the information returned in the Authorization/Payment/Verification response for the last payer-initiated transaction in the series (CIT).
Refund
You must provide the information returned in the Authorization/Payment response for the payment for which you are issuing a refund.
This is the value provided to the acquirer to identify the order.
Indicates that you were not able to submit the Authorization (or Payment) transaction at the time it was completed with the cardholder due to a connectivity, system issue, or other limitations and have deferred submitting it until your system was back online.
Your note about this transaction.
An optional identifier for this transaction.
Return Value
None