Cryptographic Price Quotes & Checkouts
HMAC-SHA256 price seals, tamper-evident checkout validation, and 15-minute quote expiration.
Price quotes lock calculated fees during the checkout process, cryptographically preventing price tampering.
HMAC-SHA256 Price Seals
Every price quote is sealed with an HMAC signature preventing client-side modification of calculated costs.
src/Modules/CatalogPricing/CatalogPricing.Domain/Entities/PriceQuote.csC#
public sealed class PriceQuote : TenantAggregateRoot
{
public Guid QuotationReferenceId { get; private set; }
public decimal SubtotalAmount { get; private set; }
public decimal DiscountAmount { get; private set; }
public decimal TaxAmount { get; private set; }
public decimal FinalAmount { get; private set; }
public string Currency { get; private set; } = "USD";
public DateTimeOffset ExpiresAtUtc { get; private set; }
public string CryptographicSignature { get; private set; } = string.Empty;
public bool IsValidAt(DateTimeOffset timestamp) =>
timestamp <= ExpiresAtUtc && !IsConsumed;
}Verification Hand-off to Gateway
The checkout gateway verifies signature validity and timestamp before charging the payment method.
Price Quote APIs
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/v1/pricing/quotes/calculate | Calculate quotation with applicable dynamic rules | 🔒 Required |
| GET | /api/v1/pricing/quotes/{id} | Retrieve existing price quote by ID | 🔒 Required |