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.
| Card | Number | Exp | CVC |
|---|---|---|---|
| Visa, succeeds | 4509 2111 1111 1119 | 12/26 | 748 |
| Mastercard, succeeds | 5440 2127 1111 1110 | 12/26 | 665 |
| Mastercard, fails | 5471 2511 1111 1116 | 11/23 | 858 |
What the code does
payments.create()makes the payment and gets a pay URL.- Konnect calls
/api/konnect/webhook?payment_ref=…. There is no signature, so the handler fetches the payment from Konnect before believing anything. onPaidruns once per payment, even if the webhook is delivered twice.