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.
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?
Which decline reasons will skip the shopper email?
Will the shopper see the technical decline code?
Can I swap Gmail for another email tool?
Does this work for subscriptions as well as one-off payments?
Related templates
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.