An active stream represents funded, running payment obligations. Builders wrap choices on the ActivePaymentStream template (and related fund / lock helpers). buildProcessPaymentCommand returns CommandWithDisclosedContracts (often empty in the builder) and is the main day-forwarding payment path; supply a processingPeriod RelTime string (microseconds) and paymentContext from utils.
Receiver
ocp.PaymentStreams.activePaymentStream
Highlights
buildProcessPaymentCommand(params)
paymentStreamContractId(required) — Active stream contract id.processingPeriod(required) — RelTime microseconds string; converted withrelTimeToDAML.paymentContext(required) —{ amuletRulesCid, openMiningRoundCid, featuredAppRight: string | null }.skipProcessorPayment(optional) — defaultfalse.activityMarkerFeaturedAppRightCid(optional) — defaultnull.
Returns: CommandWithDisclosedContracts — ActivePaymentStream_ProcessPayment.
buildProcessFreeTrialCommand, buildCancelCommand, buildProposeChangesCommand, buildRefundCommand, buildArchiveInactivePaymentStreamCommand, buildChangePartyCommand
Each wraps a single DAML choice on ActivePaymentStream (or inactive archival):
- Cancel —
CancelPaymentStreamParams:paymentStreamContractId,actor, optionaldisregardAvailablePaidPeriod,description,openMiningRoundCid. - Others — see source files for full field lists (
proposeChanges.ts,refund.ts,processFreeTrial.ts,archiveInactivePaymentStream.ts,changeParty.ts).
Fund management (also on namespace)
The extension re-exports buildAddFundsCommand, buildWithdrawFundsCommand, buildReplaceLockedAmuletCommand from sibling modules for locking / liquidity adjustments—see activePaymentStream/index.ts in the SDK.
Errors
Builders do not throw Ocp*. Ledger rules enforce balances, periods, and authorization.
Auth and disclosure
Processing payments usually requires submitting with the correct acting parties and attaching validator-derived disclosure for Amulet rules, mining round, and any featured-app-right contracts—assemble via ocp.PaymentStreams.utils.buildPaymentContext when using the recommended path.