Adyen Pay By Link Integration Demo
This repository includes an example of Pay By Link with Adyen. Within this demo app, you can create links by specifying the amount. The shopper can then choose to accept the links and complete the payment.
This demo leverages Adyen's API Library for Node.js (GitHub | Docs).
Note: We've included a blog post that explains Pay By Link in detail.
- Adyen API Credentials
- Node.js 20+
git clone https://github.com/adyen-examples/adyen-node-online-payments.git
Create a ./.env
file with the environment variables.
export ADYEN_API_KEY=yourAdyenApiKey
export ADYEN_MERCHANT_ACCOUNT=yourAdyenMerchantAccount
export ADYEN_CLIENT_KEY=yourAdyenClientKey
export ADYEN_HMAC_KEY=yourHmacKey
cd paybylink-example
npm install
npm run dev
Visit http://localhost:8080/ to create a Payment Link.
Webhooks deliver asynchronous notifications about the payment status and other events that are important to receive and process. You can find more information about webhooks in this blog post.
In the Customer Area under the Developers → Webhooks
section, create a new Standard webhook
.
A good practice is to set up basic authentication, copy the generated HMAC Key and set it as an environment variable. The application will use this to verify the HMAC signatures.
Make sure the webhook is enabled, so it can receive notifications.
This demo provides a simple webhook implementation exposed at /api/webhooks/notifications
that shows you how to receive, validate and consume the webhook payload.
The following webhooks events
should be enabled:
- AUTHORISATION
To make sure that the Adyen platform can reach your application, we have written a Webhooks Testing Guide that explores several options on how you can easily achieve this (e.g. running on localhost or cloud).