{"name":"Satsback Agent","description":"Earn Bitcoin (sats) cashback on purchases. Register via L402, browse stores, generate affiliate clicks, and receive automatic Lightning payouts.","version":"3.0.0","url":"https:\/\/satsback.com","mcp_endpoint":"https:\/\/satsback.com\/api\/v2\/mcp","registration_endpoint":"https:\/\/satsback.com\/api\/v2\/l402\/register","capabilities":["cashback","lightning-payouts","nostr-notifications","referrals"],"mcp_transport":{"type":"streamable-http","method":"POST","content_type":"application\/json (JSON-RPC 2.0)","protocol_versions":["2024-11-05","2025-03-26","2025-06-18","2025-11-25"]},"authentication":{"registration":{"protocol":"L402","endpoint":"POST https:\/\/satsback.com\/api\/v2\/l402\/register","flow":"Two-phase L402 registration. Phase A: POST a signed Nostr event (kind 27236, content \"register\") with tags for country and lightning_address. Receive 402 with Lightning invoice in WWW-Authenticate header. Phase B: pay invoice, POST again with Authorization: L402 <base64_macaroon>:<hex_preimage>. Receive Bearer token.","nostr_event_kind":27236,"nostr_event_content":"register","nostr_event_tags":[["country","<ISO-2 or slug, e.g. NL or netherlands>"],["lightning_address","<your@wallet.com>"],["referrer_id","<optional, referrer public_id>"],["notifications","<optional, \"true\" to enable Nostr NIP-17 DMs>"]],"nostr_event_timestamp":"created_at must be within the last 5 minutes and no more than 60 seconds in the future.","phase_a_response":{"status":402,"header":"WWW-Authenticate: L402 macaroon=\"<base64>\", invoice=\"<bolt11>\"","body":{"version":"0.2.2","payment_request_url":"https:\/\/satsback.com\/api\/v2\/l402\/payment-request","payment_context_token":"<64 hex \u2014 equal to payment_hash>","offers":[{"id":"agent-registration","type":"one-time","title":"Satsback Agent Registration","amount":21,"currency":"SAT","payment_methods":["lightning"],"description":"One-time registration fee for API access"}],"payment_hash":"<64 hex>","amount_sats":21,"expires_at":"<ISO 8601>"}},"flows":{"header":"Lightning L402 (canonical) \u2014 parse macaroon and invoice from the WWW-Authenticate header, then submit Phase B with Authorization: L402 <macaroon>:<preimage>.","json":"l402.org v0.2.2 \u2014 POST \/api\/v2\/l402\/payment-request with offer_id, payment_method, payment_context_token to fetch the same Lightning invoice as a JSON field. Phase B is unchanged."},"phase_b_request":{"header":"Authorization: L402 <base64_macaroon>:<hex_preimage>","body":"none"},"phase_b_response":{"status":200,"body":{"success":true,"token":"<Bearer token \u2014 save securely>"}}},"api":{"type":"Bearer","header":"Authorization: Bearer <token>"}},"mcp_tools":["get_documentation","get_balance","account_info","referral_info","list_countries","get_clicks","get_earnings","get_payouts","update_country","update_lightning_address","update_notifications"],"rest_endpoints":["POST \/api\/v2\/l402\/register","POST \/api\/v2\/l402\/payment-request","GET \/api\/v2\/agent\/stores\/{country?}","GET \/api\/v2\/agent\/store\/{slug}","GET \/api\/v2\/agent\/store\/{slug}\/visit","DELETE \/api\/v2\/agent\/account"],"notes":["Register via L402 only \u2014 do not use the web UI at \/register (that is for human users).","Your Lightning address is for receiving payouts, not for authentication.","Nostr DMs are sent by Satsback to your pubkey as notifications \u2014 you do not send Nostr DMs to Satsback.","After registration, call referral_info via MCP to get your referrer_id. You earn 21% of cashback rewards generated by every referred user in their first year.","To refer another agent: share your referrer_id and ask them to include [\"referrer_id\", \"<your_id>\"] in their L402 Phase A Nostr event tags.","After registration, connect to the MCP endpoint and call get_documentation for the full API reference."],"contact":"https:\/\/satsback.com"}