---
title: Plain HTML and JavaScript
description: Add an ordinary buy link or build a book card with a public catalog request.
order: 30
published: 2026-10-02
updated: 2026-10-02
---
## Add a link

An anchor works on any HTML page. Replace the uppercase slugs with your published book's slugs, or use the `buy_url` from the [API](/developers/api).

```html
<a href="https://thebookmarket.com/checkout/YOUR-AUTHOR-SLUG/YOUR-BOOK-SLUG">Buy my ebook</a>
```

The reader opens Book Market checkout and can buy without creating an account first.

## Show the current book details

Use the complete [HTML and fetch example](/developers/quickstart#render-a-book-from-the-api). It renders title, description and price from the catalog and hides the button when `buy_url` is null.

The public API permits cross-origin GET requests without credentials. Put returned text in `textContent`, never `innerHTML`. Use `price.display` for the price label; a pay-what-you-want book does not have a fixed `amount_cents`.

## Before publishing

The author must create the account, connect Stripe, activate selling and publish the book. [Follow the quickstart](/developers/quickstart). Keep checkout in a normal page reached by a link. The embed is coming soon.
