Table of Contents

Class PaymentRefundRequest

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

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

PaymentId string

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.

AmountMinor long

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.

Reason string

Why, for the provider's own record. Free text; providers vary.

IdempotencyKey string

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.

Metadata IDictionary<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

long

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

string

Metadata

Carried on the provider's object; the caller's own identifiers belong here.

public IDictionary<string, string>? Metadata { get; init; }

Property Value

IDictionary<string, string>

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

string

Reason

Why, for the provider's own record. Free text; providers vary.

public string? Reason { get; init; }

Property Value

string