1. Adyen set up
The first thing you'll need to do is create a set of API credentials to use with Toggle.
1 - Log in to your Adyen account and head to Developers > API credentials.
2 - Select the credential for your integration, for example ws@Company.[YourCompanyAccount], like shown below.
3 - Click the option to Generate New API key, like shown below.
4 - Copy the generated API Key and click the "Save Generated API Key" button:
5 - Also take a copy of the Client Key:
6 - Under the Allowed origins section, add your Toggle shop domain as an allowed origin, like this:
7 - You're also going to need to know your Merchant account name, which you can find under Account > Merchant Accounts
8 - You also need to create a "web hook" in Adyen. To do this navigate to Account > Webhooks, like shown below.
9 - Click to create a new webhook.
10 - Choose the Standard Notification option and click Add.
11 - Complete the URL field and leave other settings as default. The URL you'll need to enter here is:
https://api.mytoggle.io/api/adyen/webhook
12 - Under the Authentication section, for the username and password, these are unused, so just enter 'none' for both, as shown below.
13 - Now under the Additional Settings section, select Generate new HMAC Key and copy down the key (you'll need this later).
14 - Make sure Authorisation is set to "on" under the Test Notifications section:
15 - To finish, click "Save Configuration" the webhook.
16 - Now enable the webhook.
17 - Under Developers > API URLs, grab the endpoint prefix for your account.
In this example below it is pal-test
but yours might look like 8497a37c9e821a82-MyAccount
or similar. Again, take a copy of this - you'll need it in a moment.
18 - Finally, we recommend that your Default 3D Secure rules are set to "Always" within your Adyen account. By default, your account may be set to "Prefer not". See here for more info or speak to your Adyen account manager about this setting.
2. Toggle set up
With a note of your API Key, Client Key, Merchant Account name and Webhook HMAC key, now head over to your Toggle dashboard.
Log in to Toggle
From the sidebar, click on Settings > Payment Settings
Click the blue button saying "Connect with Adyen"
A modal will pop up for you to enter your configuration details into the corresponding fields, like shown below.
Once you have entered the details, click the green Submit button.
If the details you submitted were correct you will see the "Connected with Adyen" button highlighted in green, like shown below.
You're all set!
Other things to note...
If you're currently using a sandbox test Adyen account, don't forget to change your details over in the same manner as above once you 'go live'.