CheckoutSessionBase

  • mode
    Type: stringenum
    required

    The mode of the Checkout Session.

    values
    • payment

      Standard one-time payment.

    • setup

      Set up a payment method for future use.

    • subscription

      Coming soon. Not available yet.

  • after_completion
    Type: object · AfterCompletion

    After completion behavior for the Checkout Session.

    • hosted
      Type: object · AfterCompletionHostedConfirmation

      After completion behavior for the Checkout Session.

    • redirect
      Type: object · AfterCompletionRedirect

      After completion behavior for the Checkout Session.

    • type
      Type: string · AfterCompletionTypeenum

      After completion behavior for the Checkout Session.

      values
      • redirect
      • hosted_confirmation
  • cancel_url
    Type: string

    If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

  • client_customer_id
    Type: string

    An identifier of the customer in the merchant's system. Used to associate the Checkout and corresponding payments created from the Checkout. Required for SEPA payments - this will ensure that your customer is given a virtual iban that is unique to them and will enable Paypercut to reconcile the payment.

  • client_reference_id
    Type: string

    A free-form reference from the merchant's system. Typically used to identify the checkout in the merchant's system. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.

  • currency
    Type: object · Currency

    Three-letter ISO currency code

    • iso
      Type: string
      required

      Three-letter ISO currency code

    • scale
      Type: integer
      required

      Number of decimal places for this currency

  • customer
    Type: string | null
    max length:  
    100

    ID of an existing Customer, if one exists.

  • customer_creation
    Type: stringenum

    Configure whether a Checkout Session creates a Customer during Session confirmation. When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout with customer_details. Can only be set in payment mode.

    values
    • always
    • if_required
  • customer_email
    Type: string | null

    If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once a session is complete, use the customer field.

  • description
    Type: string

    A free-form reference to describe the checkout

  • expires_at
    Type: string | nullFormat: date-time

    Expiry time for the checkout. After this time, the checkout will no longer be available for payment. Defaults to 24h after creation.

  • line_items
    Type: array object[] · LineItem[]

    Details about the products sold or services provided

    • quantity
      Type: integerFormat: int64
      min:  
      1
      max:  
      10000000000
      required

      Quantity of the item

    • 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.

      • propertyName
        Type: string
    • price_data

      Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

      • active
        Type: boolean

        Whether the price can be used for new purchases.

      • billing_scheme
        Type: stringenum

        Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.

        values
        • per_unit
        • tiered
      • created
        Type: integerFormat: date-time nullable

        Time at which the object was created. Measured in seconds since the Unix epoch.

      • currency
        Type: stringFormat: currency

        Three-letter ISO currency code, in lowercase. Must be a supported currency.

      • id
        Type: string
        max length:  
        5000

        Unique identifier for the object.

      • livemode
        Type: boolean

        Has the value true if the object exists in live mode or the value false if the object exists in test mode.

      • lookup_key
        Type: string | null
        max length:  
        5000

        A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.

      • product
      • product_data
        Type: object · Product

        These fields can be used to create a new product that this price will belong to.

      • recurring
        Type: object · Recurring nullable
      • type
        Type: stringenum

        One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.

        values
        • one_time
        • recurring
      • unit_amount
        Type: integer | null

        The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.

      • unit_amount_decimal
        Type: string | nullFormat: decimal

        The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.

  • locale
    Type: stringenum

    The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.

    values
    • auto
    • bg
    • bg-BG
    • cs
    • cs-CZ
  • 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.

    • propertyName
      Type: string
  • payment_intent_data
    Type: object · PaymentIntentData nullable
    • amount
      Type: integer · amountWithCurrencyPrecisionFormat: int64

      Amount intended to be collected by this PaymentIntent. 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).

    • capture_method
      Type: stringenum

      Controls when the funds will be captured from the customer's account.

      values
      • automatic

        Paypercut automatically captures funds when the customer authorizes the payment.

      • manual

        Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later.

    • customer
      • This object represents a customer of your business. Use it to create recurring charges, save payment and contact information, and track payments that belong to the same customer.

        • created
          Type: stringFormat: date-time
          required

          Time at which the object was created. Measured in seconds since the Unix epoch.

        • id
          Type: string
          max length:  
          100
          required

          Unique identifier for the object.

        • livemode
          Type: boolean
          required

          Has the value true if the object exists in live mode or the value false if the object exists in test mode.

        • address

          The customer's address.

        • email
          Type: string | null
          max length:  
          1000

          The customer's email address.

        • invoice_settings

          Customer invoice settings

        • name
          Type: string | null
          max length:  
          5000

          The customer's full name or business name.

        • payment_methods
          Type: array object[] · PaymentMethod[]

          List of payment methods attached to the customer.

          PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

        • phone
          Type: string | null
          max length:  
          5000

          The customer's phone number.

        • preferred_locales
          Type: array string[] | null

          The customer's preferred locales (languages), ordered by preference.

    • on_behalf_of
      Type: string

      Account ID to which the payment will be credited

    • payment_method
      • Type: string · PaymentMethodId

        ID of the payment method to attach to this PaymentIntent.

    • setup_future_usage
      Type: string | nullenum

      Indicates that you intend to make future payments with this PaymentIntent's payment method. If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still attach the payment method to a Customer after the transaction completes. When processing card payments, Paypercut uses setup_future_usage to help you comply with regional legislation and network rules, such as SCA.

      values
      • off_session
      • on_session
    • statement_descriptor
      Type: string | null
      max length:  
      100

      Text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor.

  • payment_method_types
    Type: array string[]

    A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.

  • return_url
    Type: string

    The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. This parameter is required if ui_mode is embedded or custom and redirect-based payment methods are enabled on the session.

  • saved_payment_method_options
    Type: object · SavedPaymentMethodOptions
    • payment_method_save
      Type: stringenum

      Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to disabled.

      values
      • disabled
      • enabled
  • submit_type
    Type: string | nullenum

    Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode. If blank or auto, pay is used.

    values
    • auto
    • book
    • donate
    • pay
    • subscribe
  • success_url
    Type: string

    The URL to which Paypercut should send customers when payment or setup is complete. This parameter is not allowed if ui_mode is embedded or custom. If you'd like to use information from the successful Checkout Session on your page, read the guide on customizing your success page.

  • ui_mode
    Type: stringenum

    The UI mode of the Session. Defaults to hosted.

    values
    • custom
    • embedded
    • hosted
  • wallet_options
    Type: object · CheckoutSessionWalletOptions

    Wallet-specific configuration for this Checkout Session.

    • apple_pay
      Type: object · CheckoutApplePayWalletOptions
    • google_pay
      Type: object · CheckoutGooglePayWalletOptions