Search code examples
ruby-on-railsrubybraintree

Braintree IOS + rails error 91564 Cannot use a payment_method_nonce more than once


I'm getting an error from Braintree on Braintree::Transaction.sale

Braintree::ErrorResult params:{...} errors:transaction:[(91564)
  Cannot use a payment_method_nonce more than once.

However when I check the nonce token, it's always different from the last request.

Sample nonces received from IOS app:

10e368f1-81bc-4ace-b4b4-76cfdc4d1459
02cc81b2-d6c7-416b-b5d5-5b23c7e81fad

Solution

  • got the issue resolved.. I was trying to do add cards manually through paymentMethod.create using a nonce... same nonce i was using for Transaction.Sale instead of using the token returned by PaymentMethod.create.