Skip to content

Latest commit

 

History

History

paybylink-example

Adyen Pay By Link Integration Demo

Java CI with Gradle

If you want to know more about Pay by link, check out our related blog post or the documentation.

Run this integration in seconds using Gitpod

Open in Gitpod

Details

This repository demonstrates a very minimal application allowing you to create payment links, and monitor their status. Bear in mind that the list of payment links is only stored in memory and will be lost once the application is stopped.

The Demo leverages Adyen's API Library for Java (GitHub | Docs).

Pay By Link Demo

Requirements

  • Java 17
  • Node 17 (to build the frontend. See build.gradle for details)
  • Network access to maven central

Installation

  1. Clone this repo:
git clone https://github.com/adyen-examples/adyen-java-spring-online-payments.git

Usage

  1. Set environment variables for the required configuration

Remember to include http://localhost:8080 in the list of Allowed Origins

export ADYEN_API_KEY=yourAdyenApiKey
export ADYEN_MERCHANT_ACCOUNT=yourAdyenMerchantAccount
export ADYEN_HMAC_KEY=yourHmacKey

On Windows CMD you can use below commands instead

set ADYEN_API_KEY=yourAdyenApiKey
set ADYEN_MERCHANT_ACCOUNT=yourAdyenMerchantAccount
set ADYEN_HMAC_KEY=yourHmacKey
  1. Start the server:
./gradlew bootRun
  1. Visit http://localhost:8080/ to select an integration type.

To try out integrations with test card numbers and payment method details to complete payment on generated links, see Test card numbers.

License

MIT license. For more information, see the LICENSE file in the root directory.