Class PaymentChargeRequest
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
CustomerIdstringWho is charged.
PaymentMethodIdstringWhich saved method; null for the customer's default, which is what a scheduled bill wants.
AmountMinorlongHow 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.
CurrencyCodestringISO 4217, in any case.
DescriptionstringWhat the customer sees on their statement.
IdempotencyKeystringThe 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.
TransferGroupstringTies this charge to the transfers paid out of it, for providers that support it.
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 — 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
CurrencyCode
ISO 4217, in any case.
public string CurrencyCode { get; init; }
Property Value
CustomerId
Who is charged.
public string CustomerId { get; init; }
Property Value
Description
What the customer sees on their statement.
public string? Description { get; init; }
Property Value
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
Metadata
Carried on the provider's object; the caller's own identifiers belong here.
public IDictionary<string, string>? Metadata { get; init; }
Property Value
PaymentMethodId
Which saved method; null for the customer's default, which is what a scheduled bill wants.
public string? PaymentMethodId { get; init; }
Property Value
TransferGroup
Ties this charge to the transfers paid out of it, for providers that support it.
public string? TransferGroup { get; init; }