Class PaymentEventDTO
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
EventIdstringThe 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.
TypePaymentEventTypeWhat the event is, in terms a caller can act on.
ProviderTypestringThe provider's own name for it, kept for the record a caller writes: it says what really arrived, including for Unknown.
PayeeAccountIdstringThe payee account the event is about, when it is about one.
ObjectIdstringThe identifier of what the event happened to — a payment, an account.
CustomerIdstringThe customer the event is about, when it names one.
PaymentMethodIdstringThe payment method the event is about, when it names one.
FailureReasonstringWhy the provider refused, on an event that reports a refusal.
PayloadJsonstringThe 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
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
FailureReason
Why the provider refused, on an event that reports a refusal.
public string? FailureReason { get; init; }
Property Value
ObjectId
The identifier of what the event happened to — a payment, an account.
public string? ObjectId { get; init; }
Property Value
PayeeAccountId
The payee account the event is about, when it is about one.
public string? PayeeAccountId { get; init; }
Property Value
PayloadJson
The raw body, exactly as it was signed.
public string PayloadJson { get; init; }
Property Value
PaymentMethodId
The payment method the event is about, when it names one.
public string? PaymentMethodId { get; init; }
Property Value
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
Type
What the event is, in terms a caller can act on.
public PaymentEventType Type { get; init; }