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.
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.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.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.
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.
AUTO
If either a LOW_RISK or LOW_VALUE_PAYMENT exemption applies to the transaction, it is automatically claimed by the gateway on behalf of the merchant.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.SCA_DELEGATION
The transaction is exempt as the issuer has delegated Strong Customer Authentication (SCA) using a compliant method to a third party. For example, the payer was subject to SCA when a card was enrolled with a wallet provider or SCA was delegated to the merchant.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.WHITELISTED_MERCHANT
The transaction is exempt because the payer has added you to the list of their trusted merchants (as maintained by the issuer).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.
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.
Additional information about the external token repository you are configured with.
Provide the site code required to save card details against a token.
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 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 URL to which you want to return the payer if the payment is not completed in the allowed time.
Tyro 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.
The invoice number you issued for this 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.
Use this parameter group to provide additional information if you are a marketplace.You are considered a marketplace if you operate an electronic commerce website or mobile application that brings together payers and retailers and you are selling the goods or services on behalf of the retailer.In this case, the card schemes may require you to register with them as a marketplace and assign you a Marketplace ID.
Provide information about the location of the retailers for goods or services included in this order.Where a retailer is located in a country different from your country, they are considered a foreign retailer, otherwise they are considered a domestic retailer.
DOMESTIC_ONLY
The order only contains items from domestic retailers.FOREIGN_AND_DOMESTIC
The order contains items from both foreign and domestic retailers. FOREIGN_ONLY
The order only contains items from foreign retailers.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.
Indicates the purchase of specific types of goods or services that you are required to inform the issuer about when requesting authorization of a payment.
6051 (Quasi Cash – Merchant or Non-Financial Institutions – Foreign Currency, Non-Fiat Currency) and this transaction is for the purchase of cryptocurrency. Set the value to CRYPTOCURRENCY.
6211 (Securities – Brokers/Dealers) and this transaction is for the purchase of high-risk securities. Set the value to HIGH_RISK_SECURITIES.
6012 (Merchandise and Services—Customer Financial Institutions) or 6051 (Non-Financial Institutions – Foreign Currency, Non-Fiat Currency) and this transaction is for debt repayment. Set the value to DEBT_REPAYMENT.
You may set purchase type to OTHER for any other type of payment.
CRYPTOCURRENCY
The transaction is for the purchase of a cryptocurrency.DEBT_REPAYMENT
The transaction is for debt repayment.HIGH_RISK_SECURITIES
The transaction is for the purchase of high-risk securities.OTHER
The transaction does not involve the purchase of cryptocurrency, or high-risk securities and is not a debt repayment.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).
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 the payment type selected by the payer for this payment and the source of the funds.
For card payments the source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a card token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override card token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.
Information about the source of funds when it is directly provided (as opposed to via a token or session).
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.
Information about Foreign Exchange (FX) rates provided by your Multi-Currency Pricing service provider.
Information about the Foreign Exchange (FX) rate that was used to calculate the amounts for this payment.
Unique identifier for the Foreign Exchange (FX) rate quote as returned in the SHOPPING_OPTIONS_INQUIRY response.
An optional identifier for this transaction.
Return Value Copied to clipboard
None