Fungies.io Help Center
  • 🙌Getting Started
  • Customize your online store
    • General Settings
    • Header
    • Footer
    • Add New Page
    • Add Page Section
    • Text Section
    • Image Section
    • Video Section
    • Gallery Section
    • Points Section
    • Slider Section
    • Recent Products Section
    • Custom Style
  • Add Subscription Product
  • Add Digital Downloads
  • Add Game Keys
  • Add Mobile Game Assets
  • Variants of the product
  • 🛠️Workspace Settings
    • Connect your Stripe account
    • Sandbox Mode
    • Team Management
  • 🧮Store Settings
    • Publish your store
    • Previewing The Store
    • Edit Explore / Search Page (Built-in)
    • Edit Product Page (Built-in)
      • Customize Review Categories
    • Set up Custom Domain
      • Migrating your domain to Cloudflare
  • Tax-inclusive Pricing
  • 🤑Getting Paid
    • Test Payments
    • Checkout Choice
      • Hosted Checkout
      • Overlay Checkout
      • Embedded Checkout
    • Global Availability
    • Customer Payment Methods
      • PayPal Settings
    • Billing Details
    • Payouts
    • Editing Statement Descriptor
    • Transactions Reports
    • Example React checkout
  • 👨‍💻FOR SAAS DEVELOPERS
    • Hosted Checkout (more payment methods)
    • Editing and Pausing Subscriptions
      • Downgrading / Upgrading Subscriptions
    • Creating Plans
    • Free Trials and Custom Intervals
    • Redirecting After Purchase
    • Using Webhooks
    • Types of Webhooks
      • Payment Success
      • Payment Refunded
      • Payment Failed
      • Subscription Created
      • Subscription Interval
      • Subscription Updated
      • Subscription Cancelled
    • Getting Started with the API
    • Orders APIs
      • Managing Orders through API
      • Orders List
      • Cancel Order
      • Update Order
    • Managing Subscriptions through API
    • Managing and Creating Users through API
    • Customizing Subscription Confirmation Page
    • Using CustomFields to parse data from your Software / App
      • Parse e-mails from your Software directly to checkout URL
  • Additional charges on top of Subscriptions
  • Upgrading or Downgrading Plans with API
  • Using Fungies.js npm package
    • Next.js 15 integration guide
  • 🎮For Game Developers
    • Orders
    • Platform Fees
    • Users list
    • Integrating with Game's Back-end
    • Customizing Purchase Confirmation Page
    • Webhooks
  • 💲Selling
    • Payment history
    • Selling FREE products
    • Managing Game Keys
    • Managing Game Assets
    • Pricing
    • Fulfillment of Orders
    • Prohibited Business and Products
    • Invoices and Receipts
    • Google Merchant Center XML Feed
    • SEO Sitemap
  • ✍️User Portal
    • Portal Access & Branding
  • Core Features
    • Subscription Management
    • Account Management
    • Order History
    • Digital Key Management
    • Digital Downloads
  • 🚀Marketing
    • Integrations
      • Google Tag Manager
      • Google Merchant Center
      • Trustpilot
      • Google Analytics (via Google Tag Manager)
    • SEO
    • Discount Codes
    • Pricing Localization
    • Language Localization
    • E-mail Marketing
  • 💰Billing
    • Plans and Usage
    • Invoices
    • Payment Methods
  • 🤩For End-Users
    • How to manage your Subscription?
    • How to buy a Game Key?
    • How to buy a Mobile Game Asset?
    • Getting your product
    • Steam key activation
    • Searching for games
    • Product details page
    • Order details
    • Refunds and chargebacks
  • 🗃️Other
    • FAQ
    • Roadmap
    • Product Changelog
  • 📃Legal
    • General Terms of Use
    • SaaS Terms of Use
    • Privacy Policy
    • Cookies and Tracking
Powered by GitBook
On this page
  • Common Use Cases
  • Preparing Your Software for Webhook Integration
  • Step 1: Setting Up an Endpoint
  • Configuring Webhooks in Fungies
  • Generating the API Keys
  • Creating a New Webhook
  • Testing the Webhook
  1. FOR SAAS DEVELOPERS

Using Webhooks

To initiate webhook events using Fungies’s platform, whether you're a seasoned developer or a business owner with limited technical knowledge, this article is designed to help you understand webhooks.

Common Use Cases

Billing Notifications: Automatically notify your accounting system when a payment is processed. This can help streamline financial operations and ensure your records are always up-to-date.

Customer Management: Update your CRM system with new customer information whenever a subscription is created or modified. This keeps your customer data consistent and current across all platforms.

Inventory Management: Synchronize your inventory system with customer orders. When a new order is placed, the webhook can trigger updates to your inventory, helping you manage stock levels more efficiently.

Analytics and Reporting: Send event data to your analytics platform to track important metrics such as subscription renewals, cancellations, and other key performance indicators. This enables more accurate reporting and deeper insights into your business’s performance.

Preparing Your Software for Webhook Integration

Before implementing Fungies webhooks, you must prepare your software environment. This involves setting up an endpoint to receive the webhook data, ensuring your system can process the data, and configuring security measures to protect your webhook endpoint.

Step 1: Setting Up an Endpoint

What Is an Endpoint?

An endpoint is a URL on your server that listens for incoming webhook data. When an event occurs in Fungies that triggers a webhook, the data is sent to this endpoint.

How to Set Up an Endpoint

  1. Choose a URL: Decide on a URL for your webhook endpoint. This could be something like https://yourdomain.com/webhooks/fungies.

  2. Create a Route: In your software, create a route that corresponds to the endpoint URL. This route will handle incoming POST requests from Fungies.

Parse Incoming Data: Ensure your endpoint can parse the incoming JSON data. Most modern web frameworks, like Express for Node.js, Flask for Python, or Laravel for PHP, have built-in methods for handling JSON data.

Testing Example for Setting Up an Endpoint

  1. Login the https://webhook.site/ and it will be assigned a webhook handler that can accept webhook requests with POST/GET methods.

  2. Copy and store the “Your unique URL”.

Configuring Webhooks in Fungies

Now that your software is ready to receive webhooks, the next step is to configure the webhook settings in Fungies.

Step 1: Go to the Fungies platform at https://app.Fungies/login. Log in using your credentials and click on the 'Sign in with Email' button.

Step 2: Navigate to the Developers section, where you'll find the following options:

  1. Webhooks

  2. API Keys

Generating the API Keys

An API key (secret key) will be used to sign webhook events. While you can use any string for the key, it should be kept secret and used to verify the event signatures.

Step 1: To generate the API key, click on the 'API Keys' option and then select the 'Generate API Key' button.

Step 2: After clicking the 'Generate API Key' button, the Fungies system will instantly create a secret key. Click the 'Copy' button to save the secret key to your clipboard.

Creating a New Webhook

Step 1: Click on the 'Webhooks' option to access the webhook configuration page, then select the 'Create a webhook' button.

Step 2: Paste the URL you copied from 'Your unique URL' into the 'Testing Example for Setting Up an Endpoint.'

Note: This URL is for testing purposes only. You can use your custom application domain URL instead.

Step 3: Copy the secret key from the 'API Keys' page and paste it into the designated field.

Step 4: Select the webhook event you'd like to trigger. The chosen event will be triggered, providing real-time updates to your software application.

These instructions are based on the "On Payment Succesfull" event type. To configure the other event types you can go through the "Types of Webhooks" page.

Step 5: Click on the “+ Create Webhook” button to set up the webhook.

You can view the successfully created webhooks on the Webhooks page.

Testing the Webhook

Before going live, use the “Test Webhook” feature in Fungies to send a sample payload to your endpoint.

Step 1: Click on the webhook which you want to test.

Step 2: A webhook configuration page will open. Click the 'Test' button to begin the webhook testing.

Step 3: Clicking the 'Test' button will open a window where you can choose the details for the webhook event you want to trigger for the test.

  • Select the webhook event type.

  • Choose the item name, if applicable.

  • Select the customer name, if applicable.

Step 4: Click the 'Send' button to trigger the webhook.

You can now view the trigger details (payload) on the endpoint handler you configured during the 'Setting Up an Endpoint' section.

Example of Request Payload Object (payment_success)

This is a request body payload object for the payment_success event

{
  "id": "f4cbd202-89c5-4538-b44b-11b2b7fa36ea",
  "type": "payment_success",
  "testMode": true,
  "data": {
    "items": [],
    "order": {
      "id": "47f68b70-898e-4dc8-99bd-9f30ce73c2f4",
      "totalItems": 0,
      "orderNumber": "2OJ3DJ0VP0CN"
    },
    "customer": {
      "id": "6e53e763-842e-4b19-872a-f02dfc8dc109",
      "email": "test@Fungies"
    }
  },
  "idempotencyKey": "f4cbd202-89c5-4538-b44b-11b2b7fa36ea"
}

Example of Response Object: 200

This is a response object for the payment_success event

{
"data":"This URL has no default content configured. <a href="https://webhook.site/#!/view/7b736426-27aa-4b85-bda3-5d84fbc401eb">View in Webhook.site</a>."
}

PreviousRedirecting After PurchaseNextTypes of Webhooks

Last updated 6 months ago

👨‍💻
Testing Example Image for Setting Up an Endpoint
Sign in into Fungies.io account Image
Navigate to Fungies.io Developers Section Image
Navigate to Generating the API Keys Image
Copy the Generated API Key Image
Creating a New Webhook Image
Create a Webhook URL Image
Creating a Secret Key Image
Selecting the Webhook Events Image
Click the Create Webhook Button Image
Successfully Created Webhooks List on the Webhooks page Image
Clicking on the Created Webhook for Test Image
Clicking on the Test Button for Webhook Test Image
Enter the Webhook Details for Test Image
Clicking on the Send Button Image
View the Triggered Details (payload) on the Endpoint Handler Image