Table of Contents

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

PaymentId string

The unique identifier of the payment.

CustomerId string

The unique identifier of the customer.

SubscriptionId string

The subscription identifier, if applicable.

Amount long

The payment amount in the smallest currency unit (e.g., cents).

Currency string

The currency code (e.g., USD, EUR).

FailureCode string

The failure code from the payment provider.

FailureMessage string

The failure message from the payment provider.

AttemptCount int

The number of payment attempts.

Properties

Amount

The payment amount in the smallest currency unit (e.g., cents).

public long Amount { get; init; }

Property Value

long

AttemptCount

The number of payment attempts.

public int AttemptCount { get; init; }

Property Value

int

Currency

The currency code (e.g., USD, EUR).

public string Currency { get; init; }

Property Value

string

CustomerId

The unique identifier of the customer.

public string CustomerId { get; init; }

Property Value

string

EventType

Gets the name of the event type for serialization and routing purposes.

public override string EventType { get; }

Property Value

string

FailureCode

The failure code from the payment provider.

public string? FailureCode { get; init; }

Property Value

string

FailureMessage

The failure message from the payment provider.

public string? FailureMessage { get; init; }

Property Value

string

PaymentId

The unique identifier of the payment.

public string PaymentId { get; init; }

Property Value

string

SubscriptionId

The subscription identifier, if applicable.

public string? SubscriptionId { get; init; }

Property Value

string