tnpay demoSource on GitHub

A Konnect checkout, done safely

This shop uses @tnpay/konnect. Pay for the cookie, and watch the order flip to paid when Konnect's webhook arrives and is verified.

Chocolate chip cookie

Baked this morning. One per order.

5.000 DT

Sandbox test cards

Nothing real is charged. On Konnect's page, pay by card with one of these.

CardNumberExpCVC
Visa, succeeds4509 2111 1111 111912/26748
Mastercard, succeeds5440 2127 1111 111012/26665
Mastercard, fails5471 2511 1111 111611/23858

What the code does

  1. payments.create() makes the payment and gets a pay URL.
  2. Konnect calls /api/konnect/webhook?payment_ref=…. There is no signature, so the handler fetches the payment from Konnect before believing anything.
  3. onPaid runs once per payment, even if the webhook is delivered twice.