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.
<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. 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. Keep checkout in a normal page reached by a link. The embed is coming soon.