See also the Braintree_Transaction response object.

If you do not use the options.submitForSettlement option with Braintree_Transaction::sale(), then you will have to explicitly submit the transaction for settlement.

PHP
Click to copy
Copied
$result = Braintree_Transaction::submitForSettlement('the_transaction_id');

if ($result->success) {
    $settledTransaction = $result->transaction;
} else {
    print_r($result->errors);
}

If the transaction cannot be found, you'll receive a Braintree_Exception_NotFound exception.

Arguments
transactionId required, string

The unique transaction identifier. You can only submit transactions that have a status of authorized for settlement.

amount String

An amount to submit for settlement. Must be greater than 0. You cannot settle more than the authorized amount unless your industry and processor support settlement adjustment (settling a certain percentage over the authorized amount); contact our Accounts team for details.

If you settle an amount that is less than what was authorized, the transaction object will return the amount settled.

Additional Parameters
'orderId' string

Use this field to pass additional information about the transaction. On PayPal transactions, this field maps to the PayPal invoice number. PayPal invoice numbers must be unique in your PayPal business account.

Examples

Specifying settlement amount

If you only want to settle a portion of the total authorization amount, you can specify the amount to settle. If you do not specify, the entire amount will be settled. You cannot settle more than the authorized amount unless your industry and processor support settlement adjustment (settling a certain percentage over the authorized amount); contact our Accounts team for details.

PHP
Click to copy
Copied
$result = Braintree_Transaction::submitForSettlement('the_transaction_id', '35.00');

Still have questions?

If you can’t find an answer, contact our Support team.