Package com.stripe

Class Stripe

java.lang.Object
com.stripe.Stripe

public abstract class Stripe extends Object
  • Field Details

  • Constructor Details

    • Stripe

      public Stripe()
  • Method Details

    • overrideApiBase

      public static void overrideApiBase(String overriddenApiBase)
      (FOR TESTING ONLY) If you'd like your API requests to hit your own (mocked) server, you can set this up here by overriding the base api URL.
    • getApiBase

      public static String getApiBase()
    • overrideConnectBase

      public static void overrideConnectBase(String overriddenConnectBase)
      (FOR TESTING ONLY) If you'd like your OAuth requests to hit your own (mocked) server, you can set this up here by overriding the base Connect URL.
    • getConnectBase

      public static String getConnectBase()
    • overrideUploadBase

      public static void overrideUploadBase(String overriddenUploadBase)
      (FOR TESTING ONLY) If you'd like your upload requests to hit your own (mocked) server, you can set this up here by overriding the base api URL.
    • getUploadBase

      public static String getUploadBase()
    • setConnectionProxy

      public static void setConnectionProxy(Proxy proxy)
      Set proxy to tunnel all Stripe connections.
      Parameters:
      proxy - proxy host and port setting
    • getConnectionProxy

      public static Proxy getConnectionProxy()
    • getConnectTimeout

      public static int getConnectTimeout()
      Returns the connection timeout.
      Returns:
      timeout value in milliseconds
    • setConnectTimeout

      public static void setConnectTimeout(int timeout)
      Sets the timeout value that will be used for making new connections to the Stripe API (in milliseconds).
      Parameters:
      timeout - timeout value in milliseconds
    • getReadTimeout

      public static int getReadTimeout()
      Returns the read timeout.
      Returns:
      timeout value in milliseconds
    • setReadTimeout

      public static void setReadTimeout(int timeout)
      Sets the timeout value that will be used when reading data from an established connection to the Stripe API (in milliseconds).

      Note that this value should be set conservatively because some API requests can take time and a short timeout increases the likelihood of causing a problem in the backend.

      Parameters:
      timeout - timeout value in milliseconds
    • getMaxNetworkRetries

      public static int getMaxNetworkRetries()
      Returns the maximum number of times requests will be retried.
      Returns:
      the maximum number of times requests will be retried
    • setMaxNetworkRetries

      public static void setMaxNetworkRetries(int numRetries)
      Sets the maximum number of times requests will be retried.
      Parameters:
      numRetries - the maximum number of times requests will be retried
    • setProxyCredential

      public static void setProxyCredential(PasswordAuthentication auth)
      Provide credential for proxy authorization if required.
      Parameters:
      auth - proxy required userName and password
    • getProxyCredential

      public static PasswordAuthentication getProxyCredential()
    • setAppInfo

      public static void setAppInfo(String name)
    • setAppInfo

      public static void setAppInfo(String name, String version)
    • setAppInfo

      public static void setAppInfo(String name, String version, String url)
    • setAppInfo

      public static void setAppInfo(String name, String version, String url, String partnerId)
      Sets information about your application. The information is passed along to Stripe.
      Parameters:
      name - Name of your application (e.g. "MyAwesomeApp")
      version - Version of your application (e.g. "1.2.34")
      url - Website for your application (e.g. "https://myawesomeapp.info")
      partnerId - Your Stripe Partner ID (e.g. "pp_partner_1234")
    • getAppInfo

      public static Map<String,String> getAppInfo()