Table of Contents

Class PaymentEventDTO

Namespace
NuvTools.Payment.DTOs
Assembly
NuvTools.Payment.dll

A webhook whose signature has been verified, read into the few fields a caller acts on.

public record PaymentEventDTO : IEquatable<PaymentEventDTO>
Inheritance
PaymentEventDTO
Implements
Inherited Members

Remarks

The provider client does the reading, deliberately: which field of which payload holds the customer is the provider's business, and a caller that dug it out of PayloadJson itself would be coupled to a shape it does not control.

PayloadJson is still carried, for a caller that needs something this record does not model. Treat it as the provider's, not as a contract.

Constructors

PaymentEventDTO(string, PaymentEventType, string, string?, string?, string?, string?, string?, string)

A webhook whose signature has been verified, read into the few fields a caller acts on.

public PaymentEventDTO(string EventId, PaymentEventType Type, string ProviderType, string? PayeeAccountId, string? ObjectId, string? CustomerId, string? PaymentMethodId, string? FailureReason, string PayloadJson)

Parameters

EventId string

The provider's own event identifier — the one to key idempotency on, because a provider that delivers at least once will deliver the same event twice.

Type PaymentEventType

What the event is, in terms a caller can act on.

ProviderType string

The provider's own name for it, kept for the record a caller writes: it says what really arrived, including for Unknown.

PayeeAccountId string

The payee account the event is about, when it is about one.

ObjectId string

The identifier of what the event happened to — a payment, an account.

CustomerId string

The customer the event is about, when it names one.

PaymentMethodId string

The payment method the event is about, when it names one.

FailureReason string

Why the provider refused, on an event that reports a refusal.

PayloadJson string

The raw body, exactly as it was signed.

Remarks

The provider client does the reading, deliberately: which field of which payload holds the customer is the provider's business, and a caller that dug it out of PayloadJson itself would be coupled to a shape it does not control.

PayloadJson is still carried, for a caller that needs something this record does not model. Treat it as the provider's, not as a contract.

Properties

CustomerId

The customer the event is about, when it names one.

public string? CustomerId { get; init; }

Property Value

string

EventId

The provider's own event identifier — the one to key idempotency on, because a provider that delivers at least once will deliver the same event twice.

public string EventId { get; init; }

Property Value

string

FailureReason

Why the provider refused, on an event that reports a refusal.

public string? FailureReason { get; init; }

Property Value

string

ObjectId

The identifier of what the event happened to — a payment, an account.

public string? ObjectId { get; init; }

Property Value

string

PayeeAccountId

The payee account the event is about, when it is about one.

public string? PayeeAccountId { get; init; }

Property Value

string

PayloadJson

The raw body, exactly as it was signed.

public string PayloadJson { get; init; }

Property Value

string

PaymentMethodId

The payment method the event is about, when it names one.

public string? PaymentMethodId { get; init; }

Property Value

string

ProviderType

The provider's own name for it, kept for the record a caller writes: it says what really arrived, including for Unknown.

public string ProviderType { get; init; }

Property Value

string

Type

What the event is, in terms a caller can act on.

public PaymentEventType Type { get; init; }

Property Value

PaymentEventType