Before you begin
You need:- A Lynq Dashboard account
- Card or Idram configured in Test mode
- A test secret key and test publishable key
- A backend route that your browser can call to start checkout
- A page element where Checkout can mount
Store your test keys
Add the secret key to server-only configuration. The publishable key may be exposed to the browser.Do not commit the environment file. Expose the publishable key using the browser-safe configuration mechanism provided by your framework.
.env
Create a Payment Intent on your server
Create one Payment Intent when the customer begins paying for an order. Build the amount and order ID from server-side order data instead of trusting values sent by the browser.Amounts use minor currency units. For AMD 25,000.00, send
server/create-lynq-payment.ts
2500000. Reuse the same idempotency key only when retrying this exact create request.Install the Checkout SDK
Request the checkout session
From the browser, call your own backend route. Keep the secret key behind that route; return only the Payment Intent ID and client secret.
client/start-checkout.ts
Mount Checkout
Add an empty container to the page, register event handlers, and then mount Checkout.Register handlers before
client/mount-checkout.ts
mount(). Destroy the instance when the page is removed and create a new instance for a new Payment Intent.Complete a test payment
Use the payment method you configured in Test mode. Confirm the browser shows a useful result and the payment appears under Dashboard → Payments.
Add authoritative fulfilment
Configure a test webhook endpoint, verify its signature, and update the order only after
payment_intent.succeeded. See Verify webhooks.The integration is complete when Checkout accepts a test payment and your verified webhook updates the matching order exactly once.