cURL
curl https://api.neuraldraft.io/v1/widgets/buy-button/32.js -o buy.js// No SDK call — embed the URL directly in your HTML.
# No SDK call — embed the URL directly in your HTML.
<div data-nd-buy-button="{{ $id }}"></div>
<script src="https://api.neuraldraft.io/v1/widgets/buy-button/{{ $id }}.js" defer></script>
"/* @neuraldraft buy-button widget v1 */\n(function(){ /* … */ })();\n"{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Commerce
Embeddable buy-button script
Single-button widget that opens Stripe Checkout via
/v1/checkout-sessions. Drop into any page:
<div data-nd-buy-button="32" data-variant-id="71"></div>
<script src="https://api.neuraldraft.io/v1/widgets/buy-button/32.js" defer></script>
GET
/
widgets
/
buy-button
/
{product_id}
.js
cURL
curl https://api.neuraldraft.io/v1/widgets/buy-button/32.js -o buy.js// No SDK call — embed the URL directly in your HTML.
# No SDK call — embed the URL directly in your HTML.
<div data-nd-buy-button="{{ $id }}"></div>
<script src="https://api.neuraldraft.io/v1/widgets/buy-button/{{ $id }}.js" defer></script>
"/* @neuraldraft buy-button widget v1 */\n(function(){ /* … */ })();\n"{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Path Parameters
Response
JavaScript bundle.
The response is of type string.