Closed pablomarti closed 8 years ago
Same issue on the iOS SDK. Not found any "token" for deleting an already existing payment method.
The iOS, JS and Android clients do not return tokens
- just nonces
. You can send a nonce
to your server and then use a variety of methods to retrieve the token for vaulted payment methods. You can also use the customer_id
to retrieve payment methods (and their tokens) on your server.
gateway.customer.find("theCustomerId", function (err, customer) {
var token = customer.creditCards[0].token;
});
Hi!
I'm trying to update a payment method as a default. In order to do that, I'm connecting to an API developed in Node.js, following this example: https://developers.braintreepayments.com/ios+node/reference/request/customer/update#update-customer-and-existing-credit-card
The Node.js method requires a token. I have a BTCardPaymentMethod object, which inherits from BTPaymentMethod. I can get the nonce, but I can't get the token required by the Node.js method. How should I proceed? How can I get that token?