Using Borga with AI coding assistants
Machine-readable versions of these docs for Claude, Cursor, Copilot and friends, and how to keep them from guessing.
Large language models are good at wiring up payment APIs, and bad at knowing which of the fifty payment APIs they have seen your code resembles. Give yours the real documentation.
Feed it the docs
| Resource | Use it for |
|---|---|
/llms.txt | An index of every page with a one-line description. Assistants that follow llms.txt conventions discover the rest from here. |
/llms-full.txt | The entire site as one Markdown file. Paste it into context, or add the URL to your assistant's documentation sources. |
Any page with .md appended, for example /webhooks.md | Just that page, as Markdown. |
Both files are generated from the same source as these pages on every deploy, so they never lag behind the HTML.
Suggested prompt
Integrate Borga hosted checkout into this app using the
@borga/nodeSDK. Use the documentation at https://docs.borga.is/llms-full.txt as the only source of truth for endpoints and fields; do not assume Stripe behaviour. Fulfil orders from thepayment.succeededwebhook usingverifyWebhookSignature, and read the session id from thesessionquery parameter on the return URL.
Things assistants get wrong
These are the most common mistakes, in case you want to add them to your project's instructions file:
- The return URL receives
?session=ps_…, not a payment id. - Webhook
datais the object itself, notdata.object, and there is nolivemodefield. - Amounts in ISK are whole krónur.
1000is 1.000 kr., not 10 kr. - API keys identify the merchant. There is no merchant id header on API requests.
- Webhook endpoints and API keys are created in the dashboard, not through the API.
/v1/eventsingests usage events for metered billing; it does not list webhook events.- Embedded checkout opens a modal with
borga.checkout.open(). There is no<borga-checkout>element. - Bank invoices (krafa) are hosted-checkout only and need PayDay connected.