Parameters
Key | Type | Required | Description |
---|---|---|---|
offeringId | string | Yes | ID of the offering created in the Business Portal |
purchaseMetadata | object | No | Key-value pairs of custom information associated with the purchase. |
Returns
A promise that resolves to the function to start the purchase and a destroy method to control the purchase widget programmatically. Type of the response isCreatePurchaseResult
.
Field | Type | Description |
---|---|---|
startPurchase | () => Promise<PurchaseStateSummary> | The startPurchase function to start the purchase flow. |
destroy | () => void | Clean up and remove all Supertab elements from the DOM. |
Example
Types
PurchaseStateSummary
PurchaseStateSummary type definition
CreatePurchaseResult
CreatePurchaseResult type definition