Class SubscriptionRequest
A subscription started by the caller, charged to a payment method the customer already saved.
public record SubscriptionRequest : IEquatable<SubscriptionRequest>
- Inheritance
-
SubscriptionRequest
- Implements
- Inherited Members
Constructors
SubscriptionRequest(string, string, string?, IDictionary<string, string>?, string?)
A subscription started by the caller, charged to a payment method the customer already saved.
public SubscriptionRequest(string CustomerId, string PriceLookupKey, string? PaymentMethodId = null, IDictionary<string, string>? Metadata = null, string? IdempotencyKey = null)
Parameters
CustomerIdstringWho pays.
PriceLookupKeystringThe lookup key of the price to subscribe to.
PaymentMethodIdstringThe saved method to charge; the customer's default when null.
MetadataIDictionary<string, string>Stored on the subscription; the caller's own identifiers belong here.
IdempotencyKeystringMakes a retried request start one subscription, not two.
Properties
CustomerId
Who pays.
public string CustomerId { get; init; }
Property Value
IdempotencyKey
Makes a retried request start one subscription, not two.
public string? IdempotencyKey { get; init; }
Property Value
Metadata
Stored on the subscription; the caller's own identifiers belong here.
public IDictionary<string, string>? Metadata { get; init; }
Property Value
PaymentMethodId
The saved method to charge; the customer's default when null.
public string? PaymentMethodId { get; init; }
Property Value
PriceLookupKey
The lookup key of the price to subscribe to.
public string PriceLookupKey { get; init; }