MozillaFoundation / donate-wagtail

[Legacy] - Wagtail based donation stack
Mozilla Public License 2.0
43 stars 22 forks source link

Create webhook for disputes to go directly from Braintree to Cinchy #1371

Closed benhohner closed 8 months ago

benhohner commented 3 years ago

We need to send dispute, chargeback, and refund information to Cinchy and Cinchy will ensure the donor records get updated in Salesforce Non Profit (SFNP). The donation team needs this info to determine if someone is still paying money or if they've had issues with us.

benhohner commented 3 years ago

Exchange with Braintree:

Message: 1. We currently issue (manually in Braintree) about 10-20 refunds a day (mostly, fraudulent small donations that were not caught and blocked by Kount.) We're looking for a way to have Braintree notify (via webhook? API? Something else?) our systems so that our database is updated automatically that the transaction was refunded. Can you recommend the best way to do this?

  1. Also, we're looking for a way to receive (and write to our database) the “converted transaction amount“ for each non-USD transaction, as soon as that value is known (daily? After a particular job is run every night?) Ideally, we'd like to have that pushed to us via webhook or something similar. Is this possible? Environment: Production Referrer: https://developers.braintreepayments.com/

Hi Will,

Thanks for reaching out, happy to be of help.

You can certainly set up a webhook to notify you when a refund has settled.

However we do not have a webhook which outlines the exchange rates at all.

To calculate the exchange rates on your account, Braintree references the Visa and MasterCard exchange rates daily to establish the best exchange rate possible. If you click on the links above, you will be taken to each card association's respective currency conversion calculator, allowing you to search for the exchange rate for any particular day. While we do not have any specific partner integrations that offer exchange rate calculation via API, a popular partner platform of ours is Taxamo, which provides EU VAT tax management services.

I hope I've helped point you in the right direction today, if I can be of any further assistance don't hesitate to reach back out.

Best,

Thanks for reaching back out, happy to clarify.

My apologies yes those webhooks are just for ACH transactions.

Instead we would recommend utilizing our Transaction Search or Transaction Find APIs to retrieve current statuses for your transactions. I understand that this may require additional resources in your server, however, we don't have a webhook notification event for tracking transaction settlement/status changes with cards unfortunately.

Here's a Transaction Search example in PHP for searching transactions that were settled within the last hour:

$now = new Datetime(); $past = clone $now; $past = $past->modify("-1 hour");

$collection = $gateway->transaction()->search([ Braintree\TransactionSearch::settledAt()->between($past, $now) ]);

I'd suggest checking our Transaction Search examples for more details.

Alternatively as a workaround you can also set up email receipts for customers and add your own email as a bcc. This would inform you of every settlement, be it sale or refund. However you may not wish to send emails out to customers.

Once again I apologise for not being clearer in my past response, but hopefully the above solutions will work for you.

If there's anything else I can assist with don't hesitate to reach back out.

Best,

benhohner commented 3 years ago

6 days ago Jackie Lu:

"We shared the email from Braintree with Shawn yesterday and he suspects that he can orchestrate Cinchy’s API connector with Braintree’s Transact API to pull the necessary updates on transactions that are noted as blocked here"

Waiting on Updates from Cinchy

jamilasnell commented 3 years ago

we are removing the points on this ticket but in REALITY it is a 4.

jamilasnell commented 3 years ago

This might be done