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

Objective-C Swift
Copy
Copied
#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.

note

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

Next Page: Server-side →

Still have questions?

If you can’t find an answer, contact our Support team