In this guide we'll setup Adyen payment gateway with Saleor Checkout.
Saleor Checkout uses Adyen's Pay by Link flow
-
In test Customer Area create new merchant account
-
Create new API credentials. Go to Developers > API credentials > Create new credential
Select "Web service user" and enter some description (for example "Saleor Checkout")
- Copy API key from newly generated API credentials:
Go to Checkout app configuration. It can be found in Saleor dashboard in: Apps > Third party apps > Checkout. Once you open the app, select one of the channels and click the gears icon:
To configure API key go to: Adyen > Private API key and paste what you've copied from Adyen.
- Click "Generate client key" and copy it to clipboard, paste it in Checkout app configuration > Adyen > Public client key
- Add allowed origin to your Client key, paste URL of your deployed Checkout SPA and click "Add"
-
Save changes you've made to API credential
-
Create standard notification webhook. Go to Developers > Webhooks > "+ Webhook" > "Standard notification"
Fill out the webhook details:
- Description - enter some description for your webhook (ex. Saleor Checkout notifications)
- Server configuration
- URL - URL of your deployed Checkout App +
/api/webhooks/adyen
- URL - URL of your deployed Checkout App +
<YOUR_CHECKOUT_APP_URL>/api/webhooks/adyen
- Other settings should be set to default:
- Method: JSON
- SSL version: TLSv1.2
- Service version - 1
- Merchant accounts - choose "Include only specific merchant accounts" and select the merchant account you'll use for checkout, the name must be provided in Checkout App configuration
- Events - leave events selected by default
- Security
- Basic authentication - arbitrary username and password, you can use
openssl rand -hex 64
to generate random password - HMAC Key - click "Generate" and copy the key
- Those 3 values:
username
,password
andHMAC Key
must be provided in Checkout App configuration
- Basic authentication - arbitrary username and password, you can use
This is how your webhook configuration should look like in Adyen:
This is how your Checkout App configuration should look like in Saleor dashboard:
-
Save settings in Adyen and in Checkout App configuration
-
Test webhook configuration in Adyen
Click "Test configuration" button after you've saved the configuration.
Select "AUTHORISATION" from the list and click "Test"
Adyen will make a call to your webhook. If everything is configured properly you'll see that the test was successful:
Note: It can take a while for your webhook configuration to propagate in Adyen after you save it. If the test failed, give it a few minutes before you try again
If the response failed because of invalid configuration in Adyen, Checkout App will return the reason in response:
- After you've tested your webhook, enable it, by clicking the toggle button
- 🥳 Congrats! You've finished configuration of Adyen payment gateway