2021-07-23 10:05:15 +02:00
{
"paths" : {
"/api/v1/stores/{storeId}/payment-methods" : {
"get" : {
"tags" : [
"Store Payment Methods"
] ,
"summary" : "Get store payment methods" ,
"description" : "View information about the stores' configured payment methods" ,
"operationId" : "StorePaymentMethods_GetStorePaymentMethods" ,
"parameters" : [
{
"name" : "storeId" ,
"in" : "path" ,
"required" : true ,
"description" : "The store to fetch" ,
"schema" : {
"type" : "string"
}
} ,
{
2024-04-04 09:31:04 +02:00
"name" : "onlyEnabled" ,
2021-07-23 10:05:15 +02:00
"in" : "query" ,
"required" : false ,
2021-07-26 11:12:44 +02:00
"description" : "Fetch payment methods that are enabled/disabled only" ,
2021-07-23 10:05:15 +02:00
"schema" : {
"type" : "boolean"
}
2024-04-04 09:31:04 +02:00
} ,
{
"name" : "includeConfig" ,
"in" : "query" ,
"required" : false ,
"description" : "Fetch the config of the payment methods, if `true`, the permission `btcpay.store.canmodifystoresettings` is required." ,
"schema" : {
"type" : "boolean"
}
2021-07-23 10:05:15 +02:00
}
] ,
"responses" : {
"200" : {
2022-04-21 05:12:30 +02:00
"description" : "List of payment methods" ,
2021-07-23 10:05:15 +02:00
"content" : {
"application/json" : {
"schema" : {
2022-04-21 05:12:30 +02:00
"type" : "array" ,
"items" : {
2021-07-23 10:05:15 +02:00
"$ref" : "#/components/schemas/GenericPaymentMethodData"
}
}
}
}
2022-10-25 13:37:36 +02:00
} ,
"401" : {
"description" : "Missing authorization" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
} ,
"default" : {
"description" : "Unexpected error" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
2021-07-23 10:05:15 +02:00
}
} ,
"security" : [
{
2022-02-02 12:12:48 +01:00
"API_Key" : [
2021-07-23 10:05:15 +02:00
"btcpay.store.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
}
2024-04-04 09:31:04 +02:00
} ,
"/api/v1/stores/{storeId}/payment-methods/{paymentMethodId}" : {
"get" : {
"tags" : [
"Store Payment Methods"
] ,
"summary" : "Get store payment method" ,
"description" : "View information about the stores' configured payment method" ,
"operationId" : "StorePaymentMethods_GetStorePaymentMethod" ,
"parameters" : [
{
"name" : "storeId" ,
"in" : "path" ,
"required" : true ,
"description" : "The store to fetch" ,
"schema" : {
"type" : "string"
}
} ,
{
"name" : "includeConfig" ,
"in" : "query" ,
"required" : false ,
"description" : "Fetch the config of the payment methods, if `true`, the permission `btcpay.store.canmodifystoresettings` is required." ,
"schema" : {
"type" : "boolean"
}
} ,
{
"$ref" : "#/components/parameters/PaymentMethodId"
}
] ,
"responses" : {
"200" : {
"description" : "The payment method config" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GenericPaymentMethodData"
}
}
}
} ,
"401" : {
"description" : "Missing authorization" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
} ,
"default" : {
"description" : "Unexpected error" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
}
} ,
"security" : [
{
"API_Key" : [
"btcpay.store.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
} ,
"put" : {
"tags" : [
"Store Payment Methods"
] ,
"summary" : "Update store's payment method" ,
"description" : "Update information about the stores' configured payment method" ,
"operationId" : "StorePaymentMethods_UpdateStorePaymentMethod" ,
"parameters" : [
{
"name" : "storeId" ,
"in" : "path" ,
"required" : true ,
"description" : "The store to fetch" ,
"schema" : {
"type" : "string"
}
} ,
{
"$ref" : "#/components/parameters/PaymentMethodId"
}
] ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UpdatePaymentMethodConfig"
}
}
}
} ,
"responses" : {
"200" : {
"description" : "The payment method config" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GenericPaymentMethodData"
}
}
}
} ,
"401" : {
"description" : "Missing authorization" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
} ,
"default" : {
"description" : "Unexpected error" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
}
} ,
"security" : [
{
"API_Key" : [
"btcpay.store.canmodifystoresettings"
] ,
"Basic" : [ ]
}
]
} ,
"delete" : {
"tags" : [
"Store Payment Methods"
] ,
"summary" : "Delete store's payment method" ,
"description" : "Delete information about the stores' configured payment method" ,
"operationId" : "StorePaymentMethods_DeleteStorePaymentMethod" ,
"parameters" : [
{
"name" : "storeId" ,
"in" : "path" ,
"required" : true ,
"description" : "The store to fetch" ,
"schema" : {
"type" : "string"
}
} ,
{
"$ref" : "#/components/parameters/PaymentMethodId"
}
] ,
"responses" : {
"200" : {
"description" : "The configuration got deleted"
} ,
"401" : {
"description" : "Missing authorization" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
} ,
"default" : {
"description" : "Unexpected error" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemDetails"
}
}
}
}
} ,
"security" : [
{
"API_Key" : [
"btcpay.store.canmodifystoresettings"
] ,
"Basic" : [ ]
}
]
}
2021-07-23 10:05:15 +02:00
}
} ,
"components" : {
2024-04-04 09:31:04 +02:00
"parameters" : {
"PaymentMethodId" : {
"name" : "paymentMethodId" ,
"in" : "path" ,
"required" : true ,
"description" : "The payment method id of the payment method to update" ,
"schema" : {
"$ref" : "#/components/schemas/PaymentMethodId"
} ,
"example" : "BTC-CHAIN"
}
} ,
2021-07-23 10:05:15 +02:00
"schemas" : {
2024-04-04 09:31:04 +02:00
"UpdatePaymentMethodConfig" : {
"type" : "object" ,
"properties" : {
"enabled" : {
"type" : "boolean" ,
"description" : "Whether the payment method is enabled, leave null or unspecified to not change current setting" ,
"default" : null ,
"nullable" : true ,
"example" : true
} ,
"config" : {
"type" : "object" ,
"description" : "The new payment method config, leave null or unspecified to not change current setting" ,
"default" : null ,
"nullable" : true ,
"oneOf" : [
{
"$ref" : "#/components/schemas/OnChainPaymentMethodBaseData"
} ,
{
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodBaseData"
} ,
{
"$ref" : "#/components/schemas/LNURLPayPaymentMethodBaseData"
} ,
{
"type" : "string" ,
"title" : "Lightning connection string" ,
"description" : "A lightning connection string or `Internal Node` (See [this documentation](https://github.com/btcpayserver/btcpayserver.lightning) for the format)"
} ,
{
"type" : "string" ,
"title" : "Derivation scheme" ,
"description" : "A derivation scheme in NBXplorer's format (See [this documentation](https://github.com/dgarage/NBXplorer/blob/master/docs/API.md#derivation-scheme) for the format)"
} ,
{
"type" : "string" ,
"title" : "Output descriptor" ,
"description" : "An output descriptor. Only a subset of them are supported. (See [this documentation](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md) for the format)"
} ,
{
"description" : "Any other unofficial payment method data" ,
"type" : "object" ,
"additionalProperties" : true
}
]
}
}
} ,
2021-07-23 10:05:15 +02:00
"GenericPaymentMethodData" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"enabled" : {
"type" : "boolean" ,
"description" : "Whether the payment method is enabled"
} ,
2024-04-04 09:31:04 +02:00
"paymentMethodId" : {
"$ref" : "#/components/schemas/PaymentMethodId"
2021-09-25 07:04:34 +02:00
} ,
2024-04-04 09:31:04 +02:00
"config" : {
2021-07-23 10:05:15 +02:00
"type" : "object" ,
"additionalProperties" : false ,
"description" : "Associated dynamic data based on payment method type." ,
"oneOf" : [
{
"$ref" : "#/components/schemas/OnChainPaymentMethodBaseData"
} ,
{
"$ref" : "#/components/schemas/LightningNetworkPaymentMethodBaseData"
} ,
2024-04-04 09:31:04 +02:00
{
"$ref" : "#/components/schemas/LNURLPayPaymentMethodBaseData"
} ,
2021-07-23 10:05:15 +02:00
{
"description" : "Any other unofficial payment method data" ,
"type" : "object" ,
"additionalProperties" : true
}
]
}
}
}
}
} ,
"tags" : [
{
2022-10-25 13:37:36 +02:00
"name" : "Store Payment Methods" ,
"description" : "Store Payment Methods operations"
2021-07-23 10:05:15 +02:00
}
]
}