API ReferenceWooCommerceSDKssoonWebhookssoon

Referrals

Record a referral visit

POST/beltempo/referral/visit

Increment the visit counter on a referral code. Called by your storefront when a visitor lands via /?ref=…

  • Authenticated: API key or merchant JWT. Call it from your server, not the visitor's browser — the credential must not be exposed.
  • Returns 404 if the code does not belong to your merchant.

Authentication

Accepts either an API key (X-API-Key) or a dashboard JWT (Authorization: Bearer …).

Body parameters

referral_codestringrequired
POST/beltempo/referral/visit
curl --request POST "https://api.trevi.cash/beltempo/referral/visit" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: $TREVI_API_KEY" \
  --data '{ "referral_code": "alice2026" }'