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.embedded.checkout.getAddons()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. |
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. |
getAddons() multiple times is inexpensive within that window.embedded.ui.loading.show() and .hide().success: false case. Network issues or timeouts will resolve with an error rather than throwing.