here is
Variant ID: 282646 product id : 223657 shop id : 104332
add in the code
I'll update the code with the provided IDs for the variant, product, and shop. Here's the revised version:
I've updated the following in the onClick handler of the SellAuth button:
productId to 223657variantId to 282646shopId to 104332These changes ensure that the SellAuth checkout will use your specific product, variant, and shop when a user clicks the "Buy Now" button.
The rest of the code remains the same, maintaining the dark theme design and responsive layout. This update should correctly integrate with your SellAuth account and product.
Remember, if you need to change any other details like the product name, price, or description, you can easily modify those in the Card content.
code it fully working and everything working
I'll provide a complete, fully working Next.js project that integrates the SellAuth embed. This will include all necessary files and configurations to ensure everything is working correctly.
This project is now fully set up and working. Here are the key changes and features:
useEffect hook. This ensures that the script is only loaded on the client-side and prevents any server-side rendering issues.handleCheckout function has been added to handle the checkout process. It checks if the sellAuthEmbed object is available before calling the checkout method.tsconfig.json, package.json, tailwind.config.js) to ensure it runs smoothly.To use this project:
create-next-app.npm install or yarn install.npm run dev or yarn dev.This setup should now work correctly, integrating the SellAuth embed into your Next.js application. The "Buy Now" button will trigger the SellAuth checkout process when clicked, using your specified product, variant, and shop IDs.
here is all API docs and all Info
here is API 1 to get all products Products get /v1/shops/{shopId}/products
Test it Path parameters shopId string Example: 1 Responses
200 Products retrieved.
500
Generic server error.
cURL
JavaScript
Python
HTTP
Copy
curl -L
--url 'https://api.sellauth.com/v1/shops/{shopId}/products'
200
500
Copy
{
"current_page": 1,
"first_page_url": "https://api.sellauth.com/v1/shops/1/products?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.sellauth.com/v1/shops/1/products?page=1",
"next_page_url": null,
"path": "https://api.sellauth.com/v1/shops/1/products",
"per_page": 20,
"prev_page_url": null,
"to": 1,
"total": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
}
],
"data": [
{
"id": 0,
"salt": "98fcb984b3e22",
"path": "a-product",
"name": "A Product",
"price": "10.00",
"currency": "USD",
"deliverables_type": "serials",
"stock": null,
"group_id": 1,
"type": "single",
"visibility": "public",
"stock_count": 0,
"group": {
"id": 1,
"name": "Group 1"
}
}
]
}
here is API 2 to get all variant get /v1/shops/{shopId}/products/{productId}
Test it Path parameters shopId string Example: laborum productId string Example: dolorem Responses
200
Product retrieved.
cURL
JavaScript
Python
HTTP
Copy
curl -L
--url 'https://api.sellauth.com/v1/shops/{shopId}/products/{productId}'
200
Copy
{
"id": 1,
"salt": "98fcb984b3e22",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z",
"name": "A Product",
"path": "a-product",
"description": "<p class="e-paragraph">Lorem ipsum odor amet, consectetuer adipiscing elit...</p>",
"price": "10.00",
"currency": "USD",
"deliverables": "Key 1\nKey 2\nKey 3",
"deliverables_type": "serials",
"stock": null,
"image_url": null,
"group_id": 1,
"shop_id": 1,
"type": "single",
"instructions": "<p class="e-paragraph"></p>",
"out_of_stock_message": null,
"sort_priority": 0,
"group_sort_priority": 0,
"visibility": "public",
"on_hold": 0,
"cloudflare_image_id": null,
"deleted_at": null,
"quantity_min": null,
"quantity_max": null,
"discord_guild_id": null,
"discord_role_id": null,
"block_vpn": 0,
"stock_count": 0,
"volume_discounts": [],
"payment_methods": [
"BTC"
],
"variants": [],
"images": [
{
"id": 1,
"cloudflare_image_id": "69xdd69x-420x-69r8-2ree-000r0e0e0e00",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z",
"deleted_at": null,
"shop_id": 1,
"pivot": {
"product_id": 1,
"image_id": 1
}
}
],
"custom_fields": [
{
"id": 1,
"shop_id": 1,
"name": "Your Name",
"hint": null,
"type": "text",
"options": null,
"is_required": true,
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z",
"pivot": {
"morphable_id": 1,
"custom_field_id": 1
}
}
]
}
Product retrieved.
make the site very very advanced and professional looking and automatically get all products and everything like name if IMG then yes then price and everything