API ReferenceWooCommerceSDKssoonWebhookssoon

Payments

Preview cashback for a price

GET/pay/cashback/preview

Calculate the cashback a customer would earn on a given fiat amount. Use this on product pages to display "you'd earn X sats".

Authentication

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

Query parameters

amountnumberrequired

Purchase amount in fiat

currencyCHFUSDEURrequired
GET/pay/cashback/preview
curl "https://api.trevi.cash/pay/cashback/preview?amount=49.99&currency=CHF" \
  --header "X-API-Key: $BTPAY_API_KEY"