Class SubscriptionCheckoutRequest
A provider-hosted page that starts a subscription.
public record SubscriptionCheckoutRequest : IEquatable<SubscriptionCheckoutRequest>
- Inheritance
-
SubscriptionCheckoutRequest
- Implements
- Inherited Members
Constructors
SubscriptionCheckoutRequest(string, string, string, string, string?, IDictionary<string, string>?, string?)
A provider-hosted page that starts a subscription.
public SubscriptionCheckoutRequest(string CustomerId, string PriceLookupKey, string SuccessUrl, string CancelUrl, string? ClientReferenceId = null, IDictionary<string, string>? Metadata = null, string? IdempotencyKey = null)
Parameters
CustomerIdstringWho pays. The customer must already exist at the provider.
PriceLookupKeystringThe lookup key of the price to subscribe to. A key rather than a price identifier, so a price can be replaced at the provider by moving the key without the caller changing anything.
SuccessUrlstringWhere the customer returns after paying.
CancelUrlstringWhere the customer returns if they give up.
ClientReferenceIdstringThe caller's own identifier for what is being bought, echoed on the completed checkout.
MetadataIDictionary<string, string>Stored on the subscription the checkout creates; the caller's own identifiers belong here.
IdempotencyKeystringMakes a retried request return the same page rather than open a second one.
Properties
CancelUrl
Where the customer returns if they give up.
public string CancelUrl { get; init; }
Property Value
ClientReferenceId
The caller's own identifier for what is being bought, echoed on the completed checkout.
public string? ClientReferenceId { get; init; }
Property Value
CustomerId
Who pays. The customer must already exist at the provider.
public string CustomerId { get; init; }
Property Value
IdempotencyKey
Makes a retried request return the same page rather than open a second one.
public string? IdempotencyKey { get; init; }
Property Value
Metadata
Stored on the subscription the checkout creates; the caller's own identifiers belong here.
public IDictionary<string, string>? Metadata { get; init; }
Property Value
PriceLookupKey
The lookup key of the price to subscribe to. A key rather than a price identifier, so a price can be replaced at the provider by moving the key without the caller changing anything.
public string PriceLookupKey { get; init; }
Property Value
SuccessUrl
Where the customer returns after paying.
public string SuccessUrl { get; init; }