Cashback
Update cashback config
PUT
/api/merchants/cashback/configChange your cashback rules. Changes apply to every future sale immediately.
- Every field is optional; only what you send is changed.
- 400 — "Connect your Alby Hub wallet before enabling cashback." Setting
enabled: truerequires an active NWC wallet connection, because Trevi will not promise a payout without a wallet that can make it. - There is no minimum balance to enable cashback. Cover is checked per sale, live against your wallet, at the moment an offer would be made. Enabling with an empty wallet simply means no offer is shown — no promise without cover.
Authentication
Accepts either an API key (X-API-Key) or a dashboard JWT (Authorization: Bearer …).
Body parameters
enabledbooleanoptionalpercentagenumber (fraction)optional0.01 – 0.10. A FRACTION, not a percent: 0.03 means 3%.
max_per_transactionnumber (sats)optionalinteger, 100 – 1 000 000. Caps any single payout.
PUT
/api/merchants/cashback/configcurl --request PUT "https://api.trevi.cash/api/merchants/cashback/config" \
--header "Content-Type: application/json" \
--header "X-API-Key: $TREVI_API_KEY" \
--data '{ "enabled": true, "percentage": 0.03, "max_per_transaction": 50000 }'Was this page helpful?
