STPAPIClient
@objc
public class STPAPIClient : NSObject
A client for making connections to the Stripe API.
-
The current version of this library.
Declaration
Swift
@objc public static let STPSDKVersion: String
-
A shared singleton API client. By default, the SDK uses this instance to make API requests eg in STPPaymentHandler, STPPaymentContext, STPCustomerContext, etc.
Declaration
Swift
@objc(sharedClient) public static let shared: STPAPIClient
-
The client’s publishable key. The default value is
StripeAPI.defaultPublishableKey
.Declaration
Swift
@objc public var publishableKey: String? { get set }
-
In order to perform API requests on behalf of a connected account, e.g. to create a Source or Payment Method on a connected account, set this property to the ID of the account for which this request is being made.
Declaration
Swift
@objc public var stripeAccount: String?
-
Libraries wrapping the Stripe SDK should set this, so that Stripe can contact you about future issues or critical updates.
Declaration
Swift
@objc public var appInfo: STPAppInfo?
-
The API version used to communicate with Stripe.
Declaration
Swift
@objc public static let apiVersion: String
-
Initializes an API client with the given publishable key.
Declaration
Swift
@objc(initWithPublishableKey:) public convenience init(publishableKey: String)
Parameters
publishableKey
The publishable key to use.
Return Value
An instance of STPAPIClient.