Classes
The following classes are available globally.
-
See moreBTAmericanExpressClient
enables you to look up the rewards balance of American Express cards.Declaration
Objective-C
@interface BTAmericanExpressClient : NSObject
Swift
class BTAmericanExpressClient : NSObject
-
Contains information about an American Express rewards balance.
See moreDeclaration
Objective-C
@interface BTAmericanExpressRewardsBalance : NSObject
Swift
class BTAmericanExpressRewardsBalance : NSObject
-
Contains information about a tokenized Apple Pay card.
See moreDeclaration
Objective-C
@interface BTApplePayCardNonce : BTPaymentMethodNonce
Swift
class BTApplePayCardNonce : BTPaymentMethodNonce
-
Used to process Apple Pay payments
See moreDeclaration
Objective-C
@interface BTApplePayClient : NSObject
Swift
class BTApplePayClient : NSObject
-
Contains information specific to a merchant’s Braintree integration
See moreDeclaration
Objective-C
@interface BTConfiguration : NSObject
Swift
class BTConfiguration : NSObject
-
Information pertaining to the regulatory environment for a credit card if authentication insight is requested during tokenization.
See moreDeclaration
Objective-C
@interface BTAuthenticationInsight : NSObject
Swift
class BTAuthenticationInsight : NSObject
-
The card tokenization request represents raw credit or debit card data provided by the customer. Its main purpose is to serve as the input for tokenization.
See moreDeclaration
Objective-C
@interface BTCard : NSObject
Swift
class BTCard : NSObject
-
Used to process cards
See moreDeclaration
Objective-C
@interface BTCardClient : NSObject
Swift
class BTCardClient : NSObject
-
Contains information about a tokenized card.
See moreDeclaration
Objective-C
@interface BTCardNonce : BTPaymentMethodNonce
Swift
class BTCardNonce : BTPaymentMethodNonce
-
Contains information about a card to tokenize
See moreDeclaration
Objective-C
@interface BTCardRequest : NSObject
Swift
class BTCardRequest : NSObject
-
Contains information about the 3D Secure status of a payment method
See moreDeclaration
Objective-C
@interface BTThreeDSecureInfo : NSObject
Swift
class BTThreeDSecureInfo : NSObject
-
This class acts as the entry point for accessing the Braintree APIs via common HTTP methods performed on API endpoints.
Note
It also manages authentication via tokenization key and provides access to a merchant’s gateway configuration.Declaration
Objective-C
@interface BTAPIClient : NSObject
Swift
class BTAPIClient : NSObject
-
Handles return URLs when returning from app context switch and routes the return URL to the correct app context switch driver class.
Note
returnURLScheme
must contain your app’s registered URL Type that starts with the app’s bundle ID. When your app returns from app switch, the app delegate should callhandleOpenURL:
orhandleOpenURLContext:
Declaration
Objective-C
@interface BTAppContextSwitcher : NSObject
Swift
class BTAppContextSwitcher : NSObject
-
Contains the bin data associated with a payment method
See moreDeclaration
Objective-C
@interface BTBinData : NSObject
Swift
class BTBinData : NSObject
-
Represents the metadata associated with a session for posting along with payment data during tokenization
When a payment method is tokenized, the client api accepts parameters under _meta which are used to determine where payment data originated.
In general, this data may evolve and be used in different ways by different integrations in a single app. For example, if both Apple Pay and drop in are used. In this case, the source and integration may change over time, while the sessionID should remain constant. To achieve this, users of this class should use
See moremutableCopy
to create a new copy based on the existing session and then update the object as needed.Declaration
Objective-C
@interface BTClientMetadata : NSObject <NSCopying, NSMutableCopying>
Swift
class BTClientMetadata : NSObject, NSCopying, NSMutableCopying
-
Mutable
See moreBTClientMetadata
Declaration
Objective-C
@interface BTMutableClientMetadata : BTClientMetadata
Swift
class BTMutableClientMetadata : BTClientMetadata
-
An authorization string used to initialize the Braintree SDK
See moreDeclaration
Objective-C
@interface BTClientToken : NSObject <NSCoding, NSCopying>
Swift
class BTClientToken : NSObject, NSCoding, NSCopying
-
A type-safe wrapper around JSON
The primary goal of this class is to two-fold: (1) prevent bugs by staying true to JSON (json.org) rather than interpreting it in mysterious ways; (2) prevent bugs by making JSON interpretation as un-surprising as possible.
Most notably, type casting occurs via the as* nullable methods; errors are deferred and can be checked explicitly using isError and asError.
Example Data:
{ "foo": "bar", "baz": [1, 2, 3] }
Example Usage:
See morelet json : BTJSON = BTJSON(data:data); json.isError // false json.isObject // true json.isNumber // false json.asObject // self json["foo"] // JSON(@"bar") json["foo"].isString // true json["foo"].asString // @"bar" json["baz"].asString // null json["baz"]["quux"].isError // true json["baz"]["quux"].asError // NSError(domain: BTJSONErrorDomain, code: BTJSONErrorCodeTypeInvalid) json["baz"][0].asError // null json["baz"][0].asInteger // json["random"]["nested"]["things"][3].isError // true let json : BTJSON = BTJSON() // json.asJson => {} json["foo"][0] = "bar" // json.asJSON => { "foo": ["bar"] } json["baz"] = [ 1, 2, 3 ] // json.asJSON => { "foo": ["bar"], "baz": [1,2,3] } json["quux"] = NSSet() // json.isError => true, json.asJSON => throws NSError(domain: BTJSONErrorDomain, code: BTJSONErrorInvalidData)
Declaration
Objective-C
@interface BTJSON : NSObject
Swift
class BTJSON : NSObject
-
Braintree leveled logger
See moreDeclaration
Objective-C
@interface BTLogger : NSObject
Swift
class BTLogger : NSObject
-
BTPaymentMethodNonce is for generic tokenized payment information.
For example, if a customer’s vaulted payment methods contains a type that’s not recognized or supported by the Braintree SDK or the client-side integration (e.g. the vault contains a PayPal account but the client-side integration does not include the PayPal component), this type can act as a fallback.
The payment method nonce is a public token that acts as a placeholder for sensitive payments data that has been uploaded to Braintree for subsequent processing. The nonce is safe to access on the client and can be used on your server to reference the data in Braintree operations, such as Transaction.sale.
See moreDeclaration
Objective-C
@interface BTPaymentMethodNonce : NSObject
Swift
class BTPaymentMethodNonce : NSObject
-
Generic postal address
See moreDeclaration
Objective-C
@interface BTPostalAddress : NSObject <NSCopying>
Swift
class BTPostalAddress : NSObject, NSCopying
-
A helper class for converting URL queries to and from dictionaries
See moreDeclaration
Objective-C
@interface BTURLUtils : NSObject
Swift
class BTURLUtils : NSObject
-
Braintree’s advanced fraud protection solution
See moreDeclaration
Objective-C
@interface BTDataCollector : NSObject
Swift
class BTDataCollector : NSObject
-
Contains information about a PayPal payment method
See moreDeclaration
Objective-C
@interface BTPayPalAccountNonce : BTPaymentMethodNonce
Swift
class BTPayPalAccountNonce : BTPaymentMethodNonce
-
Undocumented
See moreDeclaration
Objective-C
@interface BTPayPalCheckoutRequest : BTPayPalRequest
Swift
class BTPayPalCheckoutRequest : BTPayPalRequest
-
Contains information about a PayPal credit financing option
See moreDeclaration
Objective-C
@interface BTPayPalCreditFinancing : NSObject
Swift
class BTPayPalCreditFinancing : NSObject
-
Contains information about a PayPal credit amount
See moreDeclaration
Objective-C
@interface BTPayPalCreditFinancingAmount : NSObject
Swift
class BTPayPalCreditFinancingAmount : NSObject
-
Used to tokenize PayPal accounts.
See moreDeclaration
Objective-C
@interface BTPayPalDriver : NSObject
Swift
class BTPayPalDriver : NSObject
-
A PayPal line item to be displayed in the PayPal checkout flow.
See moreDeclaration
Objective-C
@interface BTPayPalLineItem : NSObject
Swift
class BTPayPalLineItem : NSObject
-
Base options for PayPal Checkout and PayPal Vault flows.
Note
Do not instantiate this class directly. Instead, use BTPayPalCheckoutRequest or BTPayPalVaultRequest.Declaration
Objective-C
@interface BTPayPalRequest : NSObject
Swift
class BTPayPalRequest : NSObject
-
Options for the PayPal Vault flow.
See moreDeclaration
Objective-C
@interface BTPayPalVaultRequest : BTPayPalRequest
Swift
class BTPayPalVaultRequest : BTPayPalRequest
-
Used to initialize a local payment flow
See moreDeclaration
Objective-C
@interface BTLocalPaymentRequest : BTPaymentFlowRequest <BTPaymentFlowRequestDelegate>
Swift
class BTLocalPaymentRequest : BTPaymentFlowRequest, BTPaymentFlowRequestDelegate
-
The result of an local payment flow
See moreDeclaration
Objective-C
@interface BTLocalPaymentResult : BTPaymentFlowResult
Swift
class BTLocalPaymentResult : BTPaymentFlowResult
-
BTPaymentFlowDriver handles the shared aspects of web/app payment flows.
Handles the app switching and shared logic for payment flows that use web or app switching.
See moreDeclaration
Objective-C
@interface BTPaymentFlowDriver : NSObject <BTAppContextSwitchDriver, BTPaymentFlowDriverDelegate>
Swift
class BTPaymentFlowDriver : NSObject, BTAppContextSwitchDriver, BTPaymentFlowDriverDelegate
-
Wrapper for a payment flow request.
Declaration
Objective-C
@interface BTPaymentFlowRequest : NSObject
Swift
class BTPaymentFlowRequest : NSObject
-
Wrapper for a payment flow result.
Declaration
Objective-C
@interface BTPaymentFlowResult : NSObject
Swift
class BTPaymentFlowResult : NSObject
-
Additional information for a 3DS lookup. Used in 3DS 2.0+ flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureAdditionalInformation : NSObject
Swift
class BTThreeDSecureAdditionalInformation : NSObject
-
Declaration
Objective-C
@interface BTThreeDSecureLookup : NSObject
Swift
class BTThreeDSecureLookup : NSObject
-
Postal address for 3D Secure flows
See moreDeclaration
Objective-C
@interface BTThreeDSecurePostalAddress : NSObject <NSCopying>
Swift
class BTThreeDSecurePostalAddress : NSObject, NSCopying
-
Used to initialize a 3D Secure payment flow
See moreDeclaration
Objective-C
@interface BTThreeDSecureRequest : BTPaymentFlowRequest <BTPaymentFlowRequestDelegate>
Swift
class BTThreeDSecureRequest : BTPaymentFlowRequest, BTPaymentFlowRequestDelegate
-
The result of a 3D Secure payment flow
See moreDeclaration
Objective-C
@interface BTThreeDSecureResult : BTPaymentFlowResult
Swift
class BTThreeDSecureResult : BTPaymentFlowResult
-
UI Customization Options for 3D Secure 1 Flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV1UICustomization : NSObject
Swift
class BTThreeDSecureV1UICustomization : NSObject
-
Base customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2BaseCustomization : NSObject
Swift
class BTThreeDSecureV2BaseCustomization : NSObject
-
Button customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2ButtonCustomization : BTThreeDSecureV2BaseCustomization
Swift
class BTThreeDSecureV2ButtonCustomization : BTThreeDSecureV2BaseCustomization
-
Label customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2LabelCustomization : BTThreeDSecureV2BaseCustomization
Swift
class BTThreeDSecureV2LabelCustomization : BTThreeDSecureV2BaseCustomization
-
Text box customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2TextBoxCustomization : BTThreeDSecureV2BaseCustomization
Swift
class BTThreeDSecureV2TextBoxCustomization : BTThreeDSecureV2BaseCustomization
-
Toolbar customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2ToolbarCustomization : BTThreeDSecureV2BaseCustomization
Swift
class BTThreeDSecureV2ToolbarCustomization : BTThreeDSecureV2BaseCustomization
-
UI customization options for 3D Secure 2 flows.
See moreDeclaration
Objective-C
@interface BTThreeDSecureV2UICustomization : NSObject
Swift
class BTThreeDSecureV2UICustomization : NSObject
-
Deprecated
The UnionPay SMS integration is deprecated, as UnionPay can now be processed as a credit card through their partnership with Discover. Use
BTCardClient.tokenizeCard(card: completion:)
.Contains information about a card’s capabilities
See moreDeclaration
Objective-C
@interface BTCardCapabilities : NSObject
Swift
class BTCardCapabilities : NSObject
-
Contains information about a Venmo Account payment method
See moreDeclaration
Objective-C
@interface BTVenmoAccountNonce : BTPaymentMethodNonce
Swift
class BTVenmoAccountNonce : BTPaymentMethodNonce
-
Used to process Venmo payments
See moreDeclaration
Objective-C
@interface BTVenmoDriver : NSObject <BTAppContextSwitchDriver>
Swift
class BTVenmoDriver : NSObject, BTAppContextSwitchDriver
-
A Venmo line item to be displayed in the Venmo Paysheet.
See moreDeclaration
Objective-C
@interface BTVenmoLineItem : NSObject
Swift
class BTVenmoLineItem : NSObject
-
A BTVenmoRequest specifies options that contribute to the Venmo flow
See moreDeclaration
Objective-C
@interface BTVenmoRequest : NSObject
Swift
class BTVenmoRequest : NSObject
-
Enables you to collect data about a customer’s device and correlate it with a session identifier on your server.
See moreDeclaration
Swift
@objc public class PPDataCollector : NSObject
-
Contains information about a PayPal payment method.
See moreDeclaration
Swift
@objcMembers public class BTPayPalNativeCheckoutAccountNonce : NSObject
-
Client used to collect PayPal payment methods. If possible, this client will present a native flow; otherwise, it will fall back to a web flow.
See moreDeclaration
Swift
@objc public class BTPayPalNativeCheckoutClient : NSObject
-
Options for the PayPal Checkout flow.
See moreDeclaration
Swift
@objcMembers public class BTPayPalNativeCheckoutRequest : BTPayPalNativeRequest
-
Declaration
Swift
@objcMembers public class BTPayPalNativeRequest : NSObject
-
Options for the PayPal Vault flow.
See moreDeclaration
Swift
@objcMembers public class BTPayPalNativeVaultRequest : BTPayPalNativeRequest
-
Used to integrate with SEPA Direct Debit.
See moreDeclaration
Swift
@objcMembers public class BTSEPADirectDebitClient : NSObject
-
A payment method nonce representing a SEPA Direct Debit payment.
See moreDeclaration
Swift
@objcMembers public class BTSEPADirectDebitNonce : NSObject
-
Parameters for creating a SEPA Direct Debit tokenization request.
See moreDeclaration
Swift
@objcMembers public class BTSEPADirectDebitRequest : NSObject