Event

An event resource represents a specific action that has occurred within your Paypercut account. Paypercut sends this same Event object as the JSON body of webhook deliveries.

  • id
    Type: string
    max length:  
    100
    required

    Unique identifier for the object.

  • created
    Type: stringFormat: date-time
    required

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

  • type
    Type: stringenum
    required

    Event types that webhook endpoints can subscribe to.

    values
    • checkout_session.completed

      A Checkout Session completed successfully.

    • payment_intent.authorized

      A PaymentIntent was authorized and can be captured.

    • payment_intent.captured

      A PaymentIntent was captured.

    • account.updated

      A connected account was updated.

    • account.external_account.created

      An external account was attached to a connected account.

    • account.external_account.updated

      An external account on a connected account was updated.

    • invoice.paid

      An invoice was paid.

    • invoice.payment_failed

      An invoice payment failed.

  • account
    Type: string | null
    max length:  
    100

    Connected account that originated the event. Present for platform and marketplace event deliveries where the platform needs to identify which connected account the event belongs to.

  • api_version
    Type: string | null
    max length:  
    100

    The API version used to render data when the event was created. The contents of data never change, so this value remains static regardless of the API version currently in use.

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

  • data
    required
    • object
      required

      Object containing the API resource relevant to the event. For example, a checkout_session.completed event has a Checkout Session object in this field.

      Checkout session for processing payments

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

      • payment_status
        Type: stringenum
        required

        The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required.

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

        The status of the Checkout Session.

        values
        • complete
        • expired
        • open
      • url
        Type: stringFormat: uri
        required

        URL where the customer can complete the payment.

      • after_completion
        Type: object

        After completion behavior for the Checkout Session.

      • amount_total
        Type: integerFormat: int64

        Total of all items after discounts and taxes are applied.

      • billing_address_collection
        Type: stringenum

        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 | null

        URL customers can return to if they cancel payment.

      • client_customer_id
        Type: string | null

        An identifier of the customer in the merchant's system.

      • client_reference_id
        Type: string | null

        A free-form reference from the merchant's system.

      • currency
        Type: object

        Three-letter ISO currency code

      • customer
        nullable

        Customer associated with the Checkout Session, if one exists.

      • customer_creation
        Type: string | nullenum

        Customer creation behavior used during Session confirmation.

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

        Email address associated with the Checkout Session.

      • description
        Type: string | null

        A free-form reference that describes the checkout.

      • expires_at
        Type: string | nullFormat: date-time

        Expiry time for the checkout.

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

        Details about the products sold or services provided.

      • locale
        Type: string | null

        The IETF language tag of the locale Checkout is displayed in.

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

      • next_action
        Type: object · PaymentIntentNextAction
      • payment_intent
        nullable

        The PaymentIntent for Checkout Sessions in payment mode. It may be returned as an ID unless expanded.

      • payment_link
        nullable

        The Payment Link that created this Session, if applicable.

      • payment_method_types
        Type: array string[]

        Payment method types this Checkout Session can accept.

      • return_url
        Type: string | null

        URL customers return to after redirect-based authentication.

      • saved_payment_method_options
        Type: object · SavedPaymentMethodOptions
      • setup_intent
        nullable

        The SetupIntent for Checkout Sessions in setup mode.

      • submit_type
        Type: string | nullenum

        Submit button text behavior used for Checkout Sessions in payment mode.

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

        URL customers are sent to when payment or setup is complete.

      • ui_mode
        Type: stringenum

        The UI mode of the Session.

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