Build with AI

Integrate TrezorPay with an AI coding agent. One prompt.md covers every endpoint, the callback signature, errors, idempotency and a ready-made test suite.

TrezorPay is small enough to integrate in one sitting, and an AI coding agent can do most of it for you. Give it the prompt below together with a description of your stack (framework, database, how you deploy), and it builds the client, the callback endpoint, the migrations and the tests.

Hand this to your AI agent

One prompt covering every endpoint, the callback signature, errors, idempotency and a test suite. Paste it into Claude, Cursor, Copilot or ChatGPT with your stack appended, and it scaffolds a working integration.

What the prompt covers

  • Creating payment addresses, QR codes and fiat conversions, with configuration instead of hardcoded wallets.
  • Receiving pending and confirmed callbacks in GET, form or JSON form.
  • Verifying the RSA-SHA256 x-ca-signature, including behind a reverse proxy.
  • Idempotency on uuid with a database unique constraint, partial payments and overpayments.
  • Every error message of the API and which ones to retry.
  • A 21-case test suite your agent writes alongside the code: signatures, flows, idempotency, money and client behaviour.

Tips

  • Append your stack to the prompt, for example: "Stack: Laravel 11, MySQL, deployed on Forge. Accept USDT on Tron and USDC on Base."
  • Ask the agent to run the test suite before it reports back, and to expose the callback URL with an HTTPS tunnel while developing: callbacks to localhost are refused.
  • The prompt is also served raw at /prompt.md, and the full documentation as text at /llms-full.txt, for agents that browse.

On this page