1
votes

I have a rails app with gem 'braintree'.

Documentation:

https://developers.braintreepayments.com/ios+ruby/reference/request/credit-card/create https://developers.braintreepayments.com/ios+ruby/reference/response/customer

I would like to change the way I store customer ids in the vault. (say, from "BT_#{id}" to "SOME_OTHER_KEY_BT#{id}")

I would like to keep the existing cards each customer have in the vault.

Two approaches:

  • Updating existing customer ids in the vault. The problem is that I don't find a way to just update (doc) the customer, because I cannot specify the parameter customer_id. This parameter is used for reference, not as a value you specify to update.

  • Re-creating all customers in the vault. The problem with that is that I would need to re-add every customer card info, and I don't have all the information needed (such as the card numbers) to re-submit the info.

Any suggestions ?

1

1 Answers

1
votes

I work at Braintree. If you have more questions, please get in touch with our support team.

The general suggestion in cases like this, is that you really shouldn't care what the Braintree customer ID is; you should store it along with your own customer ID in your database so you can map between the two. For all other purposes other than communicating with Braintree, you should use your own ID.