PostPurchaseProps
Ce contenu n’est pas encore disponible dans votre langue.
PostPurchaseProps = {
badgeText?:string;classname?:string;ctaText?:string;customerId?:string;imageUrl?:string;merchantId?:string;orderId?:string;placement?:string;preview?:string;previewVariant?:"referrer"|"referee";products?:SharingPageProduct[] |string;refereeText?:string;referrerText?:string;sharingUrl?:string;token?:string;variant?:"referrer"|"referee"; }
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:7
Props for the PostPurchase component.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”badgeText?
Section titled “badgeText?”
optionalbadgeText?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:47
Label for the pill badge displayed above the message. When omitted (and no placement config provides one), the badge is hidden.
classname?
Section titled “classname?”
optionalclassname?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:38
CSS class names passed through to the root element (Light DOM).
ctaText?
Section titled “ctaText?”
optionalctaText?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:62
Override the CTA button text.
Use {REWARD} as placeholder for the reward amount.
customerId?
Section titled “customerId?”
optionalcustomerId?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:13
Merchant customer ID for purchase tracking fallback.
All three tracking props (customerId, orderId, token) must be
present for tracking to fire.
imageUrl?
Section titled “imageUrl?”
optionalimageUrl?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:69
Override the image displayed on the left of the post-purchase card.
Accepts an image URL. Falls back to the built-in gift icon when omitted.
The image is constrained to the icon slot via object-fit: contain,
so any aspect ratio renders correctly.
merchantId?
Section titled “merchantId?”
optionalmerchantId?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:30
Override the merchant ID resolved from the SDK config.
orderId?
Section titled “orderId?”
optionalorderId?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:17
Merchant order ID for purchase tracking fallback.
placement?
Section titled “placement?”
optionalplacement?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:34
Placement ID for backend-driven CSS customization.
preview?
Section titled “preview?”
optionalpreview?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:90
When set, renders the card in preview mode (e.g. Shopify/WP editor). Bypasses the client-ready / RPC gates that normally hide the card until the backend resolves, and no-ops the click handler so merchants can see the final layout with their configured copy.
previewVariant?
Section titled “previewVariant?”
optionalpreviewVariant?:"referrer"|"referee"
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:95
Which variant to show when preview is set.
Defaults to "referrer".
products?
Section titled “products?”
optionalproducts?:SharingPageProduct[] |string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:83
Optional product cards forwarded to the sharing page when the user
clicks the CTA. Accepts either a real SharingPageProduct
array (when set imperatively via the JS property,
el.products = [...]) or a JSON-stringified array (when set as an
HTML attribute, <frak-post-purchase products='[...]'>). The HTML
attribute path is required for server-rendered surfaces — e.g.
WooCommerce / Magento plugins — because preact-custom-element
delivers attribute values as raw strings.
Empty arrays / unparseable strings are treated as “no products” so the sharing page renders without the product card section.
refereeText?
Section titled “refereeText?”
optionalrefereeText?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:57
Override the message shown to referees.
Use {REWARD} as placeholder for the reward amount.
referrerText?
Section titled “referrerText?”
optionalreferrerText?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:52
Override the message shown to referrers.
Use {REWARD} as placeholder for the reward amount.
sharingUrl?
Section titled “sharingUrl?”
optionalsharingUrl?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:26
Base URL to share. Falls back to the merchant domain returned by the backend when omitted.
token?
Section titled “token?”
optionaltoken?:string
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:21
Checkout token for purchase tracking fallback.
variant?
Section titled “variant?”
optionalvariant?:"referrer"|"referee"
Defined in: vendor/wallet/sdk/components/src/components/PostPurchase/types.ts:42
Force a display variant instead of relying on the backend evaluation.