# Stacks Path Stripe Checkout returns default to `config.app.url`. Deployments with a separate browser frontend can explicitly list its bare origin in `config.payment.checkoutReturnOrigins`, for example `['https://app.example.com']`. Only exact HTTP origins are accepted. Paths, credentials and wildcards are refused; checkout callers cannot supply additional trusted origins. Easily work with file paths. ## โ˜˜๏ธ Features - Ensures paths are normalized across all Operating Systems - Easily access the path's basename, dirname, extension, filename, and more - Drop-in Node.js module replacement - Written in modern ESM/TypeScript ## ๐Ÿค– Usage ```bash bun install -d @stacksjs/path ``` Now, you can easily access it in your project: ```js import { filename, normalizeAliases, resolve, resolveAlias } from '@stacksjs/path' // and more... ``` To view the full documentation, please visit [h](https://stacksjs.com/path). ## ๐Ÿงช Testing ```bash bun test ``` ## ๐Ÿ“ˆ Changelog Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently. ## ๐Ÿšœ Contributing Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details. ## ๐Ÿ Community For help, discussion about best practices, or any other conversation that would benefit from being searchable: [Discussions on GitHub](https://github.com/stacksjs/stacks/discussions) For casual chit-chat with others using this package: [Join the Stacks Discord Server](https://stacksjs.com/discord) ## ๐Ÿ™๐Ÿผ Credits Many thanks to the following core technologies & people who have contributed to this package: - [Chris Breuer](https://github.com/chrisbbreuer) - [All Contributors](../../contributors) ## ๐Ÿ“„ License The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information. Made with ๐Ÿ’™ ## Direct-charge financial reconciliation `directChargeFinancials(paymentIntentId, originalAccount)` reads canonical provider facts on the payment's original connected account. It returns the successful charge, every refund and dispute, its application fee and fee refunds, and their balance transactions. Platform fee reads stay on the platform. All lists are paginated, ownership is verified, and incomplete pagination fails. Importing the helper does not initialize Stripe. Call after acquiring the application's payment lock. Persist immutable movement IDs with their account scope, and use the normal durable queue to retry `DirectChargeFinancialsPendingError`: fees and balance transactions can appear asynchronously. A missing fee is never inferred to be zero. Do not expose the returned Stripe objects in public responses. Balance amounts, fees and net remain in their actual settlement currency with the provider exchange rate. Contributor allocations belong in their own presentment-currency ledger; a dispute status alone does not prove reinstatement, and a charge refund does not prove that the application fee was returned. `directChargeFeeAmounts(facts)` uses the application fee's canonical `amount_refunded` in its declared currency. Individual fee refunds can settle in another currency; their amounts are never added across currencies. When the fee and charge share a currency, partial and full returns are exact. When they differ, only a fully retained or fully returned fee establishes exact presentment cents; partial returns require review without an inferred exchange rate. See Stripe's [application fee object](https://docs.stripe.com/api/application_fees/object). References: [direct charges](https://docs.stripe.com/connect/direct-charges), [refund pagination](https://docs.stripe.com/api/refunds/list), [disputes](https://docs.stripe.com/api/disputes/list), [application fees](https://docs.stripe.com/api/application_fees/list).