Page MenuHomePhabricator

Missing contributions in civicrm due to Gravy - Dlocal Transaction status mismatch
Closed, ResolvedPublic

Description

A donor donated via boleto (from Brazil). The payment was successfully processed in dLocal, but Gravy shows the transaction as Declined (service_decline). As a result, Civi has not been updated with this donation.

Details:
Donor CID: 11370451
Zendesk Ticket: #1700299
Gravy Reference: b09c309b-d287-498b-9b03-40d862e244e5
dLocal Invoice ID: 5NG1ldt3CMPdmeTCT4tH53

Similar phabs: https://phabricator.wikimedia.org/T400202 and https://phabricator.wikimedia.org/T398887

Event Timeline

Change #1175939 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[wikimedia/fundraising/SmashPig@master] Update BuildGravyDonationFromLogs to use different date field

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

jgleeson added a subscriber: Damilare.

@SHust we're gonna try and manually import this one to bring the transaction into CiviCRM.

Dami chatted with Gravy on Slack about this one here, and it turns out there were 67 other transactions which suffered the same issue, which will not be in CiviCRM

Change #1175939 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Update BuildGravyDonationFromLogs to use different date field

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

Hi @SHust, I manually imported this transaction into CiviCRM here last night. It looks like the thank you email went out today.

After the import, I noticed the amount imported was BRL 20000 instead of BRL 200.00, which was due to a bug in the manual import process. I edited the amount myself in CiviCRM to fix this.

Regarding the other 66 affected transactions, we're gonna try and import these differently, and we'll make a separate task for that work. Lemme know if you need anything else!

Damilare renamed this task from Source of Truth Unclear: Boleto Donation Mismatch Between Gravy, dLocal, and Civi to Missing contributions in civicrm due to Gravy - Dlocal Transaction status mismatch.Aug 20 2025, 5:22 PM

Response from dlocal why we have failed then success later:

I noticed that this boleto was paid after a significant delay. Here’s what can happen in these situations:

When a boleto is paid late, our system may have already marked the transaction as "Declined" because the payment was not received within the expected timeframe. If the bank later confirms the payment (even if it’s late), dLocal manually updates the transaction status to "Paid" since the funds were actually received.

This is why you might see the transaction first marked as "Declined" and then updated to "Paid." While this isn’t the standard workflow, it can happen in cases of late payment or delays in bank confirmation.

And on Aug 21st, gravy update the message to remove error_code, this should be resolved!

Here's a search kit showing all the 67 missing contributions (shown in the attached file) were imported from the listener on the 21st of August, 2025.

No further updates required.

AKanji-WMF set Final Story Points to 8.