BTVenmoClient

@objc
public class BTVenmoClient : NSObject
extension BTVenmoClient: BTAppContextSwitchClient

Used to process Venmo payments

Initializer

  • Initialize a new Venmo client instance.

    Declaration

    Swift

    @objc(initWithAuthorization:universalLink:)
    public init(authorization: String, universalLink: URL)

    Parameters

    authorization

    A valid client token or tokenization key used to authorize API calls.

    universalLink

    The URL for the Venmo app to redirect to after user authentication completes. Must be a valid HTTPS URL dedicated to Braintree app switch returns.

Public Methods

  • Initiates Venmo login via app switch, which returns a BTVenmoAccountNonce when successful.

    Declaration

    Swift

    @objc(tokenizeWithVenmoRequest:completion:)
    public func tokenize(_ request: BTVenmoRequest, completion: @escaping (BTVenmoAccountNonce?, Error?) -> Void)

    Parameters

    request

    A Venmo request.

    completion

    This completion will be invoked when app switch is complete or an error occurs. On success, you will receive an instance of BTVenmoAccountNonce; on failure or user cancelation you will receive an error. If the user cancels out of the flow, the error code will be .canceled.

  • tokenize(_:) Asynchronous

    Initiates Venmo login via app switch, which returns a BTVenmoAccountNonce when successful.

    Throws

    An Error describing the failure. If the user cancels out of the flow, the error code will be .canceled.

    Declaration

    Swift

    public func tokenize(_ request: BTVenmoRequest) async throws -> BTVenmoAccountNonce

    Parameters

    request

    Return Value

    On success, you will receive an instance of BTVenmoAccountNonce

  • Switches to the App Store to download the Venmo application.

    Declaration

    Swift

    @objc
    public func openVenmoAppPageInAppStore()