Skip to content

Subscriptions and billing ​

A subscription holds native coin (PLS) and pays for requests from the consumer contracts you add to it.

ActionWhoHow
Createanyone (you become owner)createSubscription() · verity sub create --fund 10
FundanyonefundSubscription(subId) with value · verity sub fund <id> 2.5
Add/remove consumer (max 100)owneraddConsumer / removeConsumer · verity sub add-consumer
Transfer ownershipowner, then new owner acceptsrequestSubscriptionOwnerTransfer → acceptSubscriptionOwnerTransfer
Cancel and refundowner, when nothing is pendingcancelSubscription(subId, to) · verity sub cancel <id>

Reservations ​

When a consumer requests randomness, the coordinator reserves the request's worst-case cost from the subscription:

reserve = (callbackGasLimit + fulfillmentGasOverhead) × lane max gas price × (100 + premium%) / 100 + protocol flat fee

At fulfilment you pay the actual cost (never more than the reservation), and the rest is released. A request fails with InsufficientBalance if balance − reserved cannot cover its reservation, so keep a buffer. getSubscription(subId) returns the balance, reserved amount, pending request count, owner and consumers.

See Pricing for the full fee formula and worked numbers.

Removing a consumer ​

Requests the consumer already made still complete and are billed. A subscription cannot be cancelled while requests are pending: they must be fulfilled or cancelled first (see timeouts), so operators are always paid for work in flight.

Testnet: PulseChain testnet v4. Unaudited software; do not use on mainnet yet.