Guide to Charging for Your Apps

In this guide, we'll walk you through the process of handling app charges in Lightfunnels.

Overview

Charging for your apps in Lightfunnels is a straightforward process. Here are the key points to keep in mind:

  • One Active Charge Per Account:

    • At any given time, an app can have only one active charge per user account.
  • Automatic Deactivation:

    • Activating a new charge will automatically deactivate any previous charges associated with the user's account.
  • Free Trial Recommendation:

    • For a positive user experience, it is highly recommended to include a free trial period with your charge.

Create a New App Charge

In this guide, we'll cover the steps to create a charge for your app using GraphQL.

Step 1: Create a Charge

To create a new charge for your app, you'll need to use the "createAppChargeMutation" GraphQL mutation.

Explore Mutation Details:

Step 2: Obtain Charge URL

Once you've created the charge, the response will contain a URL. Extract this URL from the response payload.

Step 3: Redirect User to Accept Charge

Send the user to the obtained charge URL. This can typically be done by redirecting the user's browser to the URL.

Step 4: Redirect User Upon Charge Acceptance or Denial

Upon the user's acceptance or denial of the charge, they will automatically be redirected to the specified return_url that was provided in the charge creation process.

Step 5: Check Charge Status Timestamp

Discover the exact moment a user accepts the charge by capturing the timestamp. Otherwise, the accepted_at timestamp will be null.

You can retrieve it using the following GraphQL query:


Helpful resources

For more detailed information on creating charges or querying app charges, refer to the provided links, Alternatively you can use our provided Postman collection, simply fork it get access to ready to use queries.

Run in Postman

If you have further questions or need assistance, contact us at support@lightfunnels.com.