Class Event

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.v2.core.Event
All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface
Direct Known Subclasses:
V1AccountUpdatedEvent, V1ApplicationFeeCreatedEvent, V1ApplicationFeeRefundedEvent, V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterNoMeterFoundEvent, V1BillingPortalConfigurationCreatedEvent, V1BillingPortalConfigurationUpdatedEvent, V1CapabilityUpdatedEvent, V1ChargeCapturedEvent, V1ChargeDisputeClosedEvent, V1ChargeDisputeCreatedEvent, V1ChargeDisputeFundsReinstatedEvent, V1ChargeDisputeFundsWithdrawnEvent, V1ChargeDisputeUpdatedEvent, V1ChargeExpiredEvent, V1ChargeFailedEvent, V1ChargePendingEvent, V1ChargeRefundedEvent, V1ChargeRefundUpdatedEvent, V1ChargeSucceededEvent, V1ChargeUpdatedEvent, V1CheckoutSessionAsyncPaymentFailedEvent, V1CheckoutSessionAsyncPaymentSucceededEvent, V1CheckoutSessionCompletedEvent, V1CheckoutSessionExpiredEvent, V1ClimateOrderCanceledEvent, V1ClimateOrderCreatedEvent, V1ClimateOrderDelayedEvent, V1ClimateOrderDeliveredEvent, V1ClimateOrderProductSubstitutedEvent, V1ClimateProductCreatedEvent, V1ClimateProductPricingUpdatedEvent, V1CouponCreatedEvent, V1CouponDeletedEvent, V1CouponUpdatedEvent, V1CreditNoteCreatedEvent, V1CreditNoteUpdatedEvent, V1CreditNoteVoidedEvent, V1CustomerCreatedEvent, V1CustomerDeletedEvent, V1CustomerSubscriptionCreatedEvent, V1CustomerSubscriptionDeletedEvent, V1CustomerSubscriptionPausedEvent, V1CustomerSubscriptionPendingUpdateAppliedEvent, V1CustomerSubscriptionPendingUpdateExpiredEvent, V1CustomerSubscriptionResumedEvent, V1CustomerSubscriptionTrialWillEndEvent, V1CustomerSubscriptionUpdatedEvent, V1CustomerTaxIdCreatedEvent, V1CustomerTaxIdDeletedEvent, V1CustomerTaxIdUpdatedEvent, V1CustomerUpdatedEvent, V1FileCreatedEvent, V1FinancialConnectionsAccountCreatedEvent, V1FinancialConnectionsAccountDeactivatedEvent, V1FinancialConnectionsAccountDisconnectedEvent, V1FinancialConnectionsAccountReactivatedEvent, V1FinancialConnectionsAccountRefreshedBalanceEvent, V1FinancialConnectionsAccountRefreshedOwnershipEvent, V1FinancialConnectionsAccountRefreshedTransactionsEvent, V1IdentityVerificationSessionCanceledEvent, V1IdentityVerificationSessionCreatedEvent, V1IdentityVerificationSessionProcessingEvent, V1IdentityVerificationSessionRedactedEvent, V1IdentityVerificationSessionRequiresInputEvent, V1IdentityVerificationSessionVerifiedEvent, V1InvoiceCreatedEvent, V1InvoiceDeletedEvent, V1InvoiceFinalizationFailedEvent, V1InvoiceFinalizedEvent, V1InvoiceitemCreatedEvent, V1InvoiceitemDeletedEvent, V1InvoiceMarkedUncollectibleEvent, V1InvoiceOverdueEvent, V1InvoiceOverpaidEvent, V1InvoicePaidEvent, V1InvoicePaymentActionRequiredEvent, V1InvoicePaymentFailedEvent, V1InvoicePaymentPaidEvent, V1InvoicePaymentSucceededEvent, V1InvoiceSentEvent, V1InvoiceUpcomingEvent, V1InvoiceUpdatedEvent, V1InvoiceVoidedEvent, V1InvoiceWillBeDueEvent, V1IssuingAuthorizationCreatedEvent, V1IssuingAuthorizationRequestEvent, V1IssuingAuthorizationUpdatedEvent, V1IssuingCardCreatedEvent, V1IssuingCardholderCreatedEvent, V1IssuingCardholderUpdatedEvent, V1IssuingCardUpdatedEvent, V1IssuingDisputeClosedEvent, V1IssuingDisputeCreatedEvent, V1IssuingDisputeFundsReinstatedEvent, V1IssuingDisputeFundsRescindedEvent, V1IssuingDisputeSubmittedEvent, V1IssuingDisputeUpdatedEvent, V1IssuingPersonalizationDesignActivatedEvent, V1IssuingPersonalizationDesignDeactivatedEvent, V1IssuingPersonalizationDesignRejectedEvent, V1IssuingPersonalizationDesignUpdatedEvent, V1IssuingTokenCreatedEvent, V1IssuingTokenUpdatedEvent, V1IssuingTransactionCreatedEvent, V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent, V1IssuingTransactionUpdatedEvent, V1MandateUpdatedEvent, V1PaymentIntentAmountCapturableUpdatedEvent, V1PaymentIntentCanceledEvent, V1PaymentIntentCreatedEvent, V1PaymentIntentPartiallyFundedEvent, V1PaymentIntentPaymentFailedEvent, V1PaymentIntentProcessingEvent, V1PaymentIntentRequiresActionEvent, V1PaymentIntentSucceededEvent, V1PaymentLinkCreatedEvent, V1PaymentLinkUpdatedEvent, V1PaymentMethodAttachedEvent, V1PaymentMethodAutomaticallyUpdatedEvent, V1PaymentMethodDetachedEvent, V1PaymentMethodUpdatedEvent, V1PayoutCanceledEvent, V1PayoutCreatedEvent, V1PayoutFailedEvent, V1PayoutPaidEvent, V1PayoutReconciliationCompletedEvent, V1PayoutUpdatedEvent, V1PersonCreatedEvent, V1PersonDeletedEvent, V1PersonUpdatedEvent, V1PlanCreatedEvent, V1PlanDeletedEvent, V1PlanUpdatedEvent, V1PriceCreatedEvent, V1PriceDeletedEvent, V1PriceUpdatedEvent, V1ProductCreatedEvent, V1ProductDeletedEvent, V1ProductUpdatedEvent, V1PromotionCodeCreatedEvent, V1PromotionCodeUpdatedEvent, V1QuoteAcceptedEvent, V1QuoteCanceledEvent, V1QuoteCreatedEvent, V1QuoteFinalizedEvent, V1RadarEarlyFraudWarningCreatedEvent, V1RadarEarlyFraudWarningUpdatedEvent, V1RefundCreatedEvent, V1RefundFailedEvent, V1RefundUpdatedEvent, V1ReviewClosedEvent, V1ReviewOpenedEvent, V1SetupIntentCanceledEvent, V1SetupIntentCreatedEvent, V1SetupIntentRequiresActionEvent, V1SetupIntentSetupFailedEvent, V1SetupIntentSucceededEvent, V1SigmaScheduledQueryRunCreatedEvent, V1SourceCanceledEvent, V1SourceChargeableEvent, V1SourceFailedEvent, V1SourceRefundAttributesRequiredEvent, V1SubscriptionScheduleAbortedEvent, V1SubscriptionScheduleCanceledEvent, V1SubscriptionScheduleCompletedEvent, V1SubscriptionScheduleCreatedEvent, V1SubscriptionScheduleExpiringEvent, V1SubscriptionScheduleReleasedEvent, V1SubscriptionScheduleUpdatedEvent, V1TaxRateCreatedEvent, V1TaxRateUpdatedEvent, V1TerminalReaderActionFailedEvent, V1TerminalReaderActionSucceededEvent, V1TerminalReaderActionUpdatedEvent, V1TestHelpersTestClockAdvancingEvent, V1TestHelpersTestClockCreatedEvent, V1TestHelpersTestClockDeletedEvent, V1TestHelpersTestClockInternalFailureEvent, V1TestHelpersTestClockReadyEvent, V1TopupCanceledEvent, V1TopupCreatedEvent, V1TopupFailedEvent, V1TopupReversedEvent, V1TopupSucceededEvent, V1TransferCreatedEvent, V1TransferReversedEvent, V1TransferUpdatedEvent, V2BillingBillSettingUpdatedEvent, V2BillingCadenceBilledEvent, V2BillingCadenceCanceledEvent, V2BillingCadenceCreatedEvent, V2BillingLicensedItemCreatedEvent, V2BillingLicensedItemUpdatedEvent, V2BillingLicenseFeeCreatedEvent, V2BillingLicenseFeeUpdatedEvent, V2BillingLicenseFeeVersionCreatedEvent, V2BillingMeteredItemCreatedEvent, V2BillingMeteredItemUpdatedEvent, V2BillingPricingPlanComponentCreatedEvent, V2BillingPricingPlanComponentUpdatedEvent, V2BillingPricingPlanCreatedEvent, V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent, V2BillingPricingPlanSubscriptionCollectionCurrentEvent, V2BillingPricingPlanSubscriptionCollectionPastDueEvent, V2BillingPricingPlanSubscriptionCollectionPausedEvent, V2BillingPricingPlanSubscriptionCollectionUnpaidEvent, V2BillingPricingPlanSubscriptionServicingActivatedEvent, V2BillingPricingPlanSubscriptionServicingCanceledEvent, V2BillingPricingPlanSubscriptionServicingPausedEvent, V2BillingPricingPlanUpdatedEvent, V2BillingPricingPlanVersionCreatedEvent, V2BillingRateCardCreatedEvent, V2BillingRateCardRateCreatedEvent, V2BillingRateCardSubscriptionActivatedEvent, V2BillingRateCardSubscriptionCanceledEvent, V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent, V2BillingRateCardSubscriptionCollectionCurrentEvent, V2BillingRateCardSubscriptionCollectionPastDueEvent, V2BillingRateCardSubscriptionCollectionPausedEvent, V2BillingRateCardSubscriptionCollectionUnpaidEvent, V2BillingRateCardSubscriptionServicingActivatedEvent, V2BillingRateCardSubscriptionServicingCanceledEvent, V2BillingRateCardSubscriptionServicingPausedEvent, V2BillingRateCardUpdatedEvent, V2BillingRateCardVersionCreatedEvent, V2CoreAccountClosedEvent, V2CoreAccountCreatedEvent, V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationCustomerUpdatedEvent, V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationMerchantUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientUpdatedEvent, V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationStorerUpdatedEvent, V2CoreAccountIncludingDefaultsUpdatedEvent, V2CoreAccountIncludingIdentityUpdatedEvent, V2CoreAccountIncludingRequirementsUpdatedEvent, V2CoreAccountLinkReturnedEvent, V2CoreAccountPersonCreatedEvent, V2CoreAccountPersonDeletedEvent, V2CoreAccountPersonUpdatedEvent, V2CoreAccountUpdatedEvent, V2CoreClaimableSandboxClaimedEvent, V2CoreClaimableSandboxCreatedEvent, V2CoreClaimableSandboxExpiredEvent, V2CoreClaimableSandboxExpiringEvent, V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent, V2CoreEventDestinationPingEvent, V2CoreHealthApiErrorFiringEvent, V2CoreHealthApiErrorResolvedEvent, V2CoreHealthApiLatencyFiringEvent, V2CoreHealthApiLatencyResolvedEvent, V2CoreHealthAuthorizationRateDropFiringEvent, V2CoreHealthAuthorizationRateDropResolvedEvent, V2CoreHealthEventGenerationFailureResolvedEvent, V2CoreHealthFraudRateIncreasedEvent, V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent, V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent, V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent, V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent, V2CoreHealthPaymentMethodErrorFiringEvent, V2CoreHealthPaymentMethodErrorResolvedEvent, V2CoreHealthTrafficVolumeDropFiringEvent, V2CoreHealthTrafficVolumeDropResolvedEvent, V2CoreHealthWebhookLatencyFiringEvent, V2CoreHealthWebhookLatencyResolvedEvent, V2MoneyManagementAdjustmentCreatedEvent, V2MoneyManagementFinancialAccountCreatedEvent, V2MoneyManagementFinancialAccountUpdatedEvent, V2MoneyManagementFinancialAddressActivatedEvent, V2MoneyManagementFinancialAddressFailedEvent, V2MoneyManagementInboundTransferAvailableEvent, V2MoneyManagementInboundTransferBankDebitFailedEvent, V2MoneyManagementInboundTransferBankDebitProcessingEvent, V2MoneyManagementInboundTransferBankDebitQueuedEvent, V2MoneyManagementInboundTransferBankDebitReturnedEvent, V2MoneyManagementInboundTransferBankDebitSucceededEvent, V2MoneyManagementOutboundPaymentCanceledEvent, V2MoneyManagementOutboundPaymentCreatedEvent, V2MoneyManagementOutboundPaymentFailedEvent, V2MoneyManagementOutboundPaymentPostedEvent, V2MoneyManagementOutboundPaymentReturnedEvent, V2MoneyManagementOutboundPaymentUpdatedEvent, V2MoneyManagementOutboundTransferCanceledEvent, V2MoneyManagementOutboundTransferCreatedEvent, V2MoneyManagementOutboundTransferFailedEvent, V2MoneyManagementOutboundTransferPostedEvent, V2MoneyManagementOutboundTransferReturnedEvent, V2MoneyManagementOutboundTransferUpdatedEvent, V2MoneyManagementPayoutMethodUpdatedEvent, V2MoneyManagementReceivedCreditAvailableEvent, V2MoneyManagementReceivedCreditFailedEvent, V2MoneyManagementReceivedCreditReturnedEvent, V2MoneyManagementReceivedCreditSucceededEvent, V2MoneyManagementReceivedDebitCanceledEvent, V2MoneyManagementReceivedDebitFailedEvent, V2MoneyManagementReceivedDebitPendingEvent, V2MoneyManagementReceivedDebitSucceededEvent, V2MoneyManagementReceivedDebitUpdatedEvent, V2MoneyManagementRecipientVerificationCreatedEvent, V2MoneyManagementRecipientVerificationUpdatedEvent, V2MoneyManagementTransactionCreatedEvent, V2MoneyManagementTransactionUpdatedEvent, V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent, V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent, V2PaymentsOffSessionPaymentCanceledEvent, V2PaymentsOffSessionPaymentCreatedEvent, V2PaymentsOffSessionPaymentFailedEvent, V2PaymentsOffSessionPaymentRequiresCaptureEvent, V2PaymentsOffSessionPaymentSucceededEvent

public class Event extends StripeObject implements HasId, StripeActiveObject
Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate thin events which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. Retrieve the event object for additional data about the event. Use the related object ID in the event payload to fetch the API resource of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload.
  • Constructor Details

    • Event

      public Event()
  • Method Details

    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • fetchRelatedObject

      protected StripeObject fetchRelatedObject(Event.RelatedObject relatedObject) throws StripeException
      Retrieves the object associated with the event.
      Throws:
      StripeException
    • parse

      public static Event parse(String payload)
      Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON.
      Parameters:
      payload - the payload sent by Stripe.
      Returns:
      the StripeEvent instance
    • getChanges

      public Map<String,Object> getChanges()
      Before and after changes for the primary related object.
    • getContext

      public String getContext()
      Authentication context needed to fetch the event or related object.
    • getCreated

      public Instant getCreated()
      Time at which the object was created.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value of the object field.

      Equal to v2.core.event.

    • getReason

      public Event.Reason getReason()
      Reason for the event.
    • getType

      public String getType()
      The type of the event.
    • getV1EventId

      public String getV1EventId()
      For interop events, this is the snapshot event ID.
    • getResponseGetter

      public StripeResponseGetter getResponseGetter()
    • setChanges

      public void setChanges(Map<String,Object> changes)
      Before and after changes for the primary related object.
    • setContext

      public void setContext(String context)
      Authentication context needed to fetch the event or related object.
    • setCreated

      public void setCreated(Instant created)
      Time at which the object was created.
    • setId

      public void setId(String id)
      Unique identifier for the event.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value of the object field.

      Equal to v2.core.event.

    • setReason

      public void setReason(Event.Reason reason)
      Reason for the event.
    • setType

      public void setType(String type)
      The type of the event.
    • setV1EventId

      public void setV1EventId(String v1EventId)
      For interop events, this is the snapshot event ID.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the event.
      Specified by:
      getId in interface HasId