Whenever, I create a transaction via Braintree API, or via their sandbox, it goes through many statuses like Authorized, Submitted for Settlement, Settled ... and all this takes 24 hours approximately. I want to ask is there a way by which I can create a transaction in sandbox/api and it is settled or disputed instantly. I don't know why it takes so much time ... e.g. in online shopping my credit card is charged immediately. How can same be achieved via braintree payments sandbox ?
I work at Braintree. It looks like we already responded to your support email, but I'll post this here for others who have the same problem.
Each client library has a method to instantly settle a transaction in Sandbox. For PHP, it's in the TestHelper:
class Braintree_TestHelper
{
. . .
public static function settle($transactionId)
{
$http = new Braintree_Http(Braintree_Configuration::$global);
$path = Braintree_Configuration::$global->merchantPath() . '/transactions/' . $transactionId . '/settle';
$http->put($path);
}
. . .
}
In production, any transaction that you run will generally show up as a charge on a credit card instantly, but it isn't "permanent" and the money won't actually move until the transaction has settled. In other words, even though settlement can take 24 hours, the charge doesn't take that long to show up on the card.