Class PaymentFailedEvent
- Namespace
- Compendium.Core.Domain.Events.Integration
- Assembly
- Compendium.Core.dll
Integration event raised when a payment fails.
public sealed record PaymentFailedEvent : IntegrationEventBase, IIntegrationEvent, IEquatable<IntegrationEventBase>, IEquatable<PaymentFailedEvent>
- Inheritance
-
PaymentFailedEvent
- Implements
- Inherited Members
Constructors
PaymentFailedEvent(string, string, string?, long, string, string?, string?, int)
Integration event raised when a payment fails.
public PaymentFailedEvent(string PaymentId, string CustomerId, string? SubscriptionId, long Amount, string Currency, string? FailureCode, string? FailureMessage, int AttemptCount)
Parameters
PaymentIdstringThe unique identifier of the payment.
CustomerIdstringThe unique identifier of the customer.
SubscriptionIdstringThe subscription identifier, if applicable.
AmountlongThe payment amount in the smallest currency unit (e.g., cents).
CurrencystringThe currency code (e.g., USD, EUR).
FailureCodestringThe failure code from the payment provider.
FailureMessagestringThe failure message from the payment provider.
AttemptCountintThe number of payment attempts.
Properties
Amount
The payment amount in the smallest currency unit (e.g., cents).
public long Amount { get; init; }
Property Value
AttemptCount
The number of payment attempts.
public int AttemptCount { get; init; }
Property Value
Currency
The currency code (e.g., USD, EUR).
public string Currency { get; init; }
Property Value
CustomerId
The unique identifier of the customer.
public string CustomerId { get; init; }
Property Value
EventType
Gets the name of the event type for serialization and routing purposes.
public override string EventType { get; }
Property Value
FailureCode
The failure code from the payment provider.
public string? FailureCode { get; init; }
Property Value
FailureMessage
The failure message from the payment provider.
public string? FailureMessage { get; init; }
Property Value
PaymentId
The unique identifier of the payment.
public string PaymentId { get; init; }
Property Value
SubscriptionId
The subscription identifier, if applicable.
public string? SubscriptionId { get; init; }