Recover declined Adyen payments with HubSpot tasks and dunning emails

By General Input

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.

Integrations

  • Adyen
  • HubSpot
  • Gmail

Type

Agentic Task

Categories

  • Finance
  • Sales

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.

Related prompts

Explore more prompts
Win back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationChase the paperwork every new client and vendor still owesLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRM