STPAPIClient
public class STPAPIClient
A client for making connections to the Stripe API.
-
The current version of this library.
Declaration
Swift
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
public static let shared: STPAPIClient
-
The client’s publishable key. The default value is
StripeAPI.defaultPublishableKey
.Declaration
Swift
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
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
public var appInfo: STPAppInfo?
-
The API version used to communicate with Stripe.
Declaration
Swift
public static let apiVersion: String
-
Initializes an API client with the given publishable key.
Declaration
Swift
public convenience init(publishableKey: String)
Parameters
publishableKey
The publishable key to use.
Return Value
An instance of STPAPIClient.