2020-12-23 06:00:38 +01:00
{
"paths" : {
"/api/v1/stores/{storeId}/payment-methods/OnChain" : {
"get" : {
"tags" : [
"Store Payment Methods (On Chain)"
] ,
"summary" : "Get store on-chain payment methods" ,
"description" : "View information about the stores' configured on-chain payment methods" ,
"operationId" : "StoreOnChainPaymentMethods_GetOnChainPaymentMethods" ,
2021-02-15 10:05:54 +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-02-15 10:05:54 +01:00
}
] ,
2020-12-23 06:00:38 +01:00
"responses" : {
"200" : {
"description" : "list of payment methods" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodDataList"
}
}
}
}
} ,
"security" : [
{
"API Key" : [
"btcpay.store.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
}
} ,
"/api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}" : {
"get" : {
"tags" : [
"Store Payment Methods (On Chain)"
] ,
"summary" : "Get store on-chain 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" : "StoreOnChainPaymentMethods_GetOnChainPaymentMethod" ,
"responses" : {
"200" : {
"description" : "specified payment method" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodData"
}
}
}
} ,
"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.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
} ,
"put" : {
"tags" : [
"Store Payment Methods (On Chain)"
] ,
"summary" : "Update store on-chain 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/OnChainPaymentMethodData"
}
}
} ,
"required" : true ,
"x-position" : 1
} ,
"operationId" : "StoreOnChainPaymentMethods_UpdateOnChainPaymentMethod" ,
"responses" : {
"200" : {
"description" : "updated specified payment method" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodData"
}
}
}
} ,
"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 (On Chain)"
] ,
"summary" : "Remove store on-chain 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" : [ ]
}
]
}
} ,
"/api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview" : {
"get" : {
"tags" : [
"Store Payment Methods (On Chain)"
] ,
"summary" : "Preview store on-chain payment method addresses" ,
"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"
}
} ,
{
"name" : "offset" ,
"in" : "query" ,
"required" : false ,
"description" : "From which index to fetch the addresses" ,
"schema" : {
"type" : "number"
}
} ,
{
"name" : "amount" ,
"in" : "query" ,
"required" : false ,
"description" : "Number of addresses to preview" ,
"schema" : {
"type" : "number"
}
}
] ,
"description" : "View addresses of the current payment method of the store" ,
"operationId" : "StoreOnChainPaymentMethods_GetOnChainPaymentMethodPreview" ,
"responses" : {
"200" : {
"description" : "specified payment method addresses" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodPreviewResultData"
}
}
}
} ,
"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.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
} ,
"post" : {
"tags" : [
"Store Payment Methods (On Chain)"
] ,
"summary" : "Preview proposed store on-chain payment method addresses" ,
"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"
}
} ,
{
"name" : "offset" ,
"in" : "query" ,
"required" : false ,
"description" : "From which index to fetch the addresses" ,
"schema" : {
"type" : "number"
}
} ,
{
"name" : "amount" ,
"in" : "query" ,
"required" : false ,
"description" : "Number of addresses to preview" ,
"schema" : {
"type" : "number"
}
}
] ,
"description" : "View addresses of a proposed payment method of the store" ,
"operationId" : "StoreOnChainPaymentMethods_GetOnChainPaymentMethodPreview" ,
"requestBody" : {
"x-name" : "request" ,
"content" : {
"application/json" : {
"schema" : {
2021-08-29 19:07:12 -07:00
"$ref" : "#/components/schemas/OnChainPaymentMethodDataPreview"
2020-12-23 06:00:38 +01:00
}
}
} ,
"required" : true ,
"x-position" : 1
} ,
"responses" : {
"200" : {
"description" : "specified payment method addresses" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodPreviewResultData"
}
}
}
} ,
"403" : {
"description" : "If you are authenticated but forbidden to view the specified store"
} ,
"404" : {
"description" : "The key is not found for this store"
}
} ,
"security" : [
{
"API Key" : [
"btcpay.store.canviewstoresettings"
] ,
"Basic" : [ ]
}
]
}
}
} ,
"components" : {
"schemas" : {
"OnChainPaymentMethodDataList" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodData"
}
} ,
2021-07-27 16:53:44 +02:00
"OnChainPaymentMethodDataWithSensitiveData" : {
"allOf" : [
{
"$ref" : "#/components/schemas/OnChainPaymentMethodData"
} ,
{
"type" : "object" ,
"properties" : {
"mnemonic" : {
"type" : "string" ,
"description" : "The mnemonic used to generate the wallet" ,
"nullable" : false
}
}
}
]
} ,
2021-07-23 10:05:15 +02:00
"OnChainPaymentMethodBaseData" : {
2020-12-23 06:00:38 +01:00
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"derivationScheme" : {
"type" : "string" ,
2020-12-28 21:59:01 +09:00
"description" : "The derivation scheme" ,
"example" : "xpub..."
} ,
"label" : {
"type" : "string" ,
"description" : "A label that will be shown in the UI"
} ,
"accountKeyPath" : {
"type" : "string" ,
"description" : "The wallet fingerprint followed by the keypath to derive the account key used for signing operation or creating PSBTs" ,
"example" : "abcd82a1/84'/0'/0'"
2020-12-23 06:00:38 +01:00
}
}
} ,
2021-07-23 10:05:15 +02:00
"OnChainPaymentMethodData" : {
"type" : "object" ,
"additionalProperties" : {
2021-08-29 19:07:12 -07:00
"$ref" : "#/components/schemas/OnChainPaymentMethodDataPreview"
2021-07-23 10:05:15 +02:00
} ,
"properties" : {
"enabled" : {
"type" : "boolean" ,
"description" : "Whether the payment method is enabled"
2021-08-29 19:07:12 -07:00
}
}
} ,
"OnChainPaymentMethodDataPreview" : {
"type" : "object" ,
"additionalProperties" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodBaseData"
} ,
"properties" : {
2021-07-23 10:05:15 +02:00
"cryptoCode" : {
"type" : "string" ,
"description" : "Crypto code of the payment method"
}
}
} ,
2020-12-23 06:00:38 +01:00
"OnChainPaymentMethodPreviewResultData" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"addresses" : {
"type" : "array" ,
"description" : "a list of addresses generated by the derivation scheme" ,
"items" : {
"$ref" : "#/components/schemas/OnChainPaymentMethodPreviewResultAddressItem"
}
}
}
} ,
"OnChainPaymentMethodPreviewResultAddressItem" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"keyPath" : {
"type" : "string" ,
"description" : "The key path relative to the account key path."
} ,
"address" : {
"type" : "string" ,
"description" : "The address generated at the key path"
}
}
2021-07-27 16:53:44 +02:00
} ,
"GenerateOnChainWalletRequest" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"existingMnemonic" : {
"type" : "string" ,
"description" : "An existing BIP39 mnemonic seed to generate the wallet with"
} ,
"passphrase" : {
"type" : "string" ,
"description" : "A passphrase for the BIP39 mnemonic seed"
} ,
"accountNumber" : {
"type" : "number" ,
"default" : 0 ,
"description" : "The account to derive from the BIP39 mnemonic seed"
} ,
"savePrivateKeys" : {
"type" : "boolean" ,
"default" : false ,
"description" : "Whether to store the seed inside BTCPay Server to enable some additional services. IF `false` AND `existingMnemonic` IS NOT SPECIFIED, BE SURE TO SECURELY STORE THE SEED IN THE RESPONSE!"
} ,
"importKeysToRPC" : {
"type" : "boolean" ,
"default" : false ,
"description" : "Whether to import all addresses generated via BTCPay Server into the underlying node wallet. (Private keys will also be imported if `savePrivateKeys` is set to true."
} ,
"wordList" : {
"type" : "string" ,
"description" : "If `existingMnemonic` is not set, a mnemonic is generated using the specified wordList." ,
"default" : "English" ,
"x-enumNames" : [
"English" ,
"Japanese" ,
"Spanish" ,
"ChineseSimplified" ,
"ChineseTraditional" ,
"French" ,
"PortugueseBrazil" ,
"Czech"
] ,
"enum" : [
"English" ,
"Japanese" ,
"Spanish" ,
"ChineseSimplified" ,
"ChineseTraditional" ,
"French" ,
"PortugueseBrazil" ,
"Czech"
]
} ,
"wordCount" : {
"type" : "number" ,
"description" : "If `existingMnemonic` is not set, a mnemonic is generated using the specified wordCount." ,
"default" : 12 ,
"x-enumNames" : [
12 , 15 , 18 , 21 , 24
] ,
"enum" : [
12 , 15 , 18 , 21 , 24
]
} ,
"scriptPubKeyType" : {
"type" : "string" ,
"description" : "the type of wallet to generate" ,
"default" : "Segwit" ,
"x-enumNames" : [
"Legacy" ,
"Segwit" ,
"SegwitP2SH"
] ,
"enum" : [
"Legacy" ,
"Segwit" ,
"SegwitP2SH"
]
}
}
2020-12-23 06:00:38 +01:00
}
}
} ,
"tags" : [
{
"name" : "Store Payment Methods (On Chain)"
}
]
}