/** * Build a deterministic Stripe idempotency key for an operation. * The `scope` should be a stable string identifying the call site * (e.g. `'customer.create'`, `'subscription.create'`); `parts` are * any extra identifying values (user id, lookup key, etc.) that * uniquely scope the operation within that user's lifetime. * * @param scope - stable operation name; never user input * @param parts - identifying values appended after scope (coerced * to string; nullish values are skipped) */ export declare function stacksIdempotencyKey(scope: string, ...parts: Array): string; /** * Build a one-shot idempotency key for operations that are NOT * naturally retryable (a unique-per-attempt key that won't collide * with anything). Used when the caller WANTS a fresh Stripe object * each time but still wants the safety of a single network retry * within a single attempt. The key includes a random suffix so * sequential attempts produce different keys. * * Used for payment intents, checkout sessions — operations where * "create another one" is the right semantic on a retry by the * caller, but where a single network blip during a single attempt * still benefits from in-flight idempotency. */ export declare function freshIdempotencyKey(scope: string, ...parts: Array): string;