Search code examples
javascriptbraintree

Braintree.js drop-in , dynamically update client token?


I'm using braintree.js, and loading their drop-in. Everything works fine but I'm unable to submit a second request because a new nonce value is needed.

Everything is done in js- I'm submitting the nonce value and getting a new token. But a new nonce value is returned only with a new client token, so is it possible to update the client token the current loaded form/drop-in is using, without refreshing the page?


Solution

  • I work as a developer at Braintree. Currently, you cannot dynamically update a client token without a page reload.

    This is a known issue and the team is actively working on a solution for a future release. I recommend subscribing to this GitHub issue so you will be notified of any pertinent updates.