Class PaymentRefundRequest
What one refund needs.
public record PaymentRefundRequest : IEquatable<PaymentRefundRequest>
- Inheritance
-
PaymentRefundRequest
- Implements
- Inherited Members
Constructors
PaymentRefundRequest(string, long, string?, string, IDictionary<string, string>?)
What one refund needs.
public PaymentRefundRequest(string PaymentId, long AmountMinor, string? Reason, string IdempotencyKey, IDictionary<string, string>? Metadata = null)
Parameters
PaymentIdstringThe payment being given back, as the provider named it when it was taken — not the customer. A refund belongs to one payment, because that is what the money can travel back along.
AmountMinorlongHow much, in the currency's minor units. Always stated rather than defaulted to the whole payment: a partial refund is the common case for a marketplace crediting one line of an invoice, and a null that quietly meant "all of it" is the kind of default that refunds a month when somebody meant to refund a day.
ReasonstringWhy, for the provider's own record. Free text; providers vary.
IdempotencyKeystringThe caller's own key. Refunding twice gives away the money twice and cannot be taken back, so this is as load-bearing here as it is on a transfer.
MetadataIDictionary<string, string>Carried on the provider's object; the caller's own identifiers belong here.
Properties
AmountMinor
How much, in the currency's minor units. Always stated rather than defaulted to the whole payment: a partial refund is the common case for a marketplace crediting one line of an invoice, and a null that quietly meant "all of it" is the kind of default that refunds a month when somebody meant to refund a day.
public long AmountMinor { get; init; }
Property Value
IdempotencyKey
The caller's own key. Refunding twice gives away the money twice and cannot be taken back, so this is as load-bearing here as it is on a transfer.
public string IdempotencyKey { get; init; }
Property Value
Metadata
Carried on the provider's object; the caller's own identifiers belong here.
public IDictionary<string, string>? Metadata { get; init; }
Property Value
PaymentId
The payment being given back, as the provider named it when it was taken — not the customer. A refund belongs to one payment, because that is what the money can travel back along.
public string PaymentId { get; init; }
Property Value
Reason
Why, for the provider's own record. Free text; providers vary.
public string? Reason { get; init; }