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

ResourceUse it for
/llms.txtAn index of every page with a one-line description. Assistants that follow llms.txt conventions discover the rest from here.
/llms-full.txtThe 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.mdJust 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/node SDK. 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 the payment.succeeded webhook using verifyWebhookSignature, and read the session id from the session query 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 data is the object itself, not data.object, and there is no livemode field.
  • Amounts in ISK are whole krónur. 1000 is 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/events ingests 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.