Page MenuHomePhabricator

Recurring ACH looks like a success but then is actually failed
Closed, ResolvedPublic

Description

example cid=49417526
The donor above has a recurring Trustly ACH, the October 5th billing is in civi as successful but it actually ended up with a declined status and canceled_payment_method
https://wikimedia.gr4vy.app/merchants/default/transactions/062931bb-49ab-45c8-b870-71030f5a3735/overview

The response on the inital API call was "status": "capture_pending",

We got these three ipns in relation:
Oct 5 12:38:45
{"type":"event",
"name":"transaction.authorized",
"id":"50a3c7c6-5dc1-44c8-948e-3d964855e2b7",
"created_at":"2025-10-05T12:38:45.254488+00:00",
"target":{"type":"transaction",
"id":"062931bb-49ab-45c8-b870-71030f5a3735",
"external_identifier":"235107607.3",
"payment_service_transaction_id":"7987166078",
"status":"authorization_succeeded",
"has_gift_card_redemptions":false,
"pending_review":false,
"amount":1000,
"authorized_amount":1000,
"captured_amount":0,
"refunded_amount":0,
"currency":"USD",
"metadata":null,
"created_at":"2025-10-05T12:38:44.994360+00:00",
"updated_at":"2025-10-05T12:38:45.156250+00:00",
"payment_method":{"id":"2cf04ac7-f044-4574-8464-999496380c43",
"method":"trustly"},
"payment_link_id":null,
"error_code":null},
"merchant_account_id":"default",
"gr4vy_id":"wikimedia","environment":"production"} | |

Oct 5 12:38:46
{"type":"event",
"name":"transaction.capture-pending",
"id":"9ad3bdab-de8c-4d17-8145-5a6363dd83af",
"created_at":"2025-10-05T12:38:46.304036+00:00",
"target":{"type":"transaction",
"id":"062931bb-49ab-45c8-b870-71030f5a3735",
"external_identifier":"235107607.3",
"payment_service_transaction_id":"8006930416",
"status":"capture_pending",
"has_gift_card_redemptions":false,
"pending_review":false,
"amount":1000,
"currency":"USD",
"authorized_amount":1000,
"captured_amount":0,
"refunded_amount":0,
"metadata":null,
"created_at":"2025-10-05T12:38:44.994360+00:00",
"updated_at":"2025-10-05T12:38:46.274864+00:00",
"payment_method":{"id":"2cf04ac7-f044-4574-8464-999496380c43","method":"trustly"},
"payment_link_id":null,"error_code":null},
"merchant_account_id":"default",
"gr4vy_id":"wikimedia","environment":"production"} | |

Oct 5 12:38:48
{"type":"event","name":"transaction.declined",
"id":"dec4ef21-80ef-4351-9a69-8937e04b320e",
"created_at":"2025-10-05T12:38:48.078890+00:00",
"target":{"type":"transaction","id":"062931bb-49ab-45c8-b870-71030f5a3735",
"external_identifier":"235107607.3",
"payment_service_transaction_id":"8006930416",
"status":"authorization_declined",
"has_gift_card_redemptions":false,
"pending_review":false,
"amount":1000,"currency":"USD",
"authorized_amount":0,
"captured_amount":0,
"refunded_amount":0,
"metadata":null,"created_at":"2025-10-05T12:38:44.994360+00:00",
"updated_at":"2025-10-05T12:38:48.023847+00:00",
"payment_method":{"id":"2cf04ac7-f044-4574-8464-999496380c43",
"method":"trustly"},
"payment_link_id":null,"error_code":"canceled_payment_method"},
"merchant_account_id":"default",
"gr4vy_id":"wikimedia","environment":"production"}

Event Timeline

Cstone renamed this task from Check on ACH donations to Recurring ACH looks like a success but then is actually failed.Nov 8 2025, 3:31 AM
XenoRyet triaged this task as High priority.Dec 8 2025, 9:03 PM

Looks like this process is leaving behind contributions in Civi from the failed recurring charges.

I was able to identify 71 other similar contributions since the beginning of the year. Here's a Search kit I created for these contributions.

Slightly related but I was able to identify 111 one time declined contributions in Civi: Here's the Search Kit I created for these contributions.

All contributions have been deleted. Gravy said in the meeting yesterday that they would discuss with Trustly to understand why the error is delayed. Keeping this ticket open till underlying issue is resolved.

Change #1230372 had a related patch set uploaded (by Damilare Adedoyin; author: Damilare Adedoyin):

[wikimedia/fundraising/SmashPig@master] Specify the type of trustly transactions to send chargeback messages for.

https://gerrit.wikimedia.org/r/1230372

Change #1230372 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Specify the type of trustly transactions to send chargeback messages for.

https://gerrit.wikimedia.org/r/1230372

Found another 29 recent transactions that got declined but still in Civi. Here's the list for anyone interested to go through, I'd be deleting them on Monday.

Many thanks, @Damilare

@RLewis CID 69905442 from that list ^ is MG-sized, fyi

I'm reverting the two patches for the weekend as they are causing failmail of all the incomplete transactions (people who dropped off during the trustly flow, declines). We can redeploy on monday

@MBeat33 - thanks just to confirm, this donation should not be showing in Civi?

@RLewis yeah, this transaction stopped at Gravy at Declined: suspected_fraud, so we never received the funds.

XenoRyet set Final Story Points to 2.

This one is still out there, gravy has acknowledged the issue and is working on updating it

XenoRyet changed Final Story Points from 2 to 8.