Recover declined Adyen payments with HubSpot tasks and dunning emails

When a card declines in Adyen, we log a HubSpot follow-up for the account owner and email the shopper a fresh payment link with a friendly note.

Agentic Task
AdyenHubSpotGmailFinanceSalesNotifications & AlertsEmail Automation
PromptCreate

When an Adyen AUTHORISATION webhook arrives with success=false, run a payment recovery playbook for that shopper. The webhook payload gives you shopperEmail, the amount object (currency and value in minor units), the refusal reason text, the merchantReference, and the pspReference. Treat these as the inputs to everything below.

First, classify the refusal reason into one of four customer-safe buckets so the rest of the workflow can decide what to do:

1) Insufficient funds: reasons like "Not enough balance", "Insufficient Funds", or "Withdrawal amount exceeded". 2) Expired card: reasons like "Expired Card". 3) Generic issuer decline: reasons like "Refused", "Declined", "Declined Non Generic", "Do Not Honor", "Issuer Unavailable", or CVC/AVS-style declines that aren't fraud. 4) Fraud or security: reasons like "FRAUD", "FRAUD-CANCELLED", "Blocked Card", "Stolen Card", "Lost Card", "Restricted Card", "Acquirer Fraud", "3D Secure Authentication Failed", "Transaction Not Permitted", or "Referral". When in doubt about a reason, treat it as generic issuer decline, not fraud.

Next, use the HubSpot Search Contacts operation to find a contact whose email matches shopperEmail. If a contact exists, use the HubSpot Create Task operation to create a task associated with that contact, assigned to the contact's account owner (the HubSpot owner on the contact record), with the subject "Card declined for {formatted amount} {currency}, follow up", due tomorrow at 9am local, priority HIGH. In the task body, include the refusal reason, the merchantReference, and the pspReference so the owner has full context. If no HubSpot contact matches, skip the task step entirely and continue.

If the refusal reason fell into the fraud or security bucket, stop here and do not email the shopper. We don't want to tip off bad actors that a card was blocked.

Otherwise, use the Adyen Create Payment Link operation to generate a fresh hosted payment link for the same amount and currency, referencing the original merchantReference (append a retry suffix like "-retry1" so it's distinguishable). Set a reasonable expiry (for example 7 days).

Finally, use the Gmail Send a Message operation to email shopperEmail a short, friendly dunning message in plain English. The email should: address the shopper by name if you have it from HubSpot; name the real reason in customer-safe language based on the bucket you classified ("your card didn't have enough funds", "your card looks like it's expired", or "your bank didn't approve the payment"); suggest trying a different card; include the fresh Adyen payment link as a prominent button or link; and sign off warmly with our company name. Never include the raw Adyen refusal code, the pspReference, or any internal reference in the shopper-facing email.

This workflow is distinct from the deal-stage payment link flow because it triggers on a FAILED payment event, not on a HubSpot deal moving stage. Do not create Adyen payments or capture funds here, only a payment link the shopper can complete themselves.

Additional information

What does this prompt do?
  • Listens for failed card payments in Adyen and kicks off a recovery playbook the moment a charge is declined
  • Finds the shopper in HubSpot and files a follow-up task on the account owner, due the next day, with the amount and reason baked in
  • Emails the shopper a friendly, plain-English message that names the real reason in customer-safe language and includes a fresh payment link to retry
  • Skips the customer email entirely when the decline looks fraud-related so bad actors don't get a heads-up
What do I need to use this?
  • An Adyen account that can send webhooks for card payment notifications
  • A HubSpot account where your customers and account owners already live
  • A Gmail address you're happy to send the recovery email from
How can I customize it?
  • Adjust which refusal reasons count as fraud so the shopper email is suppressed
  • Change the HubSpot task wording, priority, or due date to fit how your team works
  • Tweak the email tone, sign-off, or any brand language before it goes out

Frequently asked questions

What happens if the shopper isn't in HubSpot?
The workflow still generates the fresh payment link and emails the shopper. It just skips the HubSpot task, since there's no contact record to attach it to.
Which decline reasons will skip the shopper email?
Anything Adyen flags as fraud, stolen or blocked card, 3D Secure failure, or acquirer fraud gets no email so we don't tip off bad actors. Standard reasons like insufficient funds, expired card, or a generic issuer decline still trigger a friendly retry email.
Will the shopper see the technical decline code?
No. The email translates whatever Adyen sent into plain English like "your card didn't have enough funds" or "your card is expired" so it feels like a note from a person, not a payment log.
Can I swap Gmail for another email tool?
Yes. You can ask the workflow to send through a different email service in your account after it's created. The rest of the recovery logic stays the same.
Does this work for subscriptions as well as one-off payments?
Yes. Any Adyen AUTHORISATION notification with success=false will fire the recovery flow, whether it's a first charge, a retry, or a recurring billing attempt.

Turn declined payments into recovered revenue.

Every failed card is a chance to reach the customer while they're still paying attention. Let this workflow do the outreach for you.