AuthorizationError on 'submit_for_settlement'=True Braintree python

296 Views Asked by At

I am using sandbox account credentials where my user has all the permissions still when I create a transaction it gives me AuthorizationError

Here is my code.

self.braintree_client.transaction.sale(
                {
                    "amount": charge["amount"],
                    "payment_method_token": "token_stored",
                    "merchant_account_id": merchant_id,
                    "options": {
                        "submit_for_settlement": True,
                    },
                }
            )

Everything works fine If I remove the submit_for_settlement but I want to settle the payment.

Does anyone have anyone have any idea what I am doing wrong here?

Any help would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Double check that your user has the Right to submit sales for settlement. Without this permission added to your User's Role, you'll get an authorization error.

More on managing user roles and permissions here

If you have any further questions or continue to encounter this error, contact Support.