Skip to main content
The Vowena contract exposes 17 functions covering the full subscription lifecycle. This reference documents every function with its parameters, authorization requirements, events, and error codes.
Write functions return assembled XDR via the SDK. You sign the transaction with your wallet and submit it to the network. Read functions query contract state directly and return data without requiring a transaction signature.

Functions by category

Setup

Plans

Subscriptions

Billing

Migrations

Read-only


Authorization model

Vowena uses Soroban’s require_auth() pattern. When a function requires authorization, the caller must sign the transaction with the appropriate keypair:
  • Merchant functions - the merchant address stored on the plan must sign.
  • Subscriber functions - the subscriber address stored on the subscription must sign.
  • Permissionless functions - charge() is the only write function that requires no authorization. Anyone can call it, and the contract validates all conditions on-chain.
Read-only functions (get_plan, get_subscription, etc.) never require a signature. They query contract state directly via Soroban’s simulation endpoint.

Error codes

Every error returned by the contract maps to a numeric code:

SDK vs CLI

Every function can be called through the TypeScript SDK or the Soroban CLI. The SDK wraps each function with a typed builder method that returns assembled XDR for signing. The CLI is useful for one-off operations and scripting.