API ReferenceWooCommerceSDKssoonWebhookssoon

Wallet

Get connection parameters

GET/api/v2/wallet/connect-params

What your browser needs to open the wallet approval screen: the authorization URL and the exact permission set to request. The scope list lives on the server so it cannot drift.

  • Dashboard-only: authenticate with a merchant JWT (Authorization: Bearer …). An API key will not work here, so the Try-it panel on this page cannot exercise it.
  • options.requestMethods asks for core NIP-47 (make_invoice, pay_invoice, get_balance, lookup_invoice) plus the optional extras (list_transactions, get_budget, get_info). A wallet that grants none of the extras still connects.
  • The limit is proposed, not imposed. The merchant can raise, lower or remove it inside their own wallet, and change it afterwards at any time — the wallet enforces it, not Trevi.
  • 400 if max_daily_sats is not a positive whole number.

Authentication

Requires a dashboard session JWT in the Authorization: Bearer … header.

Query parameters

max_daily_satsnumber (integer)optional

daily spending limit to propose. Defaults to 100 000.

return_tostringoptional

where the wallet should send the merchant back after approving

GET/api/v2/wallet/connect-params
curl "https://api.trevi.cash/api/v2/wallet/connect-params?max_daily_sats=100000" \
  --header "Authorization: Bearer $TREVI_JWT"
200Sample response
{
  "success": true,
  "authorizationBasePath": "https://my.albyhub.com/apps/new",
  "options": {
    "name": "Trevi — Bel Tempo",
    "requestMethods": [
      "make_invoice",
      "pay_invoice",
      "get_balance",
      "lookup_invoice",
      "list_transactions",
      "get_budget",
      "get_info"
    ],
    "notificationTypes": [
      "payment_received"
    ],
    "maxAmount": 100000,
    "budgetRenewal": "daily"
  }
}
Was this page helpful?