@paydock/client-sdk
Version:
Paydock client sdk
105 lines • 8.25 kB
TypeScript
export { ClickToPay } from './click-to-pay-secure-remote-commerce';
export { IClickToPayMeta } from './interfaces';
/**
* Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
* @interface IMastercardSRCMeta
*
* @type {object}
* @param {boolean} [disable_summary_screen] Boolean flag that controls if a final summary screen is presented in the checkout flow.
* @param {object} [dpa_data] Object where the DPA creation data is stored.
* @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented.
* @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
* @param {string} [dpa_data.dpa_address] Address associated with the DPA.
* @param {string} [dpa_data.dpa_email_address] Email address for DPA communication.
* @param {object} [dpa_data.dpa_phone_number] Phone number structure for DPA communication.
* @param {string} [dpa_data.dpa_phone_number.country_code] The country code of the phone number.
* @param {string} [dpa_data.dpa_phone_number.phone_number] The phone number part of the phone number.
* @param {string} [dpa_data.dpa_logo_uri] URI for the DPA logo.
* @param {string} [dpa_data.dpa_supported_email_address] Supported email address for DPA support.
* @param {object} [dpa_data.dpa_supported_phone_number] Supported phone number for DPA support.
* @param {string} [dpa_data.dpa_supported_phone_number.country_code] The country code of the phone number.
* @param {string} [dpa_data.dpa_supported_phone_number.phone_number] The phone number part of the phone number.
* @param {string} [dpa_data.dpa_support_uri] URI for DPA support.
* @param {string} [dpa_data.application_type] Application type, either 'WEB_BROWSER' or 'MOBILE_APP'.
* @param {string[]} [co_brand_names] List of co-brand names associated with the Click to Pay experience.
* @param {string} [checkout_experience] Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'.
* @param {string} [services] Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'.
* @param {object} [dpa_transaction_options] Object that stores options for creating a transaction with DPA.
* @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
* @param {string[]} [dpa_transaction_options.dpa_accepted_billing_countries] List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format.
* @param {string} [dpa_transaction_options.dpa_billing_preference] Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'.
* @param {object[]} [dpa_transaction_options.payment_options] Payment options included in the transaction.
* @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Dynamic data types.
* @param {string} [dpa_transaction_options.order_type] Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'.
* @param {string} [dpa_transaction_options.three_ds_preference] Preference for 3DS usage in the transaction.
* @param {boolean} [dpa_transaction_options.confirm_payment] Indicates if payment confirmation is required.
* @param {boolean} [dpa_transaction_options.consumer_name_requested] Indicates if consumer name is requested.
* @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Indicates if consumer email address is requested.
* @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Indicates if consumer phone number is requested.
* @param {object} [dpa_transaction_options.transaction_amount] Details of the transaction amount.
* @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Amount of the transaction.
* @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Currency code of the transaction in 3 letter ISO code format.
* @param {string} [dpa_transaction_options.merchant_order_id] Merchant's order ID.
* @param {string} [dpa_transaction_options.merchant_category_code] Merchant's category code.
* @param {string} [dpa_transaction_options.merchant_country_code] Merchant's country code in ISO 3166-1 alpha-2 format.
* @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
* @param {string} [customer.email] Customer email.
* @param {string} [customer.first_name] Customer first name.
* @param {string} [customer.last_name] Customer last name.
* @param {object} [customer.phone] Object where the customer phone is stored.
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US).
* @param {string} [customer.phone.phone] Customer phone number.
* @param {string} [unaccepted_card_type] Used to block a specific card type. Options are 'CREDIT', 'DEBIT'.
*/
/**
* Interface for data returned in callbacks
* @interface EventData
*
* @type {object}
* @param {EVENT_DATA_TYPE} type Event type of type [EVENT_DATA_TYPE]{@link EVENT_DATA_TYPE}
* @param {string | EventDataCheckoutCompletedData} data optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData]{@link EventDataCheckoutCompletedData} for checkoutCompleted
*/
/**
* Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
* When the flow type is src, masked checkoutData available is also returned
*
* @interface EventDataCheckoutCompletedData
*
* @type {object}
* @param {string} type type of the checkout, can be `src` or `manual`.
* @param {string} token one time token value.
* @param {string} token_type one time token type value, can be `card` or `card_scheme_token`.
* @param {object} [checkoutData] Optional checkout data related to the checkout information. Only available on src flow.
* @param {string} [checkoutData.card_number_bin] The BIN of the card used for the transaction.
* @param {string} [checkoutData.card_number_last4] The last four digits of the card number.
* @param {string} [checkoutData.card_scheme] The card scheme. Values: visa, mastercard, amex, diners, discover.
* @param {string} [checkoutData.card_type] The type of card. Values: credit, debit, prepaid, combo, flex.
* @param {string} [checkoutData.address_line1] Address line 1 for billing address.
* @param {string} [checkoutData.address_line2] Address line 2 for billing address.
* @param {string} [checkoutData.address_line3] Address line 3 for billing address.
* @param {string} [checkoutData.address_city] City for billing address.
* @param {string} [checkoutData.address_postcode] Postal code for billing address.
* @param {string} [checkoutData.address_state] State or province for billing address.
* @param {string} [checkoutData.address_country] Country for billing address.
* @param {object} [checkoutData.shipping] Optional shipping information.
* @param {string} [checkoutData.shipping.address_line1] Address line 1 for shipping address.
* @param {string} [checkoutData.shipping.address_line2] Address line 2 for shipping address.
* @param {string} [checkoutData.shipping.address_line3] Address line 3 for shipping address.
* @param {string} [checkoutData.shipping.address_city] City for shipping address.
* @param {string} [checkoutData.shipping.address_postcode] Postal code for shipping address.
* @param {string} [checkoutData.shipping.address_state] State or province for shipping address.
* @param {string} [checkoutData.shipping.address_country] Country for shipping address.
*/
/**
* Interface for style configs inyected to the Click to Pay checkout
* @interface IStyles
*
* @type {object}
* @param {string} [primary_button_color] Color Code for primary button.
* @param {string} [primary_button_text_color] Color Code for primary button text.
* @param {string} [secondary_button_color] Color Code for secondary button.
* @param {string} [secondary_button_text_color] Color Code for secondary button text.
* @param {string} [font_family] Font family to be used.
* @param {boolean} [enable_src_popup] Boolean flag to make the Click to Pay checkout show in a popup window instead of embedded in iframe.
*/
//# sourceMappingURL=index.d.ts.map