CheckoutSession

  • Type: object

    Checkout session for processing payments

    • amount_total
      Type: integerFormat: int64
      required

      Total of all items after discounts and taxes are applied.

    • currency
      Type: object · Currency
      required

      Three-letter ISO currency code

    • id
      Type: string
      required

      Unique identifier for the checkout session

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

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

    • next_action
      Type: object · PaymentIntentNextAction nullable
      required
    • payment_status
      Type: stringenum
      required

      The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.

      values
      • no_payment_required
      • processing
      • paid
      • unpaid
    • status
      Type: stringenum
      required

      The status of the Checkout Session, one of open, complete, or expired.

      values
      • complete
      • expired
      • open
    • submit_type
      Type: string | nullenum
      required

      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
    • ui_mode
      Type: stringenum
      required

      The UI mode of the Session. Defaults to hosted.

      values
      • custom
      • embedded
      • hosted
    • url
      Type: stringFormat: uri
      required

      URL where the customer can complete the payment

    • after_completion
      Type: object · AfterCompletion

      After completion behavior for the Checkout Session.

    • billing_address_collection
      Type: string · BillingAddressCollectionenum

      Specify whether Checkout should collect the customer's billing address. Defaults to auto.

      values
      • auto

        Checkout will only collect the billing address when necessary.

      • required

        Checkout will always collect the customer's billing address.

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

    • 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

    • 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
      • Type: string · IntentId
        max length:  
        100

        The ID of the PaymentIntent for Checkout Sessions in payment mode. You can't confirm or cancel the PaymentIntent for a Checkout Session.

    • payment_intent_data
      Type: object · PaymentIntentData nullable
    • payment_link
      • Type: string · PaymentLinkId
        max length:  
        100

        The ID of the Payment Link that created this Session.

    • 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
    • setup_intent
      • Type: string · IntentId
        max length:  
        100

        The ID of the PaymentIntent for Checkout Sessions in payment mode. You can't confirm or cancel the PaymentIntent for a Checkout Session.

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

    • wallet_options
      Type: object · CheckoutSessionWalletOptions

      Wallet-specific configuration for this Checkout Session.