UnifiedPlacementConfig

Definition

export class UnifiedPlacementConfig {
  financingType: FinancingType;
  locationType: LocationType;
  placementId?: string;
  domID: string;
  allowCheckout?: boolean;
  order?: Order;
  defaultSelectedCardKey?: string;
  selectedCardKey?: string;
}
export type LocationType =
  | 'bag'
  | 'banner'
  | 'cart'
  | 'category'
  | 'checkout'
  | 'dashboard'
  | 'footer'
  | 'homepage'
  | 'landing'
  | 'loyalty'
  | 'mobile'
  | 'product'
	| 'header'
  | 'search';
export type FinancingType = 'card' | 'installments | versatile';
financingTypestring
(enum: FinancingType)
The financing product.See above definition for allowed values
locationTypestring
(enum: LocationType)
Location of the Placement on the merchant’s site.See above definition for allowed values
placementIdstring?The id indicating which placement content should be fetched (and displayed) at the associated point in the dom.If omitted, placement will be found by apiKey + locationType. This id should be provided to disambiguate cases where two placements share a locationType.
domIDstringThe id attribute of the div element in which to render the Placement.
allowCheckoutboolean?Set whether a customer can fully checkout with financing.Only used for installments product(s)
orderOrder?An object containing key order information to be supplied to the Placement.Typically this mainly contains price information.
selectedCardKeystring?Selected card art. This will bypass the card selection page.
defaultSelectedCardKeystring?Initial card art selection. This option will display the card selection page.

Examples

const placementConfig: UnifiedPlacementConfig = {
    financingType: "card",
    locationType: "checkout", 
    domID: "placement1",
    order: { // required for price based messaging
        totalPrice: {
            value: 110000,
            currency: 'USD'
        }
    }
};

Related

RegisterPlacements
Order
Order Item