@openpets/fourthwall
v1.0.3
Published
Manage your Fourthwall shop - products, orders, donations, memberships, promotions, webhooks, and more. Perfect for creators selling merchandise, memberships, and digital products.
Maintainers
Readme
Fourthwall
Manage your Fourthwall shop - products, orders, donations, memberships, promotions, webhooks, and more. Perfect for creators selling merchandise, memberships, and digital products.
Features
- Shop Management - Get shop info and contact details
- Products - List, search, and manage product availability
- Orders - List orders, filter by status/date, get order details
- Donations - Track supporter donations
- Memberships - Manage membership tiers and members (requires enablement)
- Webhooks - Configure webhook endpoints (requires enablement)
- Streaming - Twitch streaming integration (requires enablement)
- Promotions - Create and manage promotions (requires enablement)
- Giveaways - Create giveaway links and manage draws (requires enablement)
Quick Start
1. Get API Credentials
- Log in to your Fourthwall dashboard
- Navigate to Settings > For Developers
- Click Create API User under the Open API section
- Copy your username (API key) and password
2. Configure Environment
# Copy the example env file
cp .env.example .env
# Edit .env with your credentials
FOURTHWALL_API_USERNAME=your_api_username
FOURTHWALL_API_PASSWORD=your_api_password3. Test Connection
opencode run "test fourthwall connection" --print-logsAvailable Tools
Core Tools (Always Loaded)
| Tool | Description |
|------|-------------|
| fourthwall-test-connection | Test API connection status |
| fourthwall-get-current-shop | Get current shop info |
| fourthwall-get-current-shop-contact-info | Get shop contact info |
| fourthwall-get-products | List all products (with pagination, search) |
| fourthwall-get-product-by-product-id | Get product by ID |
| fourthwall-get-product-inventory | Get product inventory |
| fourthwall-update-offer-availability | Update product availability |
| fourthwall-get-orders | List orders (with filtering) |
| fourthwall-get-order-by-order-id | Get order by ID |
| fourthwall-get-order-by-friendly-id | Get order by friendly ID |
| fourthwall-mark-digital-download-as-downloaded | Mark digital download as downloaded |
| fourthwall-get-donations | List all donations |
| fourthwall-get-donation-by-id | Get donation by ID |
Optional Tool Groups
Enable additional tools by setting environment variables:
Webhooks (FOURTHWALL_LOAD_WEBHOOKS_TOOLS=true)
fourthwall-get-webhook-configurations- List webhooksfourthwall-get-webhook-configuration- Get webhook by IDfourthwall-create-webhook-configuration- Create webhookfourthwall-update-webhook-configuration- Update webhookfourthwall-delete-webhook-configuration- Delete webhook
Streaming (FOURTHWALL_LOAD_STREAMING_TOOLS=true)
fourthwall-streaming-status- Get streaming statusfourthwall-streaming-started- Set streaming to startedfourthwall-streaming-ended- Set streaming to ended
Memberships (FOURTHWALL_LOAD_BETA__MEMBERSHIPS_TOOLS=true)
fourthwall-list-tiers- List membership tiersfourthwall-list-memberships- List membersfourthwall-get-member- Get member by ID
Promotions (FOURTHWALL_LOAD_PROMOTIONS_TOOLS=true)
fourthwall-get-promotions- List promotionsfourthwall-get-promotions-1- Get promotion by IDfourthwall-create-promotion- Create promotion
Giveaway Links (FOURTHWALL_LOAD_GIVEAWAY_LINKS_TOOLS=true)
fourthwall-get-all-giveaway-links-packages- List giveaway packagesfourthwall-get-giveaway-links-by-package-id- Get giveaway links by packagefourthwall-create-giveaway-links- Create giveaway links
Gifting (FOURTHWALL_LOAD_GIFTING_TOOLS=true)
fourthwall-get-draw- Get draw detailsfourthwall-draw-finished- Finish draw and select winners
Fulfillment (FOURTHWALL_LOAD_FULFILLMENT_TOOLS=true)
fourthwall-create-fulfillment- Create fulfillment with shipping tracker
Thank Yous (FOURTHWALL_LOAD_THANK_YOUS_TOOLS=true)
fourthwall-get-gift-purchase-by-id- Get Thank You by ID
Mailing Lists (FOURTHWALL_LOAD_MAILING_LISTS_TOOLS=true)
fourthwall-get-mailing-list-entries- Get mailing list entries
Twitch Gift Purchases (FOURTHWALL_LOAD_TWITCH_GIFT_PURCHASES_TOOLS=true)
fourthwall-get-gift-purchase-by-id-1- Get gift purchase by ID
Example Queries
# Shop info
opencode run "get my fourthwall shop info"
opencode run "get my shop contact info"
# Products
opencode run "list all products in my fourthwall shop"
opencode run "search for t-shirt products"
opencode run "get product details for ID abc123"
opencode run "get inventory for product ID abc123"
# Orders
opencode run "list recent orders"
opencode run "list orders from the last week"
opencode run "get order with friendly ID D3XZFWPP"
opencode run "list shipped orders"
# Donations
opencode run "list all donations"
opencode run "show recent donations"
# Memberships (requires FOURTHWALL_LOAD_BETA__MEMBERSHIPS_TOOLS=true)
opencode run "list membership tiers"
opencode run "list all members"Order Status Values
Orders can have these statuses:
CONFIRMED- Order confirmedPARTIALLY_IN_PRODUCTION- Some items in productionIN_PRODUCTION- All items in productionPARTIALLY_SHIPPED- Some items shippedSHIPPED- All items shippedPARTIALLY_DELIVERED- Some items deliveredDELIVERED- All items deliveredCANCELLED- Order cancelledCOMPLETED- Order completed
Authentication
Fourthwall uses Basic Authentication. The plugin automatically encodes your API key (username) and password into the proper Authorization: Basic <base64> header format.
Read-Only Mode
You can enable read-only mode to prevent write operations:
pets read-only fourthwall onThis will filter out tools that modify data (create, update, delete operations).
API Documentation
Regenerating Tools
If the Fourthwall API changes, regenerate the OpenAPI client:
cd pets/fourthwall
pets generate-openapiTroubleshooting
"Authentication failed" error
- Verify your API key and password are correct
- Ensure you're using the username/password from the API User (not your login credentials)
- Check that the API user has been created in your Fourthwall dashboard
"Tool not found" errors
- Some tools require enabling via environment variables
- Check the "Optional Tool Groups" section above
- Verify the env var is set to exactly
"true"
Rate limiting
- Fourthwall may rate limit API requests
- Add delays between rapid consecutive calls if needed
