Subscriptions
Wander Injected API subscription() function
Last updated
Was this helpful?
Was this helpful?
// connect to the extension
await window.arweaveWallet.connect(["ACCESS_ALL_ADDRESSES"]);
// submit the subscription information
const subscription = await window.arweaveWallet.subscription({
arweaveAccountAddress: "hY70z-mbKfDByqXh4y43ybSxReFVo1i9lB1dDdCkO_U",
applicationName: "Wander",
subscriptionName: "Wander Premium",
subscriptionManagementUrl: "https://wander.app/premium",
subscriptionFeeAmount: 0.5,
recurringPaymentFrequency: "Monthly",
subscriptionEndDate: new Date("2024-12-31"),
applicationIcon: "https://wander.app/logo",
});
// Subscription will output the details and the initial payment txn
console.log("Subscription details with paymentHistory array:", subscription);