Everything you need to integrate OfferTown into your platform
Get the WordPress plugin
Complete API documentation
Step-by-step setup
Integration Overview
OfferTown helps you track referrals from lead generation to paying customer. This guide shows how to install the WordPress plugin, use our API to fetch new leads hourly, and report conversions when leads become paying customers.
https://www.offertown.net/auth/sign-in
For WordPress plugin integration only
Example: trp_67759518e0eb2de0900bfd47dfc76e5e553581522...
For API calls and external integrations
Example: tlp_a8f5c2d1b9e7f3a2c8d4e9f1a2b3c4d5e6f7a8b9...
Important: Generate separate keys for different purposes. Use trp_
keys exclusively for WordPress, and tlp_
keys for API integrations.
tenant-referral-program
folder to /wp-content/plugins/
Go to Settings → Offertown in WordPress admin:
API Key: [Your WordPress API Key (trp_...)] API Base URL: https://offertown.net (auto-filled) Status: Connected ✓
✓ The plugin automatically detects your tenant ID from the API key and connects to production
For user dashboard/member areas:
[tenant_referral_widget]
Complete referral management widget with history and link generation
For signup/conversion pages:
[tenant_referral_signup]
Handles referral conversions from URLs like: yoursite.com/join/?ref_code=ABC123
New Workflow: Use status=pending_verification
to fetch new leads. This automatically verifies them and makes them ready for conversion tracking. This ensures you only process leads when you're ready to handle them.
curl -X GET "https://offertown.net/api/v1/admin/referrals?status=pending_verification" \ -H "Authorization: Bearer tlp_your_api_key_here" \ -H "Content-Type: application/json"
Important: The API response will show pending_verification
status, but these leads are automatically verified in the background. Subsequent API calls will show them as verified
.
For ongoing/automated fetching, you can also fetch already verified leads:
curl -X GET "https://offertown.net/api/v1/admin/referrals?status=verified" \ -H "Authorization: Bearer tlp_your_api_key_here" \ -H "Content-Type: application/json"
curl -X POST "https://offertown.net/api/v1/admin/referrals/48b48e96-2bec-4b87-a352-d0d329307212/convert" \ -H "Authorization: Bearer tlp_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "conversionValue": 99.99, "currency": "EUR", "externalTransactionId": "ORDER-2025-001", "metadata": { "monthlyValue": 99.99, "planName": "Professional" } }'
Referral IDs in the API are standard UUIDs without any prefix:
48b48e96-2bec-4b87-a352-d0d329307212
{ "success": true, "data": { "results": [ { "id": "48b48e96-2bec-4b87-a352-d0d329307212", "referred": { "email": "customer@example.com", "name": "John Doe" }, "referrer": { "id": "352d9bb7-12eb-49b1-b426-c2aa77278dee", "customerId": "USER_352D9BB712EB" } } ] }, "meta": { "timestamp": "2025-07-01T14:30:00.000Z", "requestId": "req_abc123", "version": "1.1" } }
POST /api/v1/admin/referrals/48b48e96-2bec-4b87-a352-d0d329307212/convert { "conversionValue": 99.99, "currency": "EUR", "externalTransactionId": "ORDER-2025-001", "metadata": { "customerId": "CUST-12345", "planName": "Professional" } }
Track referrals through purchase completion:
Track trial-to-paid conversions:
Track leads to appointments:
Track referrals in your CRM:
{ "UF_REFERRAL_ID": "48b48e96-2bec-4b87-a352-d0d329307212", "UF_REFERRER_ID": "USER_352D9BB712EB", "TITLE": "Lead from John Doe referral", "SOURCE_ID": "REFERRAL" }