Class ChargeCreateParams.Builder

java.lang.Object
com.stripe.param.ChargeCreateParams.Builder
Enclosing class:
ChargeCreateParams

public static class ChargeCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public ChargeCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setAmount

      public ChargeCreateParams.Builder setAmount(Long amount)
      Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
    • setApplicationFee

      public ChargeCreateParams.Builder setApplicationFee(Long applicationFee)
    • setApplicationFeeAmount

      public ChargeCreateParams.Builder setApplicationFeeAmount(Long applicationFeeAmount)
      A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.
    • setCapture

      public ChargeCreateParams.Builder setCapture(Boolean capture)
      Whether to immediately capture the charge. Defaults to true. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the authorizing charges and settling later documentation.
    • setCurrency

      public ChargeCreateParams.Builder setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setCustomer

      public ChargeCreateParams.Builder setCustomer(String customer)
      The ID of an existing customer that will be charged in this request.
    • setDescription

      public ChargeCreateParams.Builder setDescription(String description)
      An arbitrary string which you can attach to a Charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing.
    • setDestination

      public ChargeCreateParams.Builder setDestination(ChargeCreateParams.Destination destination)
    • addExpand

      public ChargeCreateParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See ChargeCreateParams.expand for the field documentation.
    • addAllExpand

      public ChargeCreateParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See ChargeCreateParams.expand for the field documentation.
    • putExtraParam

      public ChargeCreateParams.Builder putExtraParam(String key, Object value)
      Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See ChargeCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public ChargeCreateParams.Builder putAllExtraParam(Map<String,Object> map)
      Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See ChargeCreateParams.extraParams for the field documentation.
    • putMetadata

      public ChargeCreateParams.Builder putMetadata(String key, String value)
      Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See ChargeCreateParams.metadata for the field documentation.
    • putAllMetadata

      public ChargeCreateParams.Builder putAllMetadata(Map<String,String> map)
      Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See ChargeCreateParams.metadata for the field documentation.
    • setMetadata

      public ChargeCreateParams.Builder setMetadata(EmptyParam metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    • setMetadata

      public ChargeCreateParams.Builder setMetadata(Map<String,String> metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    • setOnBehalfOf

      public ChargeCreateParams.Builder setOnBehalfOf(String onBehalfOf)
      The Stripe account ID for which these funds are intended. Automatically set if you use the destination parameter. For details, see Creating Separate Charges and Transfers.
    • setRadarOptions

      public ChargeCreateParams.Builder setRadarOptions(ChargeCreateParams.RadarOptions radarOptions)
      Options to configure Radar. See Radar Session for more information.
    • setReceiptEmail

      public ChargeCreateParams.Builder setReceiptEmail(String receiptEmail)
      The email address to which this charge's receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer's email address. If receipt_email is specified for a charge in live mode, a receipt will be sent regardless of your email settings.
    • setShipping

      Shipping information for the charge. Helps prevent fraud on charges for physical goods.
    • setSource

      public ChargeCreateParams.Builder setSource(String source)
      A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources---namely, cards, bank accounts, and attached sources---you must also pass the ID of the associated customer.
    • setStatementDescriptor

      public ChargeCreateParams.Builder setStatementDescriptor(String statementDescriptor)
      For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
    • setStatementDescriptorSuffix

      public ChargeCreateParams.Builder setStatementDescriptorSuffix(String statementDescriptorSuffix)
      Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
    • setTransferData

      public ChargeCreateParams.Builder setTransferData(ChargeCreateParams.TransferData transferData)
      An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
    • setTransferGroup

      public ChargeCreateParams.Builder setTransferGroup(String transferGroup)
      A string that identifies this transaction as part of a group. For details, see Grouping transactions.