The AfriKDP Publishing API.
Built by AfriStack, live today at afrikdp.com/api — upload books, run checkout, and pay authors, all from your own app.
One request to upload, list, and sell a book.
Every request is made with an API key from your AfriKDP dashboard — a secret key (sk_live_) for server-side writes, a public key (pk_live_) safe to use in the browser.
- Upload a book — stores the file and cover, generates the slug
- List or fetch books with the public key, straight from the browser
- Author sub-accounts — attribute sales and payouts to individual authors
- Push distribution to partner marketplaces
- Webhooks for
book.createdandsale.completed
curl https://api-afrikdp.onrender.com/v1/books \
-H "Authorization: Bearer sk_live_..." \
-F title="Ubuntu" \
-F price=2500 \
-F file=@ubuntu.pdf
// → { "book_id": "bk_8937", "status": "review" }
A ~14KB client SDK, no dependencies
Wraps the whole API plus a ready-made checkout modal — no fetch calls, no checkout page to build.
Client SDK (vanilla JS)
<script src="https://api-afrikdp.onrender.com/afrikdp-sdk.js">
Node.js & Python packages
Wrap the full REST API — client.uploadBook(), client.createAuthor(), and more.
Rate limits & errors
Every app starts at 100 requests/minute and 20,000/day. Errors return a JSON body with the matching HTTP status — 401 for a bad key, 403 for a missing scope, 429 once you're over your limit.
Books & Distribution — Live
Checkout & Payments — Live
Webhooks — Live