Some Braintree questions.

I tried refunding 5€ from a 10€ transaction.

I have a sandbox testing environment and whenever I do a partial refund it completely voids the transaction on Braintree.

I’ve done this before it was settled completely. Might that be the issue? Or is it an issue because it’s in TEST MODE?

Also, after I do the refund, which it voids, I did a full payment so the invoice was payed for. But it still showed -10€ in outstanding balance. Looks like a math bug, it should be 0€ as everything was payed for, but the refund messed it up.

On a related note, what’s the point of the Test mode checkbox? The Braintree api keys are different for sandbox and production.

Does Invoice Ninja also show if a transaction is:

Partially Refunded

as I can see them in PaymentStatusSeeder.php

  • I think that explains it. Checking the code it looks like we try voiding with Braintree if we get a 91506 error code. From their docs it’s: Cannot refund a transaction unless it is settled. Transaction status must be settled to refund it.

  • I see the problem with the -10, we’ll make sure to include a fix with our next release.

  • I imagine the test checkbox is used to know which Braintree endpoint to use (production vs testing).

  • No, we don’t support payment webhooks with Braintree.

Also, you can check/fix the client’s balance by running:

php artisan ninja:check-data

And then to fix it:

php artisan ninja:check-data --fix=true


Thanks for the fast reply. For the refund issue:

Just for this reason I left some transactions and waited for them to Settle.
I then tried to refund 30€ from a 74.99€ transaction. But instead of refunding 30€ it refunded the whole 74.99€.
As I said this was a transaction that was already settled.

For the -10, that’d be great if a fix is incoming.
I noticed there’s already an update on git. Even though I installed through the ZIP file (with all the dependencies) can I just do a git pull, or do I need to copy the complete source code over?

What’s the status of the payment after it was refunded? It’s possible Braintree doesn’t support partial refunds.

You can patch your code by applying the change:

j12kld 04/03/2017 10:07:50 AM CDT Credit Submitted For Settlement Firstname Lasname Discover 601111******1117 74,99 € EUR

Based on this they support partial refunds:

I also tried making a partial refund in the Braintree Control panel and it worked just fine there.

Sorry, what’s the status of the refunded payment in Invoice Ninja.

I’ll do some more testing with partial refunds.


The status is Refunded.

Thanks for the info!

I think I’ve found the problem, I’ve checked in a fix which will be included with our next minor release.