Swallow
  • YOUR FIRST MODEL
    • Setting up your first project
    • Manual setup of a new product
    • Excel Model Upload
    • Create your team
    • Essential concepts
      • Syntax
      • Steps
      • Collections
      • Try Model
      • Spotlight
  • PROCESS
    • Team Management
    • Governance & Collaboration
  • BUILD
    • Building with AI
    • Step builder
      • Understanding step types
      • Ordering step blocks
      • Placeholder mode
      • Up/Downloading models
      • Sharing your model
      • Running tests
    • Inputs
    • Enriching Raw Data
      • Transform Data
      • Enrich via API
      • Data Set
      • Collection
      • Custom Code
    • Setting Up Decisions
      • Exclusions
      • Excesses
      • Endorsements
      • Refer
    • Making Calculations
      • Factors
      • Calculation
    • Outputs
  • TEST
    • Creating New Tests
    • Running Tests
    • Editing Tests
    • Reading & Interpreting Tests
    • Impact Testing
  • DATA
    • Working with real-time data
    • Data Views
    • Data Quotas
    • Troubleshooting
    • API Webhooks
    • Data Downloads
  • ADMIN & SETTINGS
    • Project Management
    • Account Management
  • INTEGRATIONS
    • Introduction
    • Payments
      • Stripe
      • GoCardless
      • Adyen
    • Alerting
      • Slack
      • Zapier
    • Data
      • AWS S3
      • Google Sheets
    • Admin
      • Socotra
      • Guidewire
      • Hubspot
      • Salesforce
  • Developer API
    • Introduction
    • Authentication
    • Errors codes
    • Endpoints
      • /quotes
      • /projects
      • /tests
      • /process
Powered by GitBook
On this page
  • Connecting Swallow to Adyen
  • Adyen Connection Fields
  • Setting up Adyen's payments auto-capture
  • Turn on Adyen's recurring details
  • Setting up Adyen Webhook for listening to important events
  • Setting Adyen as a Payment Provider for a customer
  • Redirect url after quote completion
  • Adyen Checkout: storing customer's payment method information
  • Regenerate quote link on demand
  • Creating payments from Swallow Quotes
  • Creating refunds from Swallow Credit Notes
  • Payment disputes
  1. INTEGRATIONS
  2. Payments

Adyen

Swallow's native integration with Adyen allows you to collect payments automatically when new quotes are generated

PreviousGoCardlessNextAlerting

Last updated 4 months ago

Swallow's integration with Adyen offers a wide range of payment options, enabling you to conveniently collect payments from your customers.

Supported payment methods include:

  • Card payments (Visa, MasterCard, CB)

  • Apple Pay

  • Paypal

  • American Express

  • Amazon Pay

  • Google Pay

And many more! With Swallow's native Adyen integration, you can offer your customers a variety of payment options, enhancing their convenience and flexibility during transactions.

Please ensure that you have added payment methods to your Adyen account before setting up the integration ([see Adyen documentation](https://docs.adyen.com/payment-methods/add-payment-methods/)).

Connecting Swallow to Adyen

To set up the Adyen integration in Swallow from our user interface, follow these steps:

  1. Navigate to the settings section in Swallow

  2. Select the "Integrations" page

  3. Click "Connect to Adyen" to create a connection

  4. Give a name to this connection

  5. Assign a code for identification

  6. Enter the required connection fields (described in the next section); and

  7. Click Connect to Adyen to confirm the integration.

Adyen Connection Fields

When connecting Swallow to Adyen, you need to provide information for the following fields.

1. API Key (mandatory)

The API Key is a mandatory field and can be found in your Adyen account. Follow these steps to retrieve the API Key:

- Go to your Adyen account and navigate to **Developers** > **API Credentials**;
- On the API Credentials page, create new credentials with a type of **Web service user**;
- Click on the **Create credentials** button to generate the API Key; and
- Copy the API Key and paste it in the corresponding field in Swallow. Remember to save the changes.
2. Merchant Account (mandatory)

The Merchant Account is required to ensure that Swallow targets the correct Adyen account. To find the Merchant Account:

- Go to **Settings** > **Merchant accounts** in your Adyen account; and
- Copy the **Account code** of the targeted account you want to use with Swallow.
3. Live Prefix (optional)

The Live Prefix represents the prefix url of your live Adyen account. This field is optional. If left empty, you can connect a test account. However, for live accounts, you must provide a Live Prefix. Follow these steps to obtain the Live Prefix:

- Go to **Developers** > **API URLs** > **Prefix** in your Adyen account.
4. HMAC Signature (optional)

Adyen's HMAC signatures are used to protect webhook endpoints and messages created by Adyen. Swallow requires this signature to properly decrypt outgoing webhooks from Adyen. To find the HMAC Signature:

- Create or edit a webhook in Adyen by accessing **Developers** > **Webhooks**;
- Choose a webhook, e.g. Standard webhook; and
- Under "Security" settings, you can find the HMAC Key.

<Tip>
The Live Prefix and HMAC Signature fields are optional and may not be required depending on your use case.
</Tip>

Setting up Adyen's payments auto-capture

Turn on Adyen's recurring details

In Adyen, to enable recurring payments for a stored payment method, follow these steps:

  1. Go to Developers > Additional Data;

  2. Check the box for Recurring Details; and

  3. Click Save.

Setting up Adyen Webhook for listening to important events

This step is crucial and mandatory for Swallow to receive and process messages from Adyen, enabling functionalities such as customer creation/update, payment processing, and refunds. To configure Adyen webhook and establish communication with Swallow, follow the steps below:

  1. Access your Adyen application and navigate to the Developers section;

  2. Select Webhooks and create a new webhook of type Standard;

  3. In the Server configuration section, locate the General settings; and

  4. Copy and paste the following URL: https://api.llow.io/sw/webhooks/adyen/{{your_company_reference}}?code={{connection_code}}.

You can find your Company Reference in Swallow under the Developers section in Swallow, specifically in **API keys & ID** > **Company Reference**. To find your **connection code**, navigate to the Integrations section in Swallow and select the appropriate connection code for your Adyen integration.

Please ensure that you complete this setup correctly, as your Adyen integration will not function without this vital step.

Setting Adyen as a Payment Provider for a customer

In order to facilitate automated payment collection, it is essential for the customer to exist in both the Swallow and Adyen databases. Please note that in Adyen, customers are referred to as Shoppers.

Adding a new customer in Adyen

  1. Set Adyen as the customer's default payment provider;

  2. Select the Adyen connected account;

  3. Keep the field associated with the Adyen Payment Provider Customer ID empty; and

  4. Enable the option to automatically create the customer in Adyen.

Once the customer is added in Swallow, they will be automatically synchronized with Adyen. Adyen will generate a unique Shopper ID, which will be stored in Swallow. Typically, Adyen utilizes the Swallow customer's external_id as the Shopper ID for seamless integration between the two platforms.

  1. customer.checkout_url_generated: This message includes the quote URL that provides access to the default payment method. It allows you to perform a pre-authorization payment and store the payment method securely; and

  2. customer.payment_provider_created: This message confirms the successful creation of the customer in Adyen, indicating that the customer's details have been added to the Adyen database.

You may need to enable Developers -> Additional Data -> Payment -> Recurring details for the customer to be automatically created. Please note that the customer will be created in Adyen only if the payment method has been stored through the quote URL and pre-authorization payment.

Using an existing customer from Adyen

  1. Set Adyen as the default payment provider for the customer in Swallow;

  2. Select the Adyen connected account;

  3. Disable the option to automatically create the customer in Adyen.

By following these steps, you can integrate an existing customer from Adyen into Swallow, ensuring synchronization and consistency between the two platforms.

Redirect url after quote completion

After establishing the connection with Adyen, set a "next button URL" where your end customer will be directed after completing the quote. Please note that if it's not defined, your end customer will be redirected to Adyen's website.

Please note that you can edit or delete the redirect URL, and this will only affect new quote URLs created.

URL defined should always begin with `http://` or `https://`.

Adyen Checkout: storing customer's payment method information

When Swallow automatically creates a customer in Adyen, you will receive a quote link from Swallow to facilitate the storage of your customer's payment method information.

The payload sent by Swallow will have the following structure, with the quote link stored under checkout_url:

{
  "webhook_type": "customer.checkout_url_generated",
  "object_type": "payment_provider_customer_checkout_url",
  "payment_provider_customer_checkout_url": {
    "swallow_customer_id": "88d23508-47fd-46bb-a87e-50c50f3cb371",
    "external_customer_id": "hooli_1234",
    "payment_provider": "adyen",
    "payment_provider_code": "adyen_test",
    "checkout_url": "https://test.adyen.link/PLEEA656869B11DF6B"
  }
}

Note: The quote link automatically expires after 69 days.

By utilizing this provided quote link, your customers can perform a pre-authorization payment. It's important to note that the pre-authorization payment will not collect any funds from the customer. Once the pre-authorization is confirmed, Swallow will send the payment method details and securely store them into Adyen for future transactions.

Regenerate quote link on demand

POST /sw/customers/:customer_reference/checkout_url

Upon successful generation, the new quote link will be available in the endpoint response, and it will not be delivered through a webhook message. It is important to note that the new link will inherit the same expiration setting as the original one.

It is crucial to be aware that if a customer is not associated with any payment provider, the response will contain an error message.

Creating payments from Swallow Quotes

When a customer has Adyen defined as their payment provider, Swallow seamlessly automates the process of triggering payments in Adyen whenever a new quote is generated.

This integration ensures that payments are initiated in Adyen without any manual intervention. Swallow's automatic payment creation saves time and effort, providing a streamlined experience for both you and your customers.

Creating refunds from Swallow Credit Notes

In cases where a customer has Adyen defined as their payment provider, Swallow simplifies the refund process by automatically triggering refunds in Adyen whenever a new refund is initiated through credit notes.

This integration eliminates the need for manual refund processing and ensures that refunds are efficiently handled in Adyen. Swallow's automated refund functionality helps you maintain accurate and timely refund transactions, enhancing customer satisfaction and operational efficiency.

Payment disputes

In the event of a lost chargeback (dispute) within Adyen, Swallow initiates an automatic response by marking the relevant quote as disputed lost. This action involves populating the dispute_lost_at field with the timestamp when the dispute was lost. Following this update:

  • The quote becomes non-voidable;

  • Generating a credit note is possible; however, refunding the payment back to the original payment method is not permitted; and

  • The quote cannot be resent for collection.

To enable automatic payment capture in your Adyen account, ensure that you have configured the account settings accordingly. Automatic payment capture allows for immediate processing without manual intervention. Refer to Adyen's documentation for instructions on .

If the customer does not already exist in Adyen, you can create them in Swallow using either the user interface or the . When providing customer information, please ensure the following:

Upon successful customer creation, you will receive two to keep you informed:

If the customer and direct debit mandate already exist in Adyen, you can create the customer record in Swallow using either the user interface or . Follow these steps when adding customer information:

Provide the Adyen as the Swallow Payment provider customer ID.

In cases where your end customer has not had the opportunity to complete the quote process to inform their payment method or wishes to modify the saved payment information, you can generate a new quote link using the designated .

setting up auto capture
API
webhook messages
the API
Shopper Reference
endpoint