Adding item information
The extra
object
extra
objectThe extra
object is optional and can be used to show the details of your item.
![](https://files.readme.io/1b9bf40-image.png)
The options you can pass to the object are:
Property | Type | Description |
---|---|---|
author_image_url | String | The URL of the author's avatar |
author | String | The name of the author |
image_url | String | The URL of the item's image. Otherwise, the default image will be shown |
name | String | The name of the item |
header | String | Custom text at the top of the widget that is shown instead of Buy {category} |
category | String | The category of the item. If category and header are not provided, the default value will be Buy Token |
Here is how the widget looks with the default parameters:
![](https://files.readme.io/9e4a468-Untitled_7.png)
const widget = new WertWidget({
...options,
extra: {
item_info: {
author_image_url: "string", //Example: https://something.com/images/author_image.jpg
author: "Item's Author",
image_url: "string", //Example: https://something.com/images/image.jpg
name: "Item's Name",
category: "Item's Category",
header: "Custom Header",
},
},
});
Screens displaying item information
Order Details:
![](https://files.readme.io/4b3cb85-Untitled_11.png)
Payment error screen:
![](https://files.readme.io/ede5b0a-Untitled_13.png)
Order history:
![](https://files.readme.io/d8f1e67-Untitled_9.png)
Updated 4 months ago
Documentation related to this page