Table of Contents

Class PaymentChargeRequest

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

What one charge needs.

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

Constructors

PaymentChargeRequest(string, string?, long, string, string?, string, string?, IDictionary<string, string>?)

What one charge needs.

public PaymentChargeRequest(string CustomerId, string? PaymentMethodId, long AmountMinor, string CurrencyCode, string? Description, string IdempotencyKey, string? TransferGroup = null, IDictionary<string, string>? Metadata = null)

Parameters

CustomerId string

Who is charged.

PaymentMethodId string

Which saved method; null for the customer's default, which is what a scheduled bill wants.

AmountMinor long

How much, in the currency's minor units — 4990 is BRL 49.90, 1000 is JPY 1,000. Providers count money this way because a decimal cannot say what a currency's smallest coin is.

CurrencyCode string

ISO 4217, in any case.

Description string

What the customer sees on their statement.

IdempotencyKey string

The caller's own key. Sending the same key twice returns the first answer instead of charging twice, which is what makes a retried job safe. It is the caller's because only the caller knows what "the same charge" means — and a key that has already answered a failure will keep answering it, so a retry after a refusal needs a key of its own.

TransferGroup string

Ties this charge to the transfers paid out of it, for providers that support it.

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 — 4990 is BRL 49.90, 1000 is JPY 1,000. Providers count money this way because a decimal cannot say what a currency's smallest coin is.

public long AmountMinor { get; init; }

Property Value

long

CurrencyCode

ISO 4217, in any case.

public string CurrencyCode { get; init; }

Property Value

string

CustomerId

Who is charged.

public string CustomerId { get; init; }

Property Value

string

Description

What the customer sees on their statement.

public string? Description { get; init; }

Property Value

string

IdempotencyKey

The caller's own key. Sending the same key twice returns the first answer instead of charging twice, which is what makes a retried job safe. It is the caller's because only the caller knows what "the same charge" means — and a key that has already answered a failure will keep answering it, so a retry after a refusal needs a key of its own.

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>

PaymentMethodId

Which saved method; null for the customer's default, which is what a scheduled bill wants.

public string? PaymentMethodId { get; init; }

Property Value

string

TransferGroup

Ties this charge to the transfers paid out of it, for providers that support it.

public string? TransferGroup { get; init; }

Property Value

string