iOS v3 is deprecated. We recommend migrating to the latest version of our iOS SDK. The best way to start is by making an incremental upgrade from v3 to v4.

To use our card payment processing with your own UI, simply instantiate a Braintree and tokenize the card details.

#import <Braintree/Braintree.h>

self.braintree = [Braintree braintreeWithClientToken:CLIENT_TOKEN_FROM_SERVER];

BTClientCardRequest *request = [BTClientCardRequest new];
request.number = @"4111111111111111";
request.expirationMonth = @"12";
request.expirationYear = @"2018";

[braintree tokenizeCard:request
             completion:^(NSString *nonce, NSError *error) {
                 // Communicate the nonce to your server, or handle error

In the completion block, send the resulting nonce to your server for use.


See Braintree iOS Client SDK header files for in-depth documentation.

Next Page: Server-side →