Skip to main content

Payment, refund, and subscription lifecycle

Orders and payments

Only the merchant can create an Order from a Product. Paying requires the snapshotted Coin type and exact amount. The SDK can merge fragmented Coin objects, split the required amount in the same PTB, and leave change with the payer.

With a refund window of zero, funds transfer to the snapshotted receiver and the Payment is immediately settled. For a window from 1 ms through 90 days, funds remain in Payment<T> until refund or settlement.

The original payer may have at most one pending refund request. The merchant may approve that exact amount or reject it before unlock. Partial refunds can accumulate up to the original amount. At unlock, any address may call settle; an unresolved request is discarded and the remaining balance can only go to the snapshotted receiver.

Subscriptions

The subscriber signs the initial purchase and every renewal. The transaction includes the expected Plan revision, so an intervening merchant edit aborts a stale purchase. Active segments extend serially; after expiry, a new segment starts at payment time. A fully refunded segment is excluded from subscription validity; a partial refund does not shorten service.