-
-
-
+
+
{{$t("Node Info")}}
diff --git a/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
index 07f44f17f..b58c52af4 100644
--- a/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
+++ b/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
@@ -3,7 +3,7 @@
@model IEnumerable
@{
- var offchainPayments = Model.Where(entity => entity.GetPaymentMethodId()?.PaymentType == LightningPaymentType.Instance).Select(payment =>
+ var offchainPayments = Model.Where(entity => entity.GetPaymentMethodId()?.PaymentType == LightningPaymentType.Instance || entity.GetPaymentMethodId()?.PaymentType == LNURLPayPaymentType.Instance).Select(payment =>
{
var offChainPaymentData = payment.GetCryptoPaymentData() as LightningLikePaymentData;
if (offChainPaymentData is null)
@@ -13,7 +13,8 @@
return new OffChainPaymentViewModel()
{
Crypto = payment.Network.CryptoCode,
- BOLT11 = offChainPaymentData.BOLT11
+ BOLT11 = offChainPaymentData.BOLT11,
+ Type = payment.GetCryptoPaymentData().GetPaymentType()
};
}).Where(model => model != null);
}
@@ -28,6 +29,7 @@
Crypto
+ Type
BOLT11
@@ -36,6 +38,7 @@
{
@payment.Crypto
+ @payment.Type.ToPrettyString()
@payment.BOLT11
}
diff --git a/BTCPayServer/Views/Stores/CheckoutExperience.cshtml b/BTCPayServer/Views/Stores/CheckoutExperience.cshtml
index ac0e11e64..be62b6601 100644
--- a/BTCPayServer/Views/Stores/CheckoutExperience.cshtml
+++ b/BTCPayServer/Views/Stores/CheckoutExperience.cshtml
@@ -12,7 +12,7 @@
{
}
- Payment
+ Invoice Settings
@if (Model.PaymentMethods.Any())
{
+
+
+
+
+
+
+
+
LNURL settings
+
+
+
+
+
+
+
Save
@section PageFootContent {
-
+
}
diff --git a/BTCPayServer/Views/Stores/StoreNavPages.cs b/BTCPayServer/Views/Stores/StoreNavPages.cs
index 4fc87f5ca..fecec960e 100644
--- a/BTCPayServer/Views/Stores/StoreNavPages.cs
+++ b/BTCPayServer/Views/Stores/StoreNavPages.cs
@@ -2,8 +2,6 @@ namespace BTCPayServer.Views.Stores
{
public enum StoreNavPages
{
- Index, Create, Rates, Checkout, Tokens, Users, PayButton, Integrations, Wallet, Webhooks, ActivePage,
- PullPayments,
- Payouts
+ Index, Create, Rates, Payment, Checkout, Tokens, Users, PayButton, Integrations, Wallet, Webhooks, ActivePage, PullPayments, Payouts
}
}
diff --git a/BTCPayServer/Views/Stores/UpdateStore.cshtml b/BTCPayServer/Views/Stores/UpdateStore.cshtml
index b81f8e443..9a9b3b510 100644
--- a/BTCPayServer/Views/Stores/UpdateStore.cshtml
+++ b/BTCPayServer/Views/Stores/UpdateStore.cshtml
@@ -182,136 +182,7 @@
-
-
-
-
-
-
- @if (Model.IsOnchainSetup || Model.IsLightningSetup)
- {
-
Payment
-
-
-
-
- @if (Model.IsOnchainSetup)
- {
-
On-Chain
- @if (Model.CanUsePayJoin)
- {
-
- }
-
-
-
-
-
-
-
-
- }
-
- @if (Model.IsLightningSetup)
- {
-
Lightning
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- }
+
Save Store Settings
@@ -356,9 +227,4 @@
@section PageFootContent {
-
}
diff --git a/BTCPayServer/Views/Stores/_Nav.cshtml b/BTCPayServer/Views/Stores/_Nav.cshtml
index f67d5e3c2..797bff77c 100644
--- a/BTCPayServer/Views/Stores/_Nav.cshtml
+++ b/BTCPayServer/Views/Stores/_Nav.cshtml
@@ -1,13 +1,14 @@
- General settings
- Rates
- Checkout experience
- Access Tokens
- Users
- Pay Button
- Integrations
- Webhooks
- Pull payments
- Payouts
+ General settings
+ Rates
+ Payment
+ Checkout experience
+ Access Tokens
+ Users
+ Pay Button
+ Integrations
+ Webhooks
+ Pull payments
+ Payouts
diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-payment-methods.lnurl.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-payment-methods.lnurl.json
new file mode 100644
index 000000000..2ccd4f849
--- /dev/null
+++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-payment-methods.lnurl.json
@@ -0,0 +1,291 @@
+{
+ "paths": {
+ "/api/v1/stores/{storeId}/payment-methods/LNURL": {
+ "get": {
+ "tags": [
+ "Store Payment Methods (LNURL)"
+ ],
+ "summary": "Get store LNURL payment methods",
+ "parameters": [
+ {
+ "name": "storeId",
+ "in": "path",
+ "required": true,
+ "description": "The store to fetch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "enabled",
+ "in": "query",
+ "required": false,
+ "description": "Fetch payment methods that are enabled/disabled only",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "description": "View information about the stores' configured LNURL payment methods",
+ "operationId": "StoreLNURLPayPaymentMethods_GetLNURLPayPaymentMethods",
+ "responses": {
+ "200": {
+ "description": "list of payment methods",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodDataList"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "API Key": [
+ "btcpay.store.canmodifystoresettings"
+ ],
+ "Basic": []
+ }
+ ]
+ }
+ },
+ "/api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode}": {
+ "get": {
+ "tags": [
+ "Store Payment Methods (LNURL Pay)"
+ ],
+ "summary": "Get store LNURL Pay payment method",
+ "parameters": [
+ {
+ "name": "storeId",
+ "in": "path",
+ "required": true,
+ "description": "The store to fetch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cryptoCode",
+ "in": "path",
+ "required": true,
+ "description": "The crypto code of the payment method to fetch",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "description": "View information about the specified payment method",
+ "operationId": "StoreLNURLPayPaymentMethods_GetLNURLPayPaymentMethod",
+ "responses": {
+ "200": {
+ "description": "specified payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodData"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "If you are authenticated but forbidden to view the specified store"
+ },
+ "404": {
+ "description": "The key is not found for this store/payment method"
+ }
+ },
+ "security": [
+ {
+ "API Key": [
+ "btcpay.store.canmodifystoresettings"
+ ],
+ "Basic": []
+ }
+ ]
+ },
+ "put": {
+ "tags": [
+ "Store Payment Methods (LNURL Pay)"
+ ],
+ "summary": "Update store LNURL Pay payment method",
+ "parameters": [
+ {
+ "name": "storeId",
+ "in": "path",
+ "required": true,
+ "description": "The store to fetch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cryptoCode",
+ "in": "path",
+ "required": true,
+ "description": "The crypto code of the payment method to update",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "description": "Update the specified store's payment method",
+ "requestBody": {
+ "x-name": "request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodData"
+ }
+ }
+ },
+ "required": true,
+ "x-position": 1
+ },
+ "operationId": "StoreLNURLPayPaymentMethods_UpdateLNURLPayPaymentMethod",
+ "responses": {
+ "200": {
+ "description": "updated specified payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodData"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "A list of errors that occurred when updating the store payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationProblemDetails"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "If you are authenticated but forbidden to update the specified store"
+ },
+ "404": {
+ "description": "The key is not found for this store"
+ }
+ },
+ "security": [
+ {
+ "API Key": [
+ "btcpay.store.canmodifystoresettings"
+ ],
+ "Basic": []
+ }
+ ]
+ },
+ "delete": {
+ "tags": [
+ "Store Payment Methods (LNURL Pay)"
+ ],
+ "summary": "Remove store LNURL Pay payment method",
+ "parameters": [
+ {
+ "name": "storeId",
+ "in": "path",
+ "required": true,
+ "description": "The store to fetch",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cryptoCode",
+ "in": "path",
+ "required": true,
+ "description": "The crypto code of the payment method to update",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "description": "Removes the specified store payment method.",
+ "responses": {
+ "200": {
+ "description": "The payment method has been removed"
+ },
+ "400": {
+ "description": "A list of errors that occurred when removing the payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationProblemDetails"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "If you are authenticated but forbidden to remove the specified payment method"
+ },
+ "404": {
+ "description": "The key is not found for this store/payment-method"
+ }
+ },
+ "security": [
+ {
+ "API Key": [
+ "btcpay.store.canmodifystoresettings"
+ ],
+ "Basic": []
+ }
+ ]
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "LNURLPayPaymentMethodDataList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodData"
+ }
+ },
+ "LNURLPayPaymentMethodBaseData": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "useBech32Scheme": {
+ "type": "boolean",
+ "description": "Whether to use [LUD-01](https://github.com/fiatjaf/lnurl-rfc/blob/luds/01.md)'s bech32 format or to use [LUD-17](https://github.com/fiatjaf/lnurl-rfc/blob/luds/17.md) url formatting. "
+ },
+ "enableForStandardInvoices": {
+ "type": "boolean",
+ "description": "Whether to allow this payment method to also be used for standard invoices and not just topup invoices."
+ },
+ "lud12Enabled": {
+ "type": "boolean",
+ "description": "Allow comments to be passed on via lnurl."
+ }
+ }
+ },
+ "LNURLPayPaymentMethodData": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/LNURLPayPaymentMethodBaseData"
+ },
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the payment method is enabled. Note that this can only enabled when a Lightning Network payment method is available and enabled"
+ },
+ "cryptoCode": {
+ "type": "string",
+ "description": "Crypto code of the payment method"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "Store Payment Methods (LNURL Pay)"
+ }
+ ]
+}