2021-02-26 03:58:51 +01:00
{
"paths" : {
"/api/v1/stores/{storeId}/payment-methods/LightningNetwork" : {
"get" : {
"tags" : [
"Store Payment Methods (Lightning Network)"
] ,
"summary" : "Get store Lightning Network payment methods" ,
2021-03-21 03:53:03 +01:00
"parameters" : [
{
"name" : "storeId" ,
"in" : "path" ,
"required" : true ,
"description" : "The store to fetch" ,
"schema" : {
"type" : "string"
}
2021-07-26 11:12:44 +02:00
} ,
{
"name" : "enabled" ,
"in" : "query" ,
"required" : false ,
"description" : "Fetch payment methods that are enabled/disabled only" ,
"schema" : {
"type" : "boolean"
}
2021-03-21 03:53:03 +01:00
}
] ,
2021-02-26 03:58:51 +01:00
"description" : "View information about the stores' configured Lightning Network payment methods" ,
"operationId" : "StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethods" ,
"responses" : {
"200" : {
"description" : "list of payment methods" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodDataList"
}
}
}
}
} ,
"security" : [
{
"API Key" : [
"btcpay.store.canmodifystoresettings"
] ,
"Basic" : [ ]
}
]
}
} ,
"/api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}" : {
"get" : {
"tags" : [
"Store Payment Methods (Lightning Network)"
] ,
"summary" : "Get store Lightning Network 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" : "StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethod" ,
"responses" : {
"200" : {
"description" : "specified payment method" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodData"
}
}
}
} ,
"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 (Lightning Network)"
] ,
"summary" : "Update store Lightning Network 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/LightningNetworkPaymentMethodData"
}
}
} ,
"required" : true ,
"x-position" : 1
} ,
"operationId" : "StoreLightningNetworkPaymentMethods_UpdateLightningNetworkPaymentMethod" ,
"responses" : {
"200" : {
"description" : "updated specified payment method" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodData"
}
}
}
} ,
"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 (Lightning Network)"
] ,
"summary" : "Remove store Lightning Network 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" : {
"LightningNetworkPaymentMethodDataList" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodData"
}
} ,
2021-07-23 10:05:15 +02:00
"LightningNetworkPaymentMethodBaseData" : {
2021-02-26 03:58:51 +01:00
"type" : "object" ,
"additionalProperties" : false ,
2021-07-23 10:05:15 +02:00
"properties" : {
"connectionString" : {
"type" : "string" ,
"description" : "The lightning connection string. Set to 'Internal Node' to use the internal node. (See [this doc](https://github.com/btcpayserver/BTCPayServer.Lightning/blob/master/README.md#examples) for some example)" ,
"example" : "type=clightning;server=..."
}
}
} ,
"LightningNetworkPaymentMethodData" : {
"type" : "object" ,
"additionalProperties" : {
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodBaseData"
} ,
2021-02-26 03:58:51 +01:00
"properties" : {
"enabled" : {
"type" : "boolean" ,
"description" : "Whether the payment method is enabled"
} ,
"cryptoCode" : {
"type" : "string" ,
"description" : "Crypto code of the payment method"
}
}
}
}
} ,
"tags" : [
{
"name" : "Store Payment Methods (Lightning Network)"
}
]
}