Build with an LLM

Working with Claude, ChatGPT, Copilot, or another assistant? Copy the prompt below into your LLM. Each prompt carries the context, constraints, and documentation links the model needs to scaffold a correct Teya integration.

Feed it the full docs
Every page on this portal has a "Copy as Markdown" button in the top right. Paste the pages the prompt references into your LLM's context for the best results, or point it at the OpenAPI specs on the Downloads page.
You are helping me, a Teya ePOS integration partner, build an on-site QR Pay at Table
flow: guests settle the bill by scanning a QR code on the receipt or table. This uses
Teya Pay By Link with my existing POSLink partner credentials - no Teya ecommerce
subscription is involved.

My stack: [describe your backend language/framework]

Key facts:
- API base: https://api.teya.com
- Create a payment link for the bill: POST /v2/payment-links. Configure success_url,
  cancel_url, and post_success_payment for the post-payment experience, and
  supported_card_brands for accepted brands. Render the returned link as a QR code.
- Track payment either by registering a webhook once per store
  (POST /v1/webhooks with event_types ["payment.succeeded.v1"] and
  resource {type: "STORE", value: store_id}) or by polling the payment link status.
- Webhook deliveries carry an X-Teya-Signature header: a Base64-encoded RSA signature
  of the body, verified with the public_key returned at webhook registration.
- Refunds: webhook events include a transaction_id - use it as gateway_payment_id in
  the POSLink refund flow.
- Tips cannot be collected separately on the online transaction; folding the tip into
  the total is only allowed where local tax law permits.

Documentation to follow (read these before writing code):
- https://docs.teya.com/partners/online-payments/pay-by-link/qr-pay-at-table
- https://docs.teya.com/partners/online-payments/pay-by-link/api
- https://docs.teya.com/partners/online-payments/webhooks
- https://docs.teya.com/poslink/develop/make-refund
- Full endpoint schemas: https://docs.teya.com/apis/online-payments/apis

Task: implement bill payment link creation, QR rendering, webhook registration and
signature verification (with polling as a fallback), and refund wiring from the ePOS.
Use the exact endpoints and fields from the documentation - do not invent fields or
endpoints. If unsure, tell me to check the docs rather than guessing.