Skip to content


Updating customer with wrongly formatted credit card returns AuthorizationError #14

nherment opened this Issue · 1 comment

2 participants



I'm sending this customer info:
"creditCard": {
"cardholder":"Indiana Jones",

Per documentation, some attributes are misformatted:

  • credit_card_exp should be expirationDate
  • cardholder should be cardholderName

However, the BrainTree API then returns the following error:
{ message: 'Authorization Error', type: 'authorizationError' }

I'd expect the braintree API to return some specific error like 'unsupported attribute' but not an 'authorizationError' since the documentation on authorizationError is very misleading in this case:

You’ll receive an authorization exception if the API key that you’re using is not
authorized to perform the attempted action according to the roles assigned to the user
who owns the API key.

Braintree member

Hi @nherment,

We check all parameters against those the user is allowed to set; therefore invalid parameters and disallowed parameters return the same error. We've noted this in our exception documentation, and it will be available next time we release the docs. Thanks for letting us know.

@agfor agfor closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.