The getAddons method fetches the list of available addons for your app. Use this to display addon options, verify slugs, and show accurate pricing before initiating a checkout.Addons can be added to your App from the Pricing Step inside the App Publish form in the Partners Portal.VAT will be calculated and applied at checkout where applicable.If your product or service should be exempt from VAT but VAT is being applied, please contact our support team to request an exemption. Usage#
API Reference#
embedded.checkout.getAddons()#
Takes no parameters. Returns a Promise that resolves with the addon list or error details.Return Value#
Resolves to a GetAddonsResult object:| Property | Type | Description |
|---|
| success | boolean | true if addons were fetched successfully. |
| addons | AddonInfo[] | undefined | List of available addons. Present when success is true. |
| error | object | undefined | Error details with code and message. Present when success is false. |
AddonInfo#
Each addon in the addons array contains:| Property | Type | Description |
|---|
| slug | string | Unique identifier used in create(). |
| name | string | Display name of the addon. |
| price | number | Price amount. |
| product_id | number | Internal product ID. |
| product_price_id | number | Internal price ID. |
Complete Example#
Fetch addons and present them to the merchant, then initiate checkout on selection:Cache Aware: Results are cached on the host side for 30 minutes. Calling getAddons() multiple times is inexpensive within that window.
Loading State: Show a loading indicator while fetching to avoid a blank UI. Use embedded.ui.loading.show() and .hide().
Graceful Errors: Always handle the success: false case. Network issues or timeouts will resolve with an error rather than throwing.
Modified at 2026-06-30 17:12:16