Building your own webhook integration

This guide explains how to connect your custom payment processor or automation script to our Whitelabel webhook system.
You can use it to automatically create or cancel user accounts when a transaction occurs.


1. Overview

When a new payment or subscription is completed, your system should send a POST request to our webhook endpoint.
This webhook will create the user account automatically using the data you provide.

For cancellations or subscription stops, your system can also send a separate webhook event to deactivate the user.


2. Webhook URLs

You can find your Webhook URLs for each plan at the Whitelabel Plan settings page. Use the following endpoints to send data:

  • Signup / Purchase Webhook:

    https://api.kickpages.com/whitelabel-signup/kickpagesfunnel-webhook/NNNNNNNN_NNNNNNNN
    
  • Cancellation Webhook:

    https://api.kickpages.com/whitelabel-signup/webhook-process/NNNNNNNN/NNNNNNNN
    

3. Signup Webhook Format

Send a JSON POST request containing three objects:
transaction, customer, and product.

Example:

{
  "transaction": {
    "id": "12345||1743759509",
    "gateway": "stripe",
    "invoice": "in_abc123",
    "quantity": 1,
    "amount": 497,
    "currency": "usd",
    "date": "2025-04-04 09:38:25",
    "status_at_gateway": "succeeded"
  },
  "customer": {
    "name": "John Doe",
    "email": "john@example.com",
    "subscription": "sub_123456789",
    "customer_ip": "51.171.83.178"
  },
  "product": {
    "sku": "plan001",
    "title": "Pro Plan",
    "type": "digital",
    "access_url": "https://yourdomain.com/thankyou/",
    "in_payment_type": "Subscription",
    "status": "active"
  }
}

This webhook will automatically create or update the customer’s account based on the email address.


4. Signup Webhook Responses

Your system will receive one of the following JSON responses:

StatusMessagesuccessAccount created successfully and verification email sent.infoEmail already exists.infoInvalid data received.

Example:

{
  "status": "success",
  "message": "Congratulations, your account has been created successfully. We have sent you a verification link to your registered email address."
}

5. Cancellation Webhook Format

To cancel a user’s account or stop access, send a POST request to the cancellation endpoint with form-encoded data.

Endpoint:

https://api.kickpages.com/whitelabel-signup/webhook-process/NNNNNNNN/NNNNNNNN

Headers:

Content-Type: application/x-www-form-urlencoded

Body (example):

event=on_rebill_cancelled
transaction_id=98746694
email=john@example.com
product_id=621996
billing_status=aborted

You can include any other fields your system provides.
Only the relevant fields (such as event, email, and transaction_id) are required for processing.


6. Cancellation Responses

All cancellation requests return HTTP status 200 OK, confirming the event was received.

Example success:

HTTP 200 OK
Body: OK

If verification fails or an internal error occurs, you’ll still receive 200 OK, but with an error message:

OK
error_message: Event not processed.

7. Tips for Reliable Webhooks

  • Always send POST requests — GET requests are ignored.

  • Use proper JSON formatting for signup events.

  • Use application/x-www-form-urlencoded for cancellation events.

  • Include at least an email address and transaction details in every call.

  • Log your requests and responses for debugging.