1. Home
  2. /
  3. Features
  4. /
  5. API and webhooks

API and webhooks

A real API, and webhooks that actually fire

Seven REST resources behind a bearer token, and 15 events delivered with automatic retries, a delivery log and replay. Business plan and up.

Start freeSee pricing
  • 7 resources, bearer token auth
  • 15 events, retried automatically
  • Zapier and Make, or raw HTTP
Business and up
request.sh
curl https://referly.so/api/v1/sales \  -H "Authorization: Bearer $REFERLY_API_KEY" \  -G -d affiliateEmail=emma@studio.com
200 OK
{  "id": "sale_4821",  "affiliateId": "aff_10482",  "affiliateEmail": "emma@studio.com",  "referralId": "ref_4821",  "amount": 349.00,  "currency": "USD",  "commission": 69.80,  "status": "ACTIVE",  "createdAt": "2026-02-03T14:22:11Z"}
Retries, logs and replay

The API

Seven resources, one key

Generate a key in settings, send it as a bearer token, and read or write the objects your program is made of.

Business and up
EndpointResourceWhat it is
/v1/affiliatesAffiliatesRead and manage the partners in your program.
/v1/referralsReferralsRead attributed referrals, or create one from your own backend.
/v1/salesSalesPost a sale yourself, or read what has been credited.
/v1/couponsCouponsCreate and read discount definitions.
/v1/promotional-codesPromotional codesThe individual codes under a coupon, per affiliate.
/v1/linksLinksAffiliate links and the base URLs behind them.
/v1/payout-batchesPayout batchesRead the batches your payouts are grouped into.

Authentication

Keys are generated per program in settings and sent as a bearer token. Requests are rate limited per token, endpoint and method, and a request over the limit gets a 429 with a message rather than a silent drop.

Webhooks

15 events, delivered with retries

Point an endpoint at your own service and Referly pushes the object every time it changes.

Every event

15

Resourcecreatedupdateddeleted
ReferralA visitor attributed to an affiliate, before or at the point of sale.referral.createdreferral.updatedreferral.deleted
AffiliateA partner in your program, including status and plan changes.affiliate.createdaffiliate.updatedaffiliate.deleted
SaleA purchase credited to an affiliate, including refunds as updates.sale.createdsale.updatedsale.deleted
CouponA discount definition, with its amount, duration and limits.coupon.createdcoupon.updatedcoupon.deleted
Promo codeAn individual redeemable code belonging to a coupon.promocode.createdpromocode.updatedpromocode.deleted

Delivery runs on Svix, so an endpoint that is down does not lose events: failed attempts retry on a schedule, every attempt is in a log with its status code and response, and any message can be replayed by hand once you have fixed the receiver.

  • Retries

    Failed deliveries retry automatically rather than being dropped on the first non-200.

  • A delivery log

    Every attempt, with its status code and the response body, so debugging is reading rather than guessing.

  • Replay

    Resend any past message to your endpoint once it is fixed, without re-triggering the original action.

  • Signed payloads

    Each request carries a signature so your receiver can verify Referly sent it.

  • Per-endpoint filtering

    Subscribe an endpoint to a subset of events rather than receiving all fifteen.

  • Test sends

    Fire a sample of any event type at your endpoint before anything real happens.

Delivery log

https://api.northwind.com/hooks/referly
  • 200sale.created14:22:11
  • 200referral.created14:19:04
  • 500affiliate.updatedretrying in 30s14:07:52
  • 200sale.updated13:58:20
  • 200promocode.created13:41:07

Failed deliveries retry on a schedule. Any message can be replayed once your endpoint is fixed.

What there is no event for

There is no payout event. Webhooks cover referrals, affiliates, sales, coupons and promo codes; payout state is read through the payout-batches resource on the API instead.

Without code

Zapier and Make, if you would rather not

The same events and the same objects, wired into whatever you already run.

Both connectors authenticate with the same key and expose the same events as triggers, so a new affiliate can create a row in a sheet, a Slack message or a CRM record without anyone writing a receiver.

Every integration Referly connects to

Zapier

Triggers on the same events, actions on the same resources, without writing a request.

Make

The same surface as a scenario module, for teams already building there.

The rest

An app, a plugin, and a snippet

Three things that are not the API but solve the same problem for most people.

  • The Shopify app

    Installs the tracking and reports orders without you touching a webhook or a theme file.

  • The WordPress plugin

    Adds the tracking script and connects WooCommerce sales, for the stack most stores are already on.

  • The JavaScript snippet

    One script tag that captures clicks anywhere, with a verification check and a heartbeat so you know it is live.

  • Affiliate postbacks

    Server-to-server postbacks fired to your affiliates' own tracking platforms, with click-id and payout macros.

All the integrationsStripeShopifyServer-to-server tracking

“I was looking to build an online portal for affiliates to track their sales and Referly saved me so much work. So many amazing extra features, like custom domains and fully customisable affiliate rates.”

Alistair HeathAlistair HeathFounder, Hapcha
Hapcha

Availability

Developer features by plan

Both halves of this page start on Business. Agencies can switch them off per client.

FeatureStartupBusinessEnterpriseAgencyAgency ProAgency Scale
Full REST API
Webhooks
Server-to-server postbacks
All integrations included
Free migration from your current tool
  • API access, webhooks and affiliate postbacks are all off on the Startup plan and start on Business.
  • On agency plans, API keys and the documentation link are switches an agency controls per client program.
Compare all plans
Create my program

14-day free trial · No credit card required · Cancel anytime

FAQ

Before you connect anything

The questions founders ask in the first ten minutes.

Start for freeBook a demo

14-day free trial · No credit card required · Cancel anytime

  • A real one. Seven resources (affiliates, referrals, sales, coupons, promotional codes, links and payout batches) authenticated with a bearer token you generate in settings. Zapier and Make sit on top of the same thing for people who would rather not write code.

  • 15: created, updated and deleted for referrals, affiliates, sales, coupons and promo codes. An endpoint can subscribe to all of them or to a subset, and you can fire a test send of any event type before anything real happens.

  • No, and it is worth saying plainly because the pricing tooltip implies otherwise. Payout state is read through the payout-batches resource on the API rather than pushed as an event.

  • The delivery fails and retries on a schedule rather than being dropped. Every attempt is in a log with its status code and response body, and once your receiver is fixed you can replay any past message without re-triggering the original action.

  • Each delivery carries a signature your receiver can check against the endpoint's signing secret, which you can rotate. Verify it before acting on a payload; an unauthenticated endpoint that trusts its input is the usual mistake here.

  • Yes, per token, per endpoint and per method, and a request over the limit gets a 429 with a message. We do not publish a specific number here because it is not a documented contract; if you are planning a high-volume integration, ask us before you build against an assumption.

  • Yes, that is what the sales resource is for. It is the route for stacks Referly does not integrate with directly, and it is also how server-side attribution avoids depending on a browser at all.

  • No. Most programs never touch it: the Shopify app, the WordPress plugin and the JavaScript snippet cover the common cases without code. The API is there for the things nobody anticipated, which is a different job.

Read next

  • FeatureThe click record every one of these objects is built from
  • FeatureThe same data as CSV, without the integration
  • FeatureReading payout state through the API
  • FeatureRunning Referly under your own dashboard

Built on this most

  • SaaS and AI
  • Agencies
  • Ecommerce

Explore

The rest of the platform

Tracking and attribution

  • Affiliate trackingEvery click, coupon and renewal, credited to the right partner.
  • Coupon trackingCapture the sales that never touch a link.
  • Fraud preventionHold the sales your partners did not really bring.

Commissions and rewards

  • Commission plansPercentage or flat, one-off or every renewal, per partner or per product.

Payouts, tax and invoicing

  • PayoutsPay through PayPal, Wise, bank, credit or coupon.
  • Tax forms and invoicingCollect W-9s and W-8s, and issue the EU invoice for them.

Your branded affiliate portal

  • Branded partner portalYour brand, your domain, fifteen languages.
  • White labelRun the portal, or the whole dashboard, as your own.
  • Marketing assetsGive partners the creative you want used.

Recruiting and growth

  • Affiliate recruitmentFive channels that bring you your first hundred partners.
  • Influencer DiscoveryPartners with receipts, not followers.
  • Marketplace listingPut your program where affiliates already browse.

Engage add-on

  • Messaging and announcementsTalk to your partners inside the portal they already use.

Gamify add-on

  • GamificationLeaderboards, contests and bonuses for the quiet ninety percent.

Program essentials

  • Analytics and reportingSee which partners actually sell, by fourteen dimensions.

Your next growth channel

Launch your affiliate program in 10 minutes.

Connect Stripe, Shopify and 25 other tools. Your partners sell, you pay only when a sale lands.

Start for freeBook a demo

14-day free trial · No credit card required · Cancel anytime

  • Stripe App Marketplace
  • Shopify App Store
  • 0% transaction fee
ReferlyReferly

Turn your customers, creators and partners into a sales channel. Every click, coupon and sale tracked, and every partner paid, from one place.

Follow along

  • X
  • LinkedIn
  • YouTube
  • Instagram
  • Facebook
  • Discord

Product

  • Features
  • Affiliate tracking
  • Commissions & rewards
  • Payouts, tax & invoices
  • Branded partner portal
  • Analytics & reporting
  • Fraud prevention
  • API & webhooks
  • Pricing

Solutions

  • SaaS & AI
  • Ecommerce & Shopify
  • Shopify stores
  • Agencies
  • Creators & influencers
  • Courses & communities
  • Affiliate tracking software
  • Referral program software
  • Affiliate management software
  • Best affiliate software

Integrations

  • Stripe
  • Shopify
  • WooCommerce
  • WordPress
  • Paddle
  • Chargebee
  • Polar
  • Zapier
  • Make
  • All integrations

Resources

  • Blog
  • Guides
  • Glossary
  • Customer stories
  • Benchmarks
  • Changelog
  • Roadmap
  • Feature requests
  • Bug reports
  • Help center
  • API docs

Free tools

  • Influencer search
  • Commission calculator
  • Affiliate ROI calculator
  • True-cost comparison
  • Link shortener
  • Competitor affiliate research
  • Affiliate agreement generator
  • Templates
  • Affiliate agreement template
  • Recruitment email template
  • Commission structure templates
  • Program terms template
  • Onboarding sequence template

For affiliates

  • Find affiliate programs
  • Browse by category
  • Content-reward programs
  • For affiliates
  • Affiliate login

Company

  • About
  • Contact
  • Security
  • Careers
  • Migrate to Referly
  • Our affiliate program
  • Book a demo
Compare Referly

Hubs

  • All comparisons
  • All alternatives
  • Compare pricing
  • Migrate to Referly
  • All roundups

Roundups

  • Shopify affiliate apps
  • Affiliate software for SaaS
  • Free affiliate software
  • Affiliate software for ecommerce
  • Referral software
  • Influencer marketing platforms

Head-to-head

  • Referly vs Rewardful
  • Referly vs FirstPromoter
  • Referly vs Tolt
  • Referly vs UpPromote
  • Referly vs Tapfiliate
  • Referly vs Partnero
  • Referly vs Trackdesk
  • Referly vs Dub
  • Referly vs PartnerStack

Neutral comparisons

  • Rewardful vs FirstPromoter
  • Rewardful vs Tolt
  • Rewardful vs Tapfiliate
  • PartnerStack vs impact.com

Alternatives

  • Rewardful alternative
  • FirstPromoter alternative
  • Tolt alternative
  • Tapfiliate alternative
  • PartnerStack alternative
  • UpPromote alternative
  • Trackdesk alternative
  • Refersion alternative
  • Everflow alternative
  • LeadDyno alternative
  • Post Affiliate Pro alternative
  • Affonso alternative

Pricing teardowns

  • PartnerStack pricing
  • impact.com pricing
  • Rewardful pricing
  • Everflow pricing
  • FirstPromoter pricing
  • UpPromote pricing
  • Tapfiliate pricing
  • Refersion pricing
  • Tolt pricing
  • Trackdesk pricing
  • Dub pricing

Migration guides

  • Migrate from Rewardful
  • Migrate from FirstPromoter
  • Migrate from Tolt
  • Migrate from Tapfiliate
  • Migrate from Refersion
  • Migrate from Dub
  • Migrate from Partnero
  • Migrate from Trackdesk
  • Migrate from PartnerStack

© 2026 Referly. All rights reserved. Referly Technologies, LLC, 1207 Delaware Ave #3648, Wilmington, DE 19806

  • Terms of Use
  • Privacy Policy
  • Refund Policy
  • DPA
ReferlyReferly
  • Platform

    Affiliate trackingEvery click, coupon and sale, attributedCommissions & rewardsRecurring, tiered, per-product, or cash-freePayouts, tax & invoicesPayPal, Wise, or let Referly pay them for youBranded partner portalYour brand, your domain, 15 languagesRecruiting & discoveryA marketplace and an influencer network built inAnalytics & reportingWhere revenue actually comes fromAutomation, API & webhooksREST API, webhooks, Zapier and Make
    See all features

    Program types

    Affiliate programsPartners promote, you pay per saleReferral programsTurn customers into a growth channelManaging a programApprove, group, rate, message and pay partnersInfluencer programsGive every creator a link and a coupon codeInfluencer platformsPay to post, or pay per sale: seven compared

    Built for

    SaaS & AICommissions that follow the subscriptionEcommerce & ShopifyCoupon codes tracked as first-classAgenciesWhite-label programs for your clientsCreatorsPrograms built around coupon codes

    Customer stories

    What real programs earn with Referly

    Learn more
    RewardfulFirstPromoterTolt
    Referly

    Switching?

    Move your affiliates and their codes, without losing your history.

    Learn more
  • By business

    SaaS & AIRecurring commissions, trials, upgrades and churnEcommerce & ShopifyOrders, coupons, refunds and store creditShopify storesInstall the app, no theme edits

     

    AgenciesYour brand, your domain, your pricesCreators & influencersCoupon-code programs at any scaleCourses & communitiesMemberstack, Cal.com, Calendly and more

    By platform

    StripeOne-click connect, subscriptions includedShopifyOfficial app, auto-apply discountsWooCommerceWordPress plugin, no code

     

    PaddleOverlay and inline checkoutChargebeeDrop-in script or API checkoutPolarPayment links and embedded checkout
    All integrations
  • Featured customer stories

    Moov$6.9M generated in affiliate revenue with 1,155 affiliatesLetterly691 creators driving 24,458 clicks and 656 salesOptimizePress7 figures generated in affiliate revenue with 4,554 affiliates
    All case studies

     

    ClickGUARD$67.7K in revenue and $14K MRR from affiliates in 5 monthsJobsoid765 sales generated by a 1,024-strong affiliate networkAudible Genius2x revenue growth with a roster of 100 creator affiliates

     

    FundYourFX723 referrals driven by 1,121 affiliates and influencersZeroChats$25,089 paid out automatically to 20 affiliatesMailin$67.9K in revenue generated from affiliates and creators

    Customer story

    How Moov generated $6.9M in sales from creators

    See how this eCom store manages 1,000+ creators using Referly.

    Learn more
  • Pricing
  • Learn

    BlogGuides and teardowns for program ownersGuidesHow to start, recruit, price and payBest affiliate softwareFive tools compared, each with its limitation statedGlossaryEPC, cookie windows, net terms, explainedCustomer storiesWhat programs actually earnBenchmarksReal commission rates by industry

    Tools

    Influencer searchFind creators already promoting in your nicheCommission calculatorModel what a program costs youAffiliate ROI calculatorWhat the channel is worthTrue-cost comparisonWhat you'd actually pay on each platformLink shortenerFree, with your own domainTemplatesAgreements, outreach emails, terms
    All free tools

    Product

    Help centerSetup and troubleshootingAPI docsREST API and webhooksChangelogWhat shipped, whenRoadmapWhat's nextFeature requestsAsk for somethingStatusUptime

    Compare Referly

    Side-by-side with Rewardful, FirstPromoter, Tolt, Tapfiliate and eight more.

    Plus what each one actually costs, and how to move.

    Learn more

Log in as a

BrandRun your affiliate programInfluencerYour links, stats and payouts
Book a demoStart free trial
Start free trial