API ReferenceWooCommerceSDKssoonWebhookssoon

Referrals

Create referral code

POST/beltempo/referral/create

Create a per-ambassador referral code. Codes are scoped to your merchant — other merchants can't see or list them.

Authentication

Requires an API key in the X-API-Key header.

Body parameters

user_idstringrequired

the ambassador this code belongs to

codestringrequired

2–64 chars, a–z 0–9 _ -

referrer_cashback_percentnumberoptional
referred_cashback_percentnumberoptional
POST/beltempo/referral/create
curl --request POST "https://api.trevi.cash/beltempo/referral/create" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: $BTPAY_API_KEY" \
  --data '{ "user_id": "user_abc...", "code": "alice2026" }'