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';
financingType | string (enum: FinancingType) | The financing product. | See above definition for allowed values |
locationType | string (enum: LocationType) | Location of the Placement on the merchant’s site. | See above definition for allowed values |
placementId | string? | 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. |
domID | string | The id attribute of the div element in which to render the Placement. | |
allowCheckout | boolean? | Set whether a customer can fully checkout with financing. | Only used for installments product(s) |
order | Order? | An object containing key order information to be supplied to the Placement. | Typically this mainly contains price information. |
selectedCardKey | string? | Selected card art. This will bypass the card selection page. | |
defaultSelectedCardKey | string? | 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
Updated 4 months ago