Skip to main content

External Billing

The billing webhook enables developers to process payments for externally-billed apps in the HoopAI Platform marketplace. It is essential for externally billed apps within the marketplace.

Prerequisites

Before implementation, you must:
  • Configure your app with a Paid business model
  • Enable External Billing in marketplace settings
  • Provide a Billing URL endpoint

Installation Flow

When users install your app, they are redirected to your Billing URL with the following query parameters:
ParameterDescription
clientIdYour app’s client ID
installTypeType of installation
locationIdThe location being installed
companyIdThe company/agency ID

Webhook Implementation

After processing payment, send a POST request to:
https://services.leadconnectorhq.com/oauth/billing/webhook

Authentication Headers

HeaderDescription
x-ghl-client-keyYour app’s client key
x-ghl-client-secretYour app’s client secret

Request Payload

FieldTypeRequiredDescription
clientIdstringYesYour app’s client ID
authTypestringYeslocation or company
amountnumberYesPayment amount
statusstringYesCOMPLETED or FAILED
paymentTypestringYesone_time or recurring
locationIdstringConditionalRequired when authType is location
companyIdstringConditionalRequired when authType is company

Example Request

{
  "clientId": "your-client-id",
  "authType": "location",
  "amount": 49.99,
  "status": "COMPLETED",
  "paymentType": "recurring",
  "locationId": "abc123locationId"
}

Important Limitation

The system requires separate webhook calls for each location — you cannot batch multiple locations in a single request. However, the Billing URL can deliver multiple locationId values in comma-separated format during installation.
Last modified on March 4, 2026