diff --git a/README.md b/README.md index 687f11c..edf533f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ Get started by navigating to one of the supported demos below. ## [Checkout Example](checkout-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example) + [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) The [checkout example](checkout-example) repository includes examples of PCI-compliant UI integrations for online payments with Adyen. @@ -31,7 +32,7 @@ Check out the underlying code to see how you can integrate Adyen to give your sh ## [Advanced Checkout Example](checkout-example-advanced) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) The [advanced checkout example](checkout-example-advanced) performs the same functionality as the [checkout example](checkout-example) but using the 3 stages of the Checkout API (Initiate, Submit, and Details) instead of the single `/sessions` endpoint. See the [advanced integration flow](https://docs.adyen.com/online-payments/web-drop-in/additional-use-cases?tab=sessions_flow_advanced_flow_1) for more information. @@ -41,14 +42,14 @@ See the [advanced integration flow](https://docs.adyen.com/online-payments/web-d ## [3DS2 Example](3ds2-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/3ds2-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/3ds2-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/3ds2-example) The [3ds2 example](3ds2-example) shows developers how to integrate the Native and Redirect flows of 3DS2. See the [3D Secure 2 Authentication](https://docs.adyen.com/online-payments/3d-secure/) for more information. ## [Authorisation Adjustment Example](authorisation-adjustment-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) @@ -57,7 +58,7 @@ The [`authorisation adjustment example`](authorisation-adjustment-example) repos ![Authorisation Adjustment Card Demo](authorisation-adjustment-example/public/images/cardauthorisationadjustment.gif) ## [In-person Payments Example](in-person-payments-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) @@ -67,7 +68,8 @@ The [in-person payments example](in-person-payments-example) features an in-pers ## [Gift Card Example](giftcard-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/giftcard-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/giftcard-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/giftcard-example) + [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) The [gift card example](giftcard-example) repository includes a gift card flow during checkout. Within this demo app, you'll find a simplified version of an e-commerce website. The shopper can choose to use gift cards to complete their purchase or use their preferred payment method to pay the remaining amount. @@ -76,7 +78,8 @@ The [gift card example](giftcard-example) repository includes a gift card flow d ## [Pay by Link Example](paybylink-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/paybylink-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/paybylink-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/paybylink-example) + [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) @@ -86,7 +89,8 @@ The [`pay by link example`](paybylink-example) repository includes a Pay by Link ## [Subscription Example](subscription-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/subscription-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/subscription-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments) + [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) The [subscription example](subscription-example) repository includes a tokenization example for subscriptions. Within this demo app, you'll find a simplified version of a website that offers a music subscription service. @@ -97,7 +101,8 @@ The panel allows admins to make payments on behalf of the shopper using this tok ## [Giving Example](giving-example) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-java-spring-online-payments/tree/main/giving-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-java-spring-online-payments/tree/main/giving-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-java-spring-online-payments/tree/main/giving-example) + [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) The [giving example](giving-example) repository includes a sample designed to demonstrate the Adyen Giving donations workflow. diff --git a/authorisation-adjustment-example/README.md b/authorisation-adjustment-example/README.md index 0680235..ea8fac7 100644 --- a/authorisation-adjustment-example/README.md +++ b/authorisation-adjustment-example/README.md @@ -5,7 +5,8 @@ ## Run demo in one-click -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/authorisation-adjustment-example) +  [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) ## Description @@ -109,3 +110,5 @@ The following webhooks `events` should be enabled: To make sure that the Adyen platform can reach your application, we have written a [Webhooks Testing Guide](https://github.com/adyen-examples/.github/blob/main/pages/webhooks-testing.md) that explores several options on how you can easily achieve this (e.g. running on localhost or cloud). + + diff --git a/checkout-example-advanced/README.md b/checkout-example-advanced/README.md index 950b37c..fb39a94 100644 --- a/checkout-example-advanced/README.md +++ b/checkout-example-advanced/README.md @@ -5,7 +5,8 @@ ## Run demo in one-click -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example-advanced) +  [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) # Description diff --git a/checkout-example/README.md b/checkout-example/README.md index a190d27..356cb4e 100644 --- a/checkout-example/README.md +++ b/checkout-example/README.md @@ -5,7 +5,8 @@ ## Run demo in one-click -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/checkout-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments) +  [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) # Description diff --git a/giftcard-example/README.md b/giftcard-example/README.md index c95546c..28c8315 100644 --- a/giftcard-example/README.md +++ b/giftcard-example/README.md @@ -51,6 +51,46 @@ This demo provides a simple webhook integration at `/api/webhooks/notifications` > You can find more information about webhooks in [this detailed blog post](https://www.adyen.com/blog/Integrating-webhooks-notifications-with-Adyen-Checkout). +## Run integration on [Codeanywhere](https://codeanywhere.com/) +1. Open your [Adyen Test Account](https://ca-test.adyen.com/ca/ca/overview/default.shtml) and create a set of [API keys](https://docs.adyen.com/user-management/how-to-get-the-api-key). + - [`ADYEN_API_KEY`](https://docs.adyen.com/user-management/how-to-get-the-api-key) + - [`ADYEN_CLIENT_KEY`](https://docs.adyen.com/user-management/client-side-authentication) + - [`ADYEN_MERCHANT_ACCOUNT`](https://docs.adyen.com/account/account-structure) + + +2. Go to [Codeanywhere Environmental Variables](https://app.codeanywhere.com/environment-variables) and set the following variables: [`ADYEN_API_KEY`](https://docs.adyen.com/user-management/how-to-get-the-api-key), [`ADYEN_CLIENT_KEY`](https://docs.adyen.com/user-management/client-side-authentication) and [`ADYEN_MERCHANT_ACCOUNT`](https://docs.adyen.com/account/account-structure) with a scope of `*/*`. + + +3. To allow the Adyen Drop-In and Components to load, add `https://*.codeanywhere.com` as allowed origin by going to your `ADYEN_MERCHANT_ACCOUNT` in the Customer Area: `Developers` → `API credentials` → Find your `ws_user` → `Client settings` → `Add Allowed origins`. +> **Warning** You should only allow wild card (*) domains in the **test** environment. In a **live** environment, you should specify the exact URL of the application. + +This demo provides a simple webhook integration at `/api/webhooks/notifications`. For it to work, you need to provide a way for Adyen's servers to reach your running application on Codeanywhere and add a standard webhook in the Customer Area. + + +4. To receive notifications asynchronously, add a webhook: + - In the Customer Area go to `Developers` → `Webhooks` and add a new `Standard notification webhook` + - Define username and password (Basic Authentication) to [protect your endpoint](https://docs.adyen.com/development-resources/webhooks/best-practices#security) - Basic authentication only guarantees that the notification was sent by Adyen, not that it wasn't modified during transmission + - Generate the [HMAC Key](https://docs.adyen.com/development-resources/webhooks/verify-hmac-signatures) and set the `ADYEN_HMAC_KEY` in your [Codeanywhere Environment Variables](https://app.codeanywhere.com/environment-variables) - This key is used to [verify](https://docs.adyen.com/development-resources/webhooks/best-practices#security) whether the HMAC signature that is included in the notification, was sent by Adyen and not modified during transmission + - For the URL, enter `https://codeanywhere.com` for now - We will need to update this webhook URL in step 7 + - Make sure the webhook is **Enabled** to send notifications + +5. In the Customer Area, go to `Developers` → `Additional Settings` → Under `Acquirer` enable `Payment Account Reference` to receive the Payment Account Reference. + + +6. Click the button below to launch the application in Codeanywhere. + +[![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/giftcard-example) + +7. Update your webhook in the Customer Area with the public url that is generated by Codeanywhere + - In the Customer Area, go to `Developers` → `Webhooks` → Select your `Webhook` that is created in step 4 → `Server Configuration` + - Update the URL of your application/endpoint (e.g. `https://8080-myorg-myrepo-y8ad7pso0w5.ws-eu75.codeanywhere.com/api/webhooks/notifications/`) + - Hit `Apply` → `Save changes` and Codeanywhere should be able to receive notifications + +> **Note** When exiting Codeanywhere a new URL is generated, make sure to **update the Webhook URL** in the Customer Area as described in the final step. +> You can find more information about webhooks in [this detailed blog post](https://www.adyen.com/blog/Integrating-webhooks-notifications-with-Adyen-Checkout). + + + ## Run integration on localhost using a proxy You will need Node.js 20+ to run this application locally. diff --git a/giving-example/README.md b/giving-example/README.md index abce28d..ebdef1b 100644 --- a/giving-example/README.md +++ b/giving-example/README.md @@ -14,6 +14,15 @@ _NOTE: To allow the Adyen Drop-In and Components to load, you have to add `https://*.gitpod.io` as allowed origin for your chosen set of [API Credentials](https://ca-test.adyen.com/ca/ca/config/api_credentials_new.shtml)_ +## Run this integration in seconds using [Codeanywhere](https://codeanywhere.com/) + +* Open your [Adyen Test Account](https://ca-test.adyen.com/ca/ca/overview/default.shtml) and create a set of [API keys](https://docs.adyen.com/user-management/how-to-get-the-api-key). +* Go to [codeanywhere account variables](https://https://app.codeanywhere.com/environment-variables). +* Set the `ADYEN_API_KEY`, `ADYEN_CLIENT_KEY`, `ADYEN_HMAC_KEY` and `ADYEN_MERCHANT_ACCOUNT variables`. +* Click the button below! + +[![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/giving-example) + ## Details This is a sample designed to demonstrate the Adyen Giving donations workflow. @@ -89,7 +98,8 @@ Your endpoint that will consume the incoming webhook must be publicly accessible There are typically 3 options: * deploy on your own cloud provider -* deploy on Gitpod +* deploy on Gitpod +* deploy on Codeanywhere * expose your localhost with tunneling software (i.e. ngrok) #### Option 1: cloud deployment @@ -107,7 +117,15 @@ If you use Gitpod the webhook URL will be the host assigned by Gitpod ``` **Note:** when starting a new Gitpod workspace the host changes, make sure to **update the Webhook URL** in the Customer Area -#### Option 3: localhost via tunneling software +#### Option :3 Codeanywhere +If you use Codeanywhere the webhook URL will be the host assigned by Codeanywhere +``` + https://myorg-myrepo-y8ad7pso0w5.ws-eu75.codeanywhere.com/api/webhooks/notifications + https://myorg-myrepo-y8ad7pso0w5.ws-eu75.codeanywhere.com/api/webhooks/giving +``` +**Note:** when starting a new Codeanywhere workspace the host changes, make sure to **update the Webhook URL** in the Customer Area + +#### Option 4: localhost via tunneling software If you use a tunneling service like [ngrok](ngrok) the webhook URL will be the generated URL (ie `https://c991-80-113-16-28.ngrok.io`) ```bash diff --git a/in-person-payments-example/README.md b/in-person-payments-example/README.md index 8b9e25a..1c2435c 100644 --- a/in-person-payments-example/README.md +++ b/in-person-payments-example/README.md @@ -4,9 +4,11 @@ ## Run demo in one-click -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/in-person-payments-example) +  [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) + ## Description This demo shows developers how to use the Adyen [Cloud Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) `/terminal-api/sync` to make requests to your connected terminal. diff --git a/paybylink-example/README.md b/paybylink-example/README.md index 60adc74..01687e4 100644 --- a/paybylink-example/README.md +++ b/paybylink-example/README.md @@ -2,7 +2,8 @@ ## Run demo in one-click -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/dyen-node-online-payments/tree/main/paybylink-example) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/dyen-node-online-payments/tree/main/paybylink-example) [![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/dyen-node-online-payments/tree/main/paybylink-example) +  [First time with Gitpod?](https://github.com/adyen-examples/.github/blob/main/pages/gitpod-get-started.md) # Description diff --git a/subscription-example/README.md b/subscription-example/README.md index f1d207c..d952f3d 100644 --- a/subscription-example/README.md +++ b/subscription-example/README.md @@ -65,6 +65,48 @@ This demo provides a simple webhook integration at `/api/webhooks/notifications` > **Note** When exiting Gitpod a new URL is generated, make sure to **update the Webhook URL** in the Customer Area as described in the final step. > You can find more information about webhooks in [this detailed blog post](https://www.adyen.com/blog/Integrating-webhooks-notifications-with-Adyen-Checkout). +## Run integration on [Codeanywhere](https://codeanywhere.com/) +1. Open your [Adyen Test Account](https://ca-test.adyen.com/ca/ca/overview/default.shtml) and create a set of [API keys](https://docs.adyen.com/user-management/how-to-get-the-api-key). + - [`ADYEN_API_KEY`](https://docs.adyen.com/user-management/how-to-get-the-api-key) + - [`ADYEN_CLIENT_KEY`](https://docs.adyen.com/user-management/client-side-authentication) + - [`ADYEN_MERCHANT_ACCOUNT`](https://docs.adyen.com/account/account-structure) + + +2. Go to [Codeanywhere Environmental Variables](https://app.codeanywhere.com/environment-variables) and set the following variables: [`ADYEN_API_KEY`](https://docs.adyen.com/user-management/how-to-get-the-api-key), [`ADYEN_CLIENT_KEY`](https://docs.adyen.com/user-management/client-side-authentication) and [`ADYEN_MERCHANT_ACCOUNT`](https://docs.adyen.com/account/account-structure) with a scope of `*/*` + + +3. To allow the Adyen Drop-In and Components to load, add `https://*.codeanywhere.com` as allowed origin by going to your `ADYEN_MERCHANT_ACCOUNT` in the Customer Area: `Developers` → `API credentials` → Find your `ws_user` → `Client settings` → `Add Allowed origins`. +> **Warning** You should only allow wild card (*) domains in the **test** environment. In a **live** environment, you should specify the exact URL of the application. + +This demo provides a simple webhook integration at `/api/webhooks/notifications`. For it to work, you need to provide a way for Adyen's servers to reach your running application on Codeanywhere and add a standard webhook in the Customer Area. + + +4. To receive notifications asynchronously, add a webhook: + - In the Customer Area go to `Developers` → `Webhooks` and add a new `Standard notification webhook` + - Define username and password (Basic Authentication) to [protect your endpoint](https://docs.adyen.com/development-resources/webhooks/best-practices#security) - Basic authentication only guarantees that the notification was sent by Adyen, not that it wasn't modified during transmission + - Generate the [HMAC Key](https://docs.adyen.com/development-resources/webhooks/verify-hmac-signatures) and set the `ADYEN_HMAC_KEY` in your [Codeanywhere Environment Variables](https://app.codeanywhere.com/environment-variables) with a scope of `*/*` - This key is used to [verify](https://docs.adyen.com/development-resources/webhooks/best-practices#security) whether the HMAC signature that is included in the notification, was sent by Adyen and not modified during transmission + - For the URL, enter `https://codeanywhere.io` for now, we will need to update this webhook URL in step 7 + - Make sure that the `Recurring contract` setting is **enabled** on `Merchant` account-level - In the `Customer Area`, under `Developers` -> `Webhooks` -> `Settings` -> Enable `Recurring contract` on `Merchant`-level and hit "Save". + - Make sure that your webhook sends the `RECURRING_CONTRACT` event when you've created the webhook + - Make sure the webhook is **enabled** to send notifications + + +5. In the Customer Area, go to `Developers` → `Additional Settings` → Under `Payment` enable `Recurring Details` for subscriptions. + + +6. Click the button below to launch the application in Codeanywhere. + +[![Open in Codeanywhere](https://codeanywhere.com/img/open-in-codeanywhere-btn.svg)](https://app.codeanywhere.com/#https://github.com/adyen-examples/adyen-node-online-payments/tree/main/subscription-example) + + +7. Update your webhook in the Customer Area with the public url that is generated by Codeanywhere + - In the Customer Area, go to `Developers` → `Webhooks` → Select your `Webhook` that is created in step 4 → `Server Configuration` + - Update the URL of your application/endpoint (e.g. `https://8080-myorg-myrepo-y8ad7pso0w5.ws-eu75.codeanywhere.com/api/webhooks/notifications/` + - Hit `Apply` → `Save changes` and Codeanywhere should be able to receive notifications + +> **Note** When exiting Codeanywhere a new URL is generated, make sure to **update the Webhook URL** in the Customer Area as described in the final step. +> You can find more information about webhooks in [this detailed blog post](https://www.adyen.com/blog/Integrating-webhooks-notifications-with-Adyen-Checkout). + ## Run integration on localhost using a proxy You will need Node.js 20+ to run this application locally. @@ -145,7 +187,7 @@ npm run dev 10. Update your webhook in your Customer Area with the public url that is generated. - In the Customer Area go to `Developers` → `Webhooks` → Select your `Webhook` that is created in step 6 → `Server Configuration` - Update the URL of your application/endpoint (e.g. `https://c991-80-113-16-28.ngrok.io/api/webhooks/notifications/`) - - Hit `Apply` → `Save changes` and Gitpod should be able to receive notifications + - Hit `Apply` → `Save changes` and Gitpod or Codeanywhere should be able to receive notifications > **Note** When exiting ngrok or Visual Studio a new URL is generated, make sure to **update the Webhook URL** in the Customer Area as described in the final step. > You can find more information about webhooks in [this detailed blog post](https://www.adyen.com/blog/Integrating-webhooks-notifications-with-Adyen-Checkout).