Search code examples
phppayment-gatewaybraintree

Brain-tree payment gateway: amount settlement


I am using brain tree as a payment gateway in my website and initially I am authorizing the payment and after few minute I will submit it for settlement but its giving us following errors:

Settled amount is : 7 Total authorized amount is: [amount] => 187.50

I am getting below error:

**[_attribute:private] => amount
[_code:private] => 91551
[_message:private] => Settlement amount cannot be less than the service fee amount.**

For more details you see the response which I am getting:

Braintree_Result_Error Object
(
    [success] => 
    [_attributes] => Array
        (
            [errors] => Braintree_Error_ErrorCollection Object
                (
                    [_errors:private] => Braintree_Error_ValidationErrorCollection Object
                        (
                            [_errors:private] => Array
                                (
                                )

                            [_nested:private] => Array
                                (
                                    [transaction] => Braintree_Error_ValidationErrorCollection Object
                                        (
                                            [_errors:private] => Array
                                                (
                                                    [0] => Braintree_Error_Validation Object
                                                        (
                                                            [_attribute:private] => amount
                                                            [_code:private] => 91551
                                                            [_message:private] => Settlement amount cannot be less than the service fee amount.
                                                        )

                                                )

                                            [_nested:private] => Array
                                                (
                                                )

                                            [_collection:protected] => Array
                                                (
                                                )

                                        )

                                )

                            [_collection:protected] => Array
                                (
                                )

                        )

                )

[params] => Array
    (
        [transaction] => Array
            (
                [amount] => 7
            )

    [controller] => transactions
    [action] => submit_for_settlement
    [merchantId] => 6tfkyqyqnqh6ydwk
    [id] => 92vsvs
)

[message] => Settlement amount cannot be less than the service fee amount.
[transaction] => Braintree_Transaction Object

So is there any time limit for submitting amount ?


Solution

  • Finally I got the answer of my question

    The validation error you are encountering (91551 Settlement amount cannot be less than the service fee amount) for transaction 92vsvs is due to you attempting to settle the transaction for $7.00, which is below the service fee amount of $32.61 USD.

    When creating a Marketplace transaction and passing a service fee, you can choose to authorize the total transaction amount initially and submit a smaller amount later on. The issue is that the service fee specified cannot be changed or lowered, so you need to submit an amount that can at least cover this service fee.

    For example, transaction 92vsvs is authorized for $187.50 USD and has a service fee of $32.61 USD. At the bare minimum, you can submit $32.61 USD for settlement. You can submit any amount higher than $32.61 USD for settlement, but nothing lower. If you submitted only $32.61 USD for settlement than there would be no funds sent to the sub-merchant, since there are no funds remaining after the service fee is collected.