openapi: 3.0.0 info: title: BTCPay Greenfield API description: >+ # Introduction The BTCPay Server Greenfield API is a REST API. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # Authentication You can authenticate either via Basic Auth or an API key. It's recommended to use an API key for better security. You can create an API key in the BTCPay Server UI under `Account` -> `Manage Account` -> `API keys`. You can restrict the API key for one or multiple stores and for specific permissions. For testing purposes, you can give it the 'Unrestricted access' permission. On production you should limit the permissions to the actual endpoints you use, you can see the required permission on the API docs at the top of each endpoint under `AUTHORIZATIONS`. If you want to simplify the process of creating API keys for your users, you can use the [Authorization endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#tag/Authorization) to predefine permissions and redirect your users to the BTCPay Server Authorization UI. You can find more information about this on the [API Authorization Flow docs](https://docs.btcpayserver.org/BTCPayServer/greenfield-authorization/) page. # Usage examples Use **Basic Auth** to read store information with cURL: ```bash BTCPAY_INSTANCE="https://mainnet.demo.btcpayserver.org" USER="MyTestUser@gmail.com" PASSWORD="notverysecurepassword" PERMISSION="btcpay.store.canmodifystoresettings" BODY="$(echo "{}" | jq --arg "a" "$PERMISSION" '. + {permissions:[$a]}')" API_KEY="$(curl -s \ -H "Content-Type: application/json" \ --user "$USER:$PASSWORD" \ -X POST \ -d "$BODY" \ "$BTCPAY_INSTANCE/api/v1/api-keys" | jq -r .apiKey)" ``` Use an **API key** to read store information with cURL: ```bash STORE_ID="yourStoreId" curl -s \ -H "Content-Type: application/json" \ -H "Authorization: token $API_KEY" \ -X GET \ "$BTCPAY_INSTANCE/api/v1/stores/$STORE_ID" ``` You can find more examples on our docs for different programming languages: - [cURL](https://docs.btcpayserver.org/Development/GreenFieldExample/) - [Javascript/Node.Js](https://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/) - [PHP](https://docs.btcpayserver.org/Development/GreenFieldExample-PHP/) version: v1 contact: name: BTCPay Server url: https://btcpayserver.org license: name: MIT url: https://github.com/btcpayserver/btcpayserver/blob/master/LICENSE x-api-status-urls: false x-konfig-ignore: potential-incorrect-type: true servers: - description: BTCPay Server Greenfield API url: '' tags: - description: Store Wallet (On Chain) operations name: Store Wallet (On Chain) - description: Custodian operations name: Custodians - description: Lightning (Internal Node) operations name: Lightning (Internal Node) - description: Lightning (Store) operations name: Lightning (Store) - description: Invoice operations name: Invoices - description: App operations name: Apps - description: Stores (Payout Processors) operations name: Stores (Payout Processors) - description: Webhook operations name: Webhooks - description: User operations name: Users - description: Store Payment Methods (On Chain) operations name: Store Payment Methods (On Chain) - name: Stores (Payouts) - description: API Key operations name: API Keys - description: Payment Requests operations name: Payment Requests - description: Pull payments (Public) operations name: Pull payments (Public) - description: Store operations name: Stores - description: Miscelleneous operations name: Miscelleneous - description: Notifications operations name: Notifications (Current User) - description: Store Payment Methods (LNURL Pay) operations name: Store Payment Methods (LNURL Pay) - description: Store Payment Methods (Lightning Network) operations name: Store Payment Methods (Lightning Network) - name: Lightning address - description: Pull payments (Management) operations name: Pull payments (Management) - description: Store Emails operations name: Stores (Email) - description: Store Rates Config operations name: Stores (Rates Config) - description: Store Users operations name: Stores (Users) - description: Server Info operations name: ServerInfo - name: Crowdfund - description: Authorization operations name: Authorization - description: Health operations name: Health - description: Payout Processors operations name: Payout Processors - description: Pull payments payout (Public) operations name: Pull payments payout (Public) - description: Store Payment Methods operations name: Store Payment Methods - description: Store Rates operations name: Stores (Rates) - name: Point of Sale paths: /api/v1/api-keys/{apikey}: delete: tags: - API Keys summary: Revoke an API Key operationId: ApiKeys_DeleteApiKey security: - API_Key: - unrestricted Basic: [] description: Revoke the current API key so that it cannot be used anymore parameters: - description: The API Key to revoke name: apikey in: path required: true schema: type: string responses: '200': description: The key has been deleted '404': description: The key is not found for this user /api/v1/users/{idOrEmail}/api-keys/{apikey}: delete: tags: - API Keys summary: Revoke an API Key of target user operationId: ApiKeys_DeleteUserApiKey security: - API_Key: - unrestricted Basic: [] description: Revoke the API key of a target user so that it cannot be used anymore parameters: - description: The API Key to revoke name: apikey in: path required: true schema: type: string - description: The target user's id or email name: idOrEmail in: path required: true schema: type: string responses: '200': description: The key has been deleted '404': description: The key is not found for this user /api/v1/api-keys/current: get: tags: - API Keys summary: Get the current API Key information operationId: ApiKeys_GetCurrentApiKey security: - API_Key: - btcpay.server.canmanageusers Basic: [] description: View information about the current API key responses: '200': description: Information about the current api key content: application/json: schema: $ref: '#/components/schemas/ApiKeyData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' delete: tags: - API Keys summary: Revoke the current API Key operationId: ApiKeys_DeleteCurrentApiKey security: - API_Key: [] description: Revoke the current API key so that it cannot be used anymore responses: '200': description: The key was revoked and is no longer usable content: application/json: schema: $ref: '#/components/schemas/ApiKeyData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/api-keys: post: tags: - API Keys summary: Create a new API Key operationId: ApiKeys_CreateApiKey security: - API_Key: - unrestricted Basic: [] description: Create a new API Key requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/ApiKeysCreateApiKeyRequest' responses: '200': description: Information about the new api key content: application/json: schema: $ref: '#/components/schemas/ApiKeyData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/users/{idOrEmail}/api-keys: post: tags: - API Keys summary: Create a new API Key for a user operationId: ApiKeys_CreateUserApiKey security: - API_Key: - btcpay.server.canmanageusers Basic: [] description: Create a new API Key for a user parameters: - description: The target user's id or email name: idOrEmail in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/ApiKeysCreateUserApiKeyRequest' responses: '200': description: Information about the new api key content: application/json: schema: $ref: '#/components/schemas/ApiKeyData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/apps/pos: parameters: - description: The store ID name: storeId in: path required: true schema: type: string post: tags: - Apps summary: Create a new Point of Sale app operationId: Apps_CreatePointOfSaleApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Point of Sale app allows accepting payments for items in a virtual store requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreatePointOfSaleAppRequest' required: true x-position: 1 responses: '200': description: Created app details content: application/json: schema: $ref: '#/components/schemas/PointOfSaleAppData' '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/apps/pos/{appId}: parameters: - description: App ID name: appId in: path required: true schema: type: string put: tags: - Apps summary: Update a Point of Sale app operationId: Apps_PutPointOfSaleApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Use this endpoint for updating the properties of a POS app requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreatePointOfSaleAppRequest' required: true x-position: 1 responses: '200': description: App details content: application/json: schema: $ref: '#/components/schemas/PointOfSaleAppData' '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' get: tags: - Apps - Point of Sale summary: Get Point of Sale app data operationId: Apps_GetPointOfSaleApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Returns POS app data responses: '200': description: POS app data content: application/json: schema: $ref: '#/components/schemas/PointOfSaleAppData' '404': description: POS app with specified ID was not found /api/v1/apps/crowdfund/{appId}: parameters: - description: Crowdfund app ID name: appId in: path required: true schema: type: string get: tags: - Apps - Crowdfund summary: Get crowdfund app data operationId: Apps_GetCrowdfundApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Returns crowdfund app data responses: '200': description: Crowdfund app data content: application/json: schema: $ref: '#/components/schemas/CrowdfundAppData' '404': description: Crowdfund app with specified ID was not found /api/v1/stores/{storeId}/apps/crowdfund: parameters: - description: The store ID name: storeId in: path required: true schema: type: string post: tags: - Apps - Crowdfund summary: Create a new Crowdfund app operationId: Apps_CreateCrowdfundApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreateCrowdfundAppRequest' required: true x-position: 1 responses: '200': description: Created app details content: application/json: schema: $ref: '#/components/schemas/CrowdfundAppData' '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/apps/{appId}: get: tags: - Apps summary: Get basic app data operationId: Apps_GetApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Returns basic app data shared between all types of apps parameters: - description: The app ID name: appId in: path required: true schema: type: string responses: '200': description: Basic app data content: application/json: schema: $ref: '#/components/schemas/BasicAppData' '404': description: App with specified ID was not found delete: tags: - Apps summary: Delete app operationId: Apps_DeleteApp security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Deletes apps with specified ID parameters: - description: The app ID name: appId in: path required: true schema: type: string responses: '200': description: App was deleted '404': description: App with specified ID was not found /api/v1/stores/{storeId}/apps: parameters: - description: The store ID name: storeId in: path required: true schema: type: string get: tags: - Apps summary: Get basic app data for all apps for a store operationId: Apps_GetAllAppsForStore security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Returns basic app data for all apps for a store responses: '200': description: Array of basic app data object content: application/json: schema: $ref: '#/components/schemas/AppsGetAllAppsForStoreResponse' /api/v1/apps: get: tags: - Apps summary: Get basic app data for all apps for all stores for a user operationId: Apps_GetAllApps security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Returns basic app data for all apps for all stores responses: '200': description: Array of basic app data object content: application/json: schema: $ref: '#/components/schemas/AppsGetAllAppsResponse' /api-keys/authorize: get: tags: - Authorization summary: Authorize User operationId: ApiKeys_Authorize security: [] description: >- Redirect the browser to this endpoint to request the user to generate an api-key with specific permissions parameters: - description: The permissions to request. (See API Key authentication) name: permissions in: query style: form explode: true schema: type: array nullable: true items: type: string x-position: 1 - description: >- If permissions are specified, and strict is set to false, it will allow the user to reject some of permissions the application is requesting. name: strict in: query schema: type: boolean default: true nullable: true x-position: 3 - description: >- If specified, BTCPay Server will check if there is an existing API key associated with the user that also has this application identifier, redirect host AND the permissions required match(takes selectiveStores and strict into account). `applicationIdentifier` is ignored if redirect is not specified. name: applicationIdentifier in: query schema: type: string nullable: true x-position: 6 - description: >- If the application is requesting the CanModifyStoreSettings permission and selectiveStores is set to true, this allows the user to only grant permissions to selected stores under the user's control. name: selectiveStores in: query schema: type: boolean default: false nullable: true x-position: 4 - description: The name of your application name: applicationName in: query schema: type: string nullable: true x-position: 2 - description: >- The url to redirect to after the user consents, with the query parameters appended to it: permissions, user-id, api-key. If not specified, user is redirected to their API Key list. name: redirect in: query schema: type: string format: url nullable: true x-position: 5 responses: '200': description: A HTML form that a user can use to confirm permissions to grant content: text/html: {} '307': description: >- Makes browser do an HTTP POST request to the specified url in `redirect` with a JSON body consisting of `apiKey` (the api key created or matched), `permissions` (the permissions the user consented to), and `userId` (the id of the user that consented) upon consent '401': description: Missing authorization content: text/html: {} /api/v1/custodians: get: tags: - Custodians summary: List supported custodians operationId: Custodians_GetSupportedCustodians description: >- List all supported custodians for the BTCPay instance. You can install plugins to add more custodians. responses: '200': description: List of supported custodians content: application/json: schema: $ref: '#/components/schemas/CustodiansGetSupportedCustodiansResponse' /api/v1/stores/{storeId}/custodian-accounts: get: tags: - Custodians summary: List store custodian accounts operationId: Custodians_GetStoreCustodianAccounts parameters: - description: >- Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key). name: assetBalances in: query required: false schema: type: boolean default: false - description: The Store ID name: storeId in: path required: true schema: type: string responses: '200': description: List of custodian accounts for the store. content: application/json: schema: $ref: >- #/components/schemas/CustodiansGetStoreCustodianAccountsResponse '403': description: >- If you are authenticated but forbidden to view the store's custodian accounts post: tags: - Custodians summary: Add a custodial account to a store. operationId: Custodians_AddStoreCustodianAccount security: - API_Key: - btcpay.store.canmanagecustodianaccounts Basic: [] description: Add a custodial account to a store. parameters: - description: The Store ID name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreateCustodianAccountRequest' required: true x-position: 1 responses: '200': description: Information about the new custodian account content: application/json: schema: $ref: '#/components/schemas/CustodianAccountData' '403': description: If you are authenticated but forbidden to add new custodian account /api/v1/stores/{storeId}/custodian-accounts/{accountId}: get: tags: - Custodians summary: Get store custodian account operationId: Custodians_GetStoreCustodianAccount parameters: - description: >- Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key). name: assetBalances in: query required: false schema: type: boolean default: false - description: The Custodian Account ID name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string responses: '200': description: List of custodian accounts for the store. content: application/json: schema: $ref: '#/components/schemas/CustodianAccountData' '403': description: If you are authenticated but forbidden to view the custodian account put: tags: - Custodians summary: Update custodial account operationId: Custodians_UpdateStoreCustodianAccount security: - API_Key: - btcpay.store.canmanagecustodianaccounts Basic: [] description: Update custodial account parameters: - description: The Custodian Account ID name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreateCustodianAccountRequest' required: true x-position: 1 responses: '200': description: The updated custodian account content: application/json: schema: $ref: '#/components/schemas/CustodianAccountData' '403': description: >- If you are authenticated but forbidden to modify new custodian account delete: tags: - Custodians summary: Delete store custodian account operationId: Custodians_DeleteStoreCustodianAccount description: Deletes a custodial account parameters: - description: The Custodian Account ID name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string responses: '200': description: Custodian account deleted '403': description: >- If you are authenticated but forbidden to delete the custodian account /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote: get: tags: - Custodians summary: Get quote for trading one asset for another operationId: Custodians_GetStoreCustodianAccountTradeQuote security: - API_Key: - btcpay.store.canviewcustodianaccounts Basic: [] description: Get the current bid and ask price for converting one asset into another. parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string - description: The asset to convert. name: fromAsset in: query required: true schema: type: string - description: The asset you want. name: toAsset in: query required: true schema: type: string responses: '200': description: The quote for converting one asset to another. content: application/json: schema: $ref: '#/components/schemas/QuoteResultData' '403': description: If you are authenticated but forbidden to create trades '404': description: No tradable asset pair found for this trade. /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market: post: tags: - Custodians summary: Trade one asset for another operationId: Custodians_StoreCustodianAccountTradeMarket security: - API_Key: - btcpay.store.cantradecustodianaccounts Basic: [] description: >- Trade one asset for another using a market order (=instant purchase with instant result or failure). A suitable asset pair will automatically be selected. If no asset pair is available, the call will fail. parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/TradeRequestData' responses: '200': description: Information about the trade that was executed content: application/json: schema: $ref: '#/components/schemas/TradeResultData' '403': description: If you are authenticated but forbidden to create trades '404': description: No tradable asset pair found for this trade. /api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod}: get: tags: - Custodians summary: Get a deposit address for custodian operationId: Custodians_GetStoreCustodianAccountDepositAddress security: - API_Key: - btcpay.store.candeposittocustodianaccounts Basic: [] description: >- Get a new deposit address for the custodian using the specified payment method (network + crypto code). parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string - description: >- The payment method to use for the deposit. Example: "BTC-OnChain" or "BTC-Lightning" name: paymentMethod in: path required: true schema: type: string responses: '200': description: deposit address content: application/json: schema: $ref: >- #/components/schemas/CustodiansGetStoreCustodianAccountDepositAddressResponse example: depositAddress: bc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '403': description: If you are authenticated but forbidden to get the deposit address '404': description: The custodian does not support deposits using this payment method. /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/simulation: post: tags: - Custodians summary: Simulate a withdrawal operationId: Custodians_SimulateWithdrawFromStoreCustodianAccount security: - API_Key: - btcpay.store.canwithdrawfromcustodianaccounts Basic: [] description: >- Get more information about a potential withdrawal including fees, minimum and maximum quantities for the given asset and quantity. parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string - description: The payment method to be used for the withdrawal. name: paymentMethod in: query required: true schema: type: string - description: The quantity to simulate a withdrawal for. name: qty in: query required: true schema: type: number requestBody: content: application/json: schema: $ref: '#/components/schemas/WithdrawalRequestData' required: true responses: '200': description: >- Information about a potential withdrawal including fees, minimum and maximum quantities. content: application/json: schema: $ref: '#/components/schemas/WithdrawalSimulationResultData' '400': description: >- Withdrawal is not possible because you don't have this much in your account. '403': description: Forbidden content: application/json: schema: $ref: >- #/components/schemas/CustodiansSimulateWithdrawFromStoreCustodianAccountResponse '404': description: Withdrawal is not possible for this payment method. /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals: post: tags: - Custodians summary: Withdraw to store wallet operationId: Custodians_WithdrawFromStoreCustodianAccount security: - API_Key: - btcpay.store.canwithdrawfromcustodianaccounts Basic: [] description: Withdraw an asset to your store wallet. parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/WithdrawalRequestData' required: true x-position: 1 responses: '200': description: Information about the withdrawal that was executed content: application/json: schema: $ref: '#/components/schemas/WithdrawalResultData' '400': description: >- Withdrawal is not possible because you don't have this much in your account. '403': description: Forbidden content: application/json: schema: $ref: >- #/components/schemas/CustodiansWithdrawFromStoreCustodianAccountResponse '404': description: Withdrawal is not possible for this asset. /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{withdrawalId}: get: tags: - Custodians summary: Get withdrawal info operationId: Custodians_GetStoreCustodianAccountWithdrawalInfo security: - API_Key: - btcpay.store.canwithdrawfromcustodianaccounts Basic: [] description: Get the details about a past withdrawal. parameters: - description: The Custodian Account ID. name: accountId in: path required: true schema: type: string - description: The Store ID name: storeId in: path required: true schema: type: string - description: The Withdrawal ID. name: withdrawalId in: path required: true schema: type: string responses: '200': description: Information about the withdrawal content: application/json: schema: $ref: '#/components/schemas/WithdrawalResultData' '403': description: Forbidden content: application/json: schema: $ref: >- #/components/schemas/CustodiansGetStoreCustodianAccountWithdrawalInfoResponse '404': description: Withdrawal not found. /api/v1/health: get: tags: - Health summary: Get health status operationId: Health_GetHealth security: [] description: Check the instance health status responses: '200': description: Instance is up content: application/json: schema: $ref: '#/components/schemas/ApplicationHealthData' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/invoices: get: tags: - Invoices summary: Get invoices operationId: Invoices_GetInvoices security: - API_Key: - btcpay.store.canviewinvoices Basic: [] description: View information about the existing invoices parameters: - description: Array of OrderIds to fetch the invoices for name: orderId in: query required: false schema: type: array items: type: string example: 1000&orderId=1001&orderId=1002 - description: A term that can help locating specific invoices. name: textSearch in: query required: false schema: type: string - description: Array of statuses of invoices to be fetched name: status in: query required: false schema: $ref: '#/components/schemas/InvoiceStatus' - description: End date of the period to retrieve invoices name: endDate in: query required: false schema: $ref: '#/components/schemas/UnixTimestamp' - description: Number of records returned in response name: take in: query required: false schema: nullable: true type: number - description: Number of records to skip name: skip in: query required: false schema: nullable: true type: number - description: Start date of the period to retrieve invoices name: startDate in: query required: false schema: $ref: '#/components/schemas/UnixTimestamp' - description: The store to query name: storeId in: path required: true schema: type: string responses: '200': description: List of invoices content: application/json: schema: $ref: '#/components/schemas/InvoiceDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' post: tags: - Invoices summary: Create a new invoice operationId: Invoices_CreateInvoice security: - API_Key: - btcpay.store.cancreateinvoice Basic: [] description: Create a new invoice parameters: - description: The store to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateInvoiceRequest' responses: '200': description: Information about the new invoice content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '400': description: A list of errors that occurred when creating the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to add new invoices /api/v1/stores/{storeId}/invoices/{invoiceId}: get: tags: - Invoices summary: Get invoice operationId: Invoices_GetInvoice security: - API_Key: - btcpay.store.canviewinvoices Basic: [] description: View information about the specified invoice parameters: - description: The invoice to fetch name: invoiceId in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified invoice content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '403': description: If you are authenticated but forbidden to view the specified invoice '404': description: The key is not found for this invoice delete: tags: - Invoices summary: Archive invoice operationId: Invoices_ArchiveInvoice security: - API_Key: - btcpay.store.canmodifyinvoices Basic: [] description: Archives the specified invoice. parameters: - description: The invoice to remove name: invoiceId in: path required: true schema: type: string - description: The store the invoice belongs to name: storeId in: path required: true schema: type: string responses: '200': description: The invoice has been archived '400': description: A list of errors that occurred when archiving the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: >- If you are authenticated but forbidden to archive the specified invoice '404': description: The key is not found for this invoice put: tags: - Invoices summary: Update invoice operationId: Invoices_UpdateInvoice security: - API_Key: - btcpay.store.canmodifyinvoices Basic: [] description: Updates the specified invoice. parameters: - description: The invoice to update name: invoiceId in: path required: true schema: type: string - description: The store the invoice belongs to name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateInvoiceRequest' responses: '200': description: The invoice that has been updated content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '400': description: A list of errors that occurred when updating the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: >- If you are authenticated but forbidden to update the specified invoice '404': description: The key is not found for this invoice /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods: get: tags: - Invoices summary: Get invoice payment methods operationId: Invoices_GetInvoicePaymentMethods security: - API_Key: - btcpay.store.canviewinvoices Basic: [] description: View information about the specified invoice's payment methods parameters: - description: >- If default or true, only returns payments which are accounted (in Bitcoin, this mean not returning RBF'd or double spent payments) name: onlyAccountedPayments in: query required: false schema: type: boolean default: true - description: The invoice to fetch name: invoiceId in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified invoice payment methods data content: application/json: schema: $ref: '#/components/schemas/InvoicesGetInvoicePaymentMethodsResponse' '403': description: If you are authenticated but forbidden to view the specified invoice '404': description: The key is not found for this invoice /api/v1/stores/{storeId}/invoices/{invoiceId}/status: post: tags: - Invoices summary: Mark invoice status operationId: Invoices_MarkInvoiceStatus security: - API_Key: - btcpay.store.canmodifyinvoices Basic: [] description: Mark an invoice as invalid or settled. parameters: - description: The invoice to update name: invoiceId in: path required: true schema: type: string - description: The store to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MarkInvoiceStatusRequest' responses: '200': description: The updated invoice content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '400': description: A list of errors that occurred when updating the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to update the invoice /api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive: post: tags: - Invoices summary: Unarchive invoice operationId: Invoices_UnarchiveInvoice security: - API_Key: - btcpay.store.canmodifyinvoices Basic: [] description: Unarchive an invoice parameters: - description: The invoice to update name: invoiceId in: path required: true schema: type: string - description: The store to query name: storeId in: path required: true schema: type: string responses: '200': description: The unarchived invoice content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '400': description: A list of errors that occurred when updating the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to update the invoice /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate: post: tags: - Invoices summary: Activate Payment Method operationId: Invoices_ActivatePaymentMethod security: - API_Key: - btcpay.store.canviewinvoices Basic: [] description: Activate an invoice payment method (if lazy payments mode is enabled) parameters: - description: The invoice to update name: invoiceId in: path required: true schema: type: string - description: The payment method to activate name: paymentMethod in: path required: true schema: type: string - description: The store to query name: storeId in: path required: true schema: type: string responses: '200': description: '' '400': description: A list of errors that occurred when updating the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: >- If you are authenticated but forbidden to activate the invoice payment method /api/v1/stores/{storeId}/invoices/{invoiceId}/refund: post: tags: - Invoices summary: Refund invoice operationId: Invoices_Refund security: - API_Key: - btcpay.store.cancreatepullpayments Basic: [] description: Refund invoice parameters: - description: The invoice to refund name: invoiceId in: path required: true schema: type: string - description: The store to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoicesRefundRequest' responses: '200': description: Pull payment for refunding the invoice content: application/json: schema: $ref: '#/components/schemas/PullPaymentData' '400': description: A list of errors that occurred when refunding the invoice content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to refund the invoice /api/v1/server/lightning/{cryptoCode}/info: get: tags: - Lightning (Internal Node) summary: Get node information operationId: InternalLightningNodeApi_GetInfo security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: View information about the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC responses: '200': description: Lightning node information such as reachable nodeinfos content: application/json: schema: $ref: '#/components/schemas/LightningNodeInformationData' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/balance: get: tags: - Lightning (Internal Node) summary: Get node balance operationId: InternalLightningNodeApi_GetBalance security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: View balance of the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC responses: '200': description: Lightning node balance for on-chain and off-chain funds content: application/json: schema: $ref: '#/components/schemas/LightningNodeBalanceData' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/connect: post: tags: - Lightning (Internal Node) summary: Connect to lightning node operationId: InternalLightningNodeApi_ConnectToNode security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: Connect to another lightning node. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ConnectToNodeRequest' responses: '200': description: Successfully connected '400': description: 'Wellknown error codes are: `could-not-connect`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/channels: get: tags: - Lightning (Internal Node) summary: Get channels operationId: InternalLightningNodeApi_GetChannels security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: View information about the current channels of the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC responses: '200': description: list of channels content: application/json: schema: $ref: >- #/components/schemas/InternalLightningNodeApiGetChannelsResponse '404': description: The lightning node configuration was not found post: tags: - Lightning (Internal Node) summary: Open channel operationId: InternalLightningNodeApi_OpenChannel security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: >- Open a channel with another lightning node. You should connect to that node first. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OpenLightningChannelRequest' responses: '200': description: Successfully opened '400': description: >- Wellknown error codes are: `channel-already-exists`, `cannot-afford-funding`, `need-more-confirmations`, `peer-not-connected` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/server/lightning/{cryptoCode}/address: post: tags: - Lightning (Internal Node) summary: Get deposit address operationId: InternalLightningNodeApi_GetDepositAddress security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: 'Get an on-chain deposit address for the lightning node ' parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC responses: '200': description: deposit address content: application/json: schema: $ref: >- #/components/schemas/InternalLightningNodeApiGetDepositAddressResponse '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/payments/{paymentHash}: get: tags: - Lightning (Internal Node) summary: Get payment operationId: InternalLightningNodeApi_GetPayment security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: View information about the requested lightning payment parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The payment hash of the lightning payment. name: paymentHash in: path required: true schema: type: string responses: '200': description: Lightning payment data content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '404': description: >- The lightning node configuration or the specified invoice was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/invoices/{id}: get: tags: - Lightning (Internal Node) summary: Get invoice operationId: InternalLightningNodeApi_GetInvoice security: - API_Key: - btcpay.server.canviewlightninginvoiceinternalnode Basic: [] description: View information about the requested lightning invoice parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The id of the lightning invoice. name: id in: path required: true schema: type: string responses: '200': description: Lightning invoice data content: application/json: schema: $ref: '#/components/schemas/LightningInvoiceData' '404': description: >- The lightning node configuration or the specified invoice was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/invoices/pay: post: tags: - Lightning (Internal Node) summary: Pay Lightning Invoice operationId: InternalLightningNodeApi_PayInvoice security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: >- Pay a lightning invoice. In case the payment response times out, the status will be reported as pending and the final status can be resolved using the [Get payment](https://docs.btcpayserver.org) endpoint. The default wait time for payment responses is 30 seconds — it might take longer if multiple routes are tried or a hold invoice is getting paid. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PayLightningInvoiceRequest' responses: '200': description: Successfully paid content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '202': description: Payment initiated content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '400': description: 'Wellknown error codes are: `could-not-find-route`, `generic-error`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/invoices: get: tags: - Lightning (Internal Node) summary: Get invoices operationId: InternalLightningNodeApi_GetInvoices security: - API_Key: - btcpay.server.canviewlightninginvoiceinternalnode Basic: [] description: View information about the lightning invoices parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: Limit to pending invoices only name: pendingOnly in: query required: false schema: type: boolean nullable: true default: false - description: The index of an invoice that will be used as the start of the list name: offsetIndex in: query required: false schema: type: number nullable: true default: 0 responses: '200': description: Lightning invoice data content: application/json: schema: $ref: >- #/components/schemas/InternalLightningNodeApiGetInvoicesResponse '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '503': description: Unable to access the lightning node default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' post: tags: - Lightning (Internal Node) summary: Create lightning invoice operationId: InternalLightningNodeApi_CreateInvoice security: - API_Key: - btcpay.server.cancreatelightninginvoiceinternalnode Basic: [] description: Create a lightning invoice. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateLightningInvoiceRequest' responses: '200': description: Successfully created content: application/json: schema: $ref: '#/components/schemas/LightningInvoiceData' '400': description: 'Wellknown error codes are: `invoice-error`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/server/lightning/{cryptoCode}/payments: get: tags: - Lightning (Internal Node) summary: Get payments operationId: InternalLightningNodeApi_GetPayments security: - API_Key: - btcpay.server.canuseinternallightningnode Basic: [] description: View information about the lightning payments parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: Also include pending payments name: includePending in: query required: false schema: type: boolean nullable: true default: false - description: The index of a payment that will be used as the start of the list name: offsetIndex in: query required: false schema: type: number nullable: true default: 0 responses: '200': description: Lightning payment data content: application/json: schema: $ref: >- #/components/schemas/InternalLightningNodeApiGetPaymentsResponse '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '503': description: Unable to access the lightning node default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/lightning/{cryptoCode}/info: get: tags: - Lightning (Store) summary: Get node information operationId: StoreLightningNodeApi_GetInfo security: - API_Key: - btcpay.store.canuselightningnode Basic: [] description: View information about the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning node information such as reachable nodeinfos content: application/json: schema: $ref: '#/components/schemas/LightningNodeInformationData' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/balance: get: tags: - Lightning (Store) summary: Get node balance operationId: StoreLightningNodeApi_GetBalance security: - API_Key: - btcpay.store.canuselightningnode Basic: [] description: View balance of the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning node balance for on-chain and off-chain funds content: application/json: schema: $ref: '#/components/schemas/LightningNodeBalanceData' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/connect: post: tags: - Lightning (Store) summary: Connect to lightning node operationId: StoreLightningNodeApi_ConnectToNode security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: Connect to another lightning node. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ConnectToNodeRequest' responses: '200': description: Successfully connected '400': description: 'Wellknown error codes are: `could-not-connect`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels: get: tags: - Lightning (Store) summary: Get channels operationId: StoreLightningNodeApi_GetChannels security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: View information about the current channels of the lightning node parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: list of channels content: application/json: schema: $ref: '#/components/schemas/StoreLightningNodeApiGetChannelsResponse' '404': description: The lightning node configuration was not found post: tags: - Lightning (Store) summary: Open channel operationId: StoreLightningNodeApi_OpenChannel security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: >- Open a channel with another lightning node. You should connect to that node first. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OpenLightningChannelRequest' responses: '200': description: Successfully opened '400': description: >- Wellknown error codes are: `channel-already-exists`, `cannot-afford-funding`, `need-more-confirmations`, `peer-not-connected` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/address: post: tags: - Lightning (Store) summary: Get deposit address operationId: StoreLightningNodeApi_GetDepositAddress security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: 'Get an on-chain deposit address for the lightning node ' parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: description: A bitcoin address belonging to the lightning node type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: deposit address content: application/json: schema: $ref: >- #/components/schemas/StoreLightningNodeApiGetDepositAddressResponse '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/payments/{paymentHash}: get: tags: - Lightning (Store) summary: Get payment operationId: StoreLightningNodeApi_GetPayment security: - API_Key: - btcpay.store.canuselightningnode Basic: [] description: View information about the requested lightning payment parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The payment hash of the lightning payment. name: paymentHash in: path required: true schema: type: string - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning payment data content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '404': description: >- The lightning node configuration or the specified invoice was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{id}: get: tags: - Lightning (Store) summary: Get invoice operationId: StoreLightningNodeApi_GetInvoice security: - API_Key: - btcpay.store.canviewlightninginvoice Basic: [] description: View information about the requested lightning invoice parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The id of the lightning invoice. name: id in: path required: true schema: type: string - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning invoice data content: application/json: schema: $ref: '#/components/schemas/LightningInvoiceData' '404': description: >- The lightning node configuration or the specified invoice was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay: post: tags: - Lightning (Store) summary: Pay Lightning Invoice operationId: StoreLightningNodeApi_PayInvoice security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: >- Pay a lightning invoice. In case the payment response times out, the status will be reported as pending and the final status can be resolved using the [Get payment](https://docs.btcpayserver.org) endpoint. The default wait time for payment responses is 30 seconds — it might take longer if multiple routes are tried or a hold invoice is getting paid. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PayLightningInvoiceRequest' responses: '200': description: Successfully paid content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '202': description: Payment initiated content: application/json: schema: $ref: '#/components/schemas/LightningPaymentData' '400': description: 'Wellknown error codes are: `could-not-find-route`, `generic-error`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices: get: tags: - Lightning (Store) summary: Get invoices operationId: StoreLightningNodeApi_GetInvoices security: - API_Key: - btcpay.store.canviewlightninginvoice Basic: [] description: View information about the lightning invoices parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: Limit to pending invoices only name: pendingOnly in: query required: false schema: type: boolean nullable: true default: false - description: The index of an invoice that will be used as the start of the list name: offsetIndex in: query required: false schema: type: number nullable: true default: 0 - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning invoice data content: application/json: schema: $ref: '#/components/schemas/StoreLightningNodeApiGetInvoicesResponse' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '503': description: Unable to access the lightning node default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' post: tags: - Lightning (Store) summary: Create lightning invoice operationId: StoreLightningNodeApi_CreateInvoice security: - API_Key: - btcpay.server.cancreatelightninginvoiceinternalnode Basic: [] description: Create a lightning invoice. parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateLightningInvoiceRequest' responses: '200': description: Successfully created content: application/json: schema: $ref: '#/components/schemas/LightningInvoiceData' '400': description: 'Wellknown error codes are: `invoice-error`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The lightning node configuration was not found '503': description: Unable to access the lightning node /api/v1/stores/{storeId}/lightning/{cryptoCode}/payments: get: tags: - Lightning (Store) summary: Get payments operationId: StoreLightningNodeApi_GetPayments security: - API_Key: - btcpay.store.cancreatelightninginvoice Basic: [] description: View information about the lightning payments parameters: - description: The cryptoCode of the lightning-node to query name: cryptoCode in: path required: true schema: type: string example: BTC - description: Also include pending payments name: includePending in: query required: false schema: type: boolean nullable: true default: false - description: The index of an invoice that will be used as the start of the list name: offsetIndex in: query required: false schema: type: number nullable: true default: 0 - description: The store id with the lightning-node configuration to query name: storeId in: path required: true schema: type: string responses: '200': description: Lightning payment data content: application/json: schema: $ref: '#/components/schemas/StoreLightningNodeApiGetPaymentsResponse' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '503': description: Unable to access the lightning node default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /misc/rate-sources: get: tags: - Miscelleneous summary: Get available rate sources operationId: Miscelleneous_listRateSources security: [] description: View available rate providers that you can use in stores responses: '200': description: rate providers array content: application/json: schema: $ref: '#/components/schemas/MiscelleneousListRateSourcesResponse' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /misc/permissions: get: tags: - Miscelleneous summary: Permissions metadata operationId: Miscelleneous_listPermissionsMetadata security: [] description: The metadata of available permissions responses: '200': description: The metadata of available permissions content: application/json: schema: $ref: >- #/components/schemas/MiscelleneousListPermissionsMetadataResponse default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /misc/lang: get: tags: - Miscelleneous summary: Language codes operationId: Miscelleneous_getSupportedLangCodes security: [] description: The supported language codes responses: '200': description: The supported language codes content: application/json: schema: $ref: >- #/components/schemas/MiscelleneousGetSupportedLangCodesResponse default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /i/{invoiceId}: parameters: - description: The invoice id name: invoiceId in: path required: true schema: type: string - description: >- The preferred language of the checkout page. You can use "auto" to use the language of the customer's browser or see the list of language codes with [this operation](https://docs.btcpayserver.org). name: lang in: query required: false schema: type: string get: tags: - Miscelleneous summary: Invoice checkout operationId: Invoice_Checkout security: [] description: View the checkout page of an invoice responses: '200': description: The checkout page content: text/html: example: The HTML checkout page of the invoice /api/v1/users/me/notifications: get: tags: - Notifications (Current User) summary: Get notifications operationId: Notifications_GetNotifications security: - API_Key: - btcpay.user.canmanagenotificationsforuser - btcpay.user.canviewnotificationsforuser Basic: [] description: View current user's notifications parameters: - description: Number of records returned in response name: take in: query required: false schema: nullable: true type: number - description: Number of records to skip name: skip in: query required: false schema: nullable: true type: number - description: filter by seen notifications name: seen in: query required: false schema: type: string nullable: true responses: '200': description: list of notifications content: application/json: schema: $ref: '#/components/schemas/NotificationData' /api/v1/users/me/notifications/{id}: get: tags: - Notifications (Current User) summary: Get notification operationId: Notifications_GetNotification security: - API_Key: - btcpay.user.canmanagenotificationsforuser - btcpay.user.canviewnotificationsforuser Basic: [] description: View information about the specified notification parameters: - description: The notification to fetch name: id in: path required: true schema: type: string responses: '200': description: specified notification content: application/json: schema: $ref: '#/components/schemas/NotificationData' '403': description: >- If you are authenticated but forbidden to view the specified notification '404': description: The key is not found for this notification put: tags: - Notifications (Current User) summary: Update notification operationId: Notifications_UpdateNotification security: - API_Key: - btcpay.user.canmanagenotificationsforuser Basic: [] description: Updates the notification parameters: - description: The notification to update name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateNotification' responses: '200': description: updated notification content: application/json: schema: $ref: '#/components/schemas/NotificationData' '403': description: >- If you are authenticated but forbidden to update the specified notification '404': description: The key is not found for this notification delete: tags: - Notifications (Current User) summary: Remove Notification operationId: Notifications_DeleteNotification security: - API_Key: - btcpay.user.canmanagenotificationsforuser Basic: [] description: Removes the specified notification. parameters: - description: The notification to remove name: id in: path required: true schema: type: string responses: '200': description: The notification has been deleted '403': description: >- If you are authenticated but forbidden to remove the specified notification '404': description: The key is not found for this notification /api/v1/stores/{storeId}/payment-requests: get: tags: - Payment Requests summary: Get payment requests operationId: PaymentRequests_GetPaymentRequests security: - API_Key: - btcpay.store.canviewpaymentrequests Basic: [] description: View information about the existing payment requests parameters: - description: The store to query name: storeId in: path required: true schema: type: string responses: '200': description: List of payment requests content: application/json: schema: $ref: '#/components/schemas/PaymentRequestDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' post: tags: - Payment Requests summary: Create a new payment request operationId: PaymentRequests_CreatePaymentRequest security: - API_Key: - btcpay.store.canmodifypaymentrequests Basic: [] description: Create a new payment request parameters: - description: The store to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaymentRequestBaseData' responses: '200': description: Information about the new payment request content: application/json: schema: $ref: '#/components/schemas/PaymentRequestData' '400': description: A list of errors that occurred when creating the payment request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to add new payment requests /api/v1/stores/{storeId}/payment-requests/{paymentRequestId}: get: tags: - Payment Requests summary: Get payment request operationId: PaymentRequests_GetPaymentRequest security: - API_Key: - btcpay.store.canviewpaymentrequests Basic: [] description: View information about the specified payment request parameters: - description: The payment request to fetch name: paymentRequestId in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified payment request content: application/json: schema: $ref: '#/components/schemas/PaymentRequestData' '403': description: >- If you are authenticated but forbidden to view the specified payment request '404': description: The key is not found for this payment request delete: tags: - Payment Requests summary: Archive payment request operationId: PaymentRequests_ArchivePaymentRequest security: - API_Key: - btcpay.store.canmodifypaymentrequests Basic: [] description: Archives the specified payment request. parameters: - description: The payment request to remove name: paymentRequestId in: path required: true schema: type: string - description: The store the payment request belongs to name: storeId in: path required: true schema: type: string responses: '200': description: The payment request has been archived '400': description: A list of errors that occurred when archiving the payment request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: >- If you are authenticated but forbidden to archive the specified payment request '404': description: The key is not found for this payment request put: tags: - Payment Requests summary: Update payment request operationId: PaymentRequests_UpdatePaymentRequest security: - API_Key: - btcpay.store.canmodifypaymentrequests Basic: [] description: Update a payment request parameters: - description: The payment request to update name: paymentRequestId in: path required: true schema: type: string - description: The store to query name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaymentRequestBaseData' responses: '200': description: The updated payment request content: application/json: schema: $ref: '#/components/schemas/PaymentRequestData' '400': description: A list of errors that occurred when updating the payment request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to update the payment request /api/v1/stores/{storeId}/payment-requests/{paymentRequestId}/pay: post: tags: - Payment Requests summary: Create a new invoice for the payment request operationId: PaymentRequests_Pay security: - API_Key: - btcpay.store.canviewpaymentrequests Basic: [] description: Create a new invoice for the payment request, or reuse an existing one parameters: - description: The payment request to create name: paymentRequestId in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: description: Invoice creation request content: application/json: schema: $ref: '#/components/schemas/PaymentRequestsPayRequest' responses: '200': description: A new invoice content: application/json: schema: $ref: '#/components/schemas/InvoiceData' '400': description: 'Wellknown error codes are: `archived`, `already-paid`, `expired`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/stores/{storeId}/payout-processors: get: tags: - Stores (Payout Processors) summary: Get store configured payout processors operationId: StorePayoutProcessors_GetStorePayoutProcessors security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get store configured payout processors parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: configured payout processors content: application/json: schema: $ref: >- #/components/schemas/StorePayoutProcessorsGetStorePayoutProcessorsResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/stores/{storeId}/payout-processors/{processor}/{paymentMethod}: delete: tags: - Stores (Payout Processors) summary: Remove store configured payout processor operationId: StorePayoutProcessors_RemoveStorePayoutProcessor security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Remove store configured payout processor parameters: - description: The payment method name: paymentMethod in: path required: true schema: type: string - description: The processor name: processor in: path required: true schema: type: string - description: The store name: storeId in: path required: true schema: type: string responses: '200': description: removed '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/payout-processors: get: tags: - Payout Processors summary: Get payout processors operationId: PayoutProcessors_GetPayoutProcessors description: Get payout processors available in this instance responses: '200': description: available payout processors content: application/json: schema: $ref: >- #/components/schemas/PayoutProcessorsGetPayoutProcessorsResponse /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedPayoutSenderFactory/{paymentMethod}: get: tags: - Stores (Payout Processors) summary: Get configured store onchain automated payout processors operationId: >- GreenfieldStoreAutomatedOnChainPayoutProcessorsController_GetStoreOnChainAutomatedPayoutProcessorsForPaymentMethod security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get configured store onchain automated payout processors parameters: - description: A specific payment method to fetch name: paymentMethod in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: configured processors content: application/json: schema: $ref: >- #/components/schemas/GreenfieldStoreAutomatedOnChainPayoutProcessorsControllerGetStoreOnChainAutomatedPayoutProcessorsForPaymentMethodResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores (Payout Processors) summary: Update configured store onchain automated payout processors operationId: >- GreenfieldStoreAutomatedOnChainPayoutProcessorsController_UpdateStoreOnChainAutomatedPayoutProcessorForPaymentMethod security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Update configured store onchain automated payout processors parameters: - description: A specific payment method to fetch name: paymentMethod in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UpdateOnChainAutomatedTransferSettings' required: true x-position: 1 responses: '200': description: configured processor content: application/json: schema: $ref: '#/components/schemas/OnChainAutomatedTransferSettings' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/stores/{storeId}/payout-processors/LightningAutomatedPayoutSenderFactory/{paymentMethod}: get: tags: - Stores (Payout Processors) summary: Get configured store Lightning automated payout processors operationId: >- GreenfieldStoreAutomatedLightningPayoutProcessorsController_GetStoreLightningAutomatedPayoutProcessorsForPaymentMethod security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get configured store Lightning automated payout processors parameters: - description: A specific payment method to fetch name: paymentMethod in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: configured processors content: application/json: schema: $ref: >- #/components/schemas/GreenfieldStoreAutomatedLightningPayoutProcessorsControllerGetStoreLightningAutomatedPayoutProcessorsForPaymentMethodResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores (Payout Processors) summary: Update configured store Lightning automated payout processors operationId: >- GreenfieldStoreAutomatedLightningPayoutProcessorsController_UpdateStoreLightningAutomatedPayoutProcessor security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Update configured store Lightning automated payout processors parameters: - description: A specific payment method to fetch name: paymentMethod in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UpdateLightningAutomatedTransferSettings' required: true x-position: 1 responses: '200': description: configured processor content: application/json: schema: $ref: '#/components/schemas/LightningAutomatedTransferSettings' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory: get: tags: - Stores (Payout Processors) summary: Get configured store onchain automated payout processors operationId: >- GreenfieldStoreAutomatedOnChainPayoutProcessorsController_GetStoreOnChainAutomatedTransferSenderFactory security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get configured store onchain automated payout processors parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: configured processors content: application/json: schema: $ref: >- #/components/schemas/GreenfieldStoreAutomatedOnChainPayoutProcessorsControllerGetStoreOnChainAutomatedTransferSenderFactoryResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores (Payout Processors) summary: Update configured store onchain automated payout processors operationId: >- GreenfieldStoreAutomatedOnChainPayoutProcessorsController_UpdateStoreOnChainAutomatedTransferSenderFactory security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Update configured store onchain automated payout processors parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UpdateOnChainAutomatedTransferSettings' required: true x-position: 1 responses: '200': description: configured processor content: application/json: schema: $ref: '#/components/schemas/OnChainAutomatedTransferSettings' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/stores/{storeId}/payout-processors/LightningAutomatedPayoutSenderFactory: get: tags: - Stores (Payout Processors) summary: Get configured store Lightning automated payout processors operationId: >- GreenfieldStoreAutomatedLightningPayoutProcessorsController_GetStoreLightningAutomatedPayoutSenderFactory security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get configured store Lightning automated payout processors parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: configured processors content: application/json: schema: $ref: >- #/components/schemas/GreenfieldStoreAutomatedLightningPayoutProcessorsControllerGetStoreLightningAutomatedPayoutSenderFactoryResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store /api/v1/pull-payments/{pullPaymentId}/boltcards: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string post: tags: - Pull payments (Public) summary: Link a boltcard to a pull payment operationId: PullPayments_LinkBoltcard security: [] description: >- Linking a boltcard to a pull payment will allow you to pay via NFC with it, the money will be sent from the pull payment. The boltcard keys are generated using [Deterministic Boltcard Key Generation](https://github.com/boltcard/boltcard/blob/main/docs/DETERMINISTIC.md). requestBody: content: application/json: schema: $ref: '#/components/schemas/PullPaymentsLinkBoltcardRequest' responses: '200': description: The boltcard has been linked to the pull payment. content: application/json: schema: $ref: '#/components/schemas/PullPaymentsLinkBoltcardResponse' '404': description: >- The pull payment has not been found. Wellknown error code is: `pullpayment-not-found` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/pull-payments: parameters: - description: The store ID name: storeId in: path required: true schema: type: string get: tags: - Pull payments (Management) summary: Get store's pull payments operationId: PullPayments_GetPullPayments security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Get the pull payments of a store parameters: - description: Whether this should list archived pull payments name: includeArchived in: query required: false schema: type: boolean default: false responses: '200': description: List of pull payments content: application/json: schema: $ref: '#/components/schemas/PullPaymentDataList' post: tags: - Pull payments (Management) summary: Create a new pull payment operationId: PullPayments_CreatePullPayment security: - API_Key: - btcpay.store.cancreatepullpayments - btcpay.store.cancreatenonapprovedpullpayments Basic: [] description: >- A pull payment allows its receiver to ask for payouts up to `amount` of `currency` every `period`. requestBody: content: application/json: schema: $ref: '#/components/schemas/PullPaymentsCreatePullPaymentRequest' responses: '200': description: The create pull payment content: application/json: schema: $ref: '#/components/schemas/PullPaymentData' '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/pull-payments/{pullPaymentId}: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string get: tags: - Pull payments (Public) summary: Get Pull Payment operationId: PullPayments_GetPullPayment security: [] description: Get a pull payment responses: '200': description: Information about the pull payment content: application/json: schema: $ref: '#/components/schemas/PullPaymentData' '404': description: Pull payment not found /api/v1/stores/{storeId}/pull-payments/{pullPaymentId}: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string - description: The ID of the store name: storeId in: path required: true schema: type: string delete: tags: - Pull payments (Management) summary: Archive a pull payment operationId: PullPayments_ArchivePullPayment security: - API_Key: - btcpay.store.canarchivepullpayments Basic: [] description: Archive this pull payment (Will cancel all payouts awaiting for payment) responses: '200': description: The pull payment has been archived '404': description: >- The pull payment has not been found, or does not belong to this store /api/v1/pull-payments/{pullPaymentId}/payouts: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string get: tags: - Pull payments (Public) summary: Get Payouts operationId: PullPayments_GetPayouts security: [] description: Get payouts parameters: - description: Whether this should list cancelled payouts name: includeCancelled in: query required: false schema: type: boolean default: false responses: '200': description: The payouts of the pull payment content: application/json: schema: $ref: '#/components/schemas/PayoutDataList' '404': description: Pull payment not found post: tags: - Pull payments (Public) summary: Create Payout operationId: PullPayments_CreatePayout security: [] description: Create a new payout requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreatePayoutRequest' required: true x-position: 1 responses: '200': description: A new payout has been created content: application/json: schema: $ref: '#/components/schemas/PayoutData' '400': description: >- Wellknown error codes are: `duplicate-destination`, `expired`, `not-started`, `archived`, `overdraft`, `amount-too-low`, `payment-method-not-supported` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Pull payment not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId}: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string - description: The ID of the pull payment payout name: payoutId in: path required: true schema: type: string get: tags: - Pull payments (Public) - Pull payments payout (Public) summary: Get Payout operationId: PullPayments_GetPayout security: [] description: Get payout responses: '200': description: A specific payout of a pull payment content: application/json: schema: $ref: '#/components/schemas/PayoutData' '404': description: Pull payment payout not found /api/v1/pull-payments/{pullPaymentId}/lnurl: parameters: - description: The ID of the pull payment name: pullPaymentId in: path required: true schema: type: string get: tags: - Pull payments (Public) summary: Get Pull Payment LNURL details operationId: PullPayments_GetPullPaymentLNURL security: [] description: Get Pull Payment LNURL details responses: '200': description: Pull payment LNURL details content: application/json: schema: $ref: '#/components/schemas/LNURLData' '400': description: Pull payment found but does not support LNURL '404': description: Pull payment not found /api/v1/stores/{storeId}/payouts: parameters: - description: The ID of the store name: storeId in: path required: true schema: type: string post: tags: - Stores (Payouts) summary: Create Payout operationId: Payouts_CreatePayoutThroughStore security: - API_Key: - btcpay.store.cancreatepullpayments - btcpay.store.cancreatenonapprovedpullpayments Basic: [] description: Create a new payout requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/CreatePayoutThroughStoreRequest' required: true x-position: 1 responses: '200': description: A new payout has been created content: application/json: schema: $ref: '#/components/schemas/PayoutData' '400': description: >- Wellknown error codes are: `duplicate-destination`, `expired`, `not-started`, `archived`, `overdraft`, `amount-too-low`, `payment-method-not-supported` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: store not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' get: tags: - Stores (Payouts) summary: Get Store Payouts operationId: PullPayments_GetStorePayouts security: [] description: Get payouts parameters: - description: Whether this should list cancelled payouts name: includeCancelled in: query required: false schema: type: boolean default: false responses: '200': description: The payouts of the store content: application/json: schema: $ref: '#/components/schemas/PayoutDataList' '404': description: Pull payment not found /api/v1/stores/{storeId}/payouts/{payoutId}: parameters: - description: The ID of the payout name: payoutId in: path required: true schema: type: string - description: The ID of the store name: storeId in: path required: true schema: type: string get: tags: - Stores (Payouts) summary: Get Payout operationId: StoresPayouts_getPayout security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Get payout responses: '200': description: A specific payout of a store content: application/json: schema: $ref: '#/components/schemas/PayoutData' '404': description: Payout not found post: tags: - Stores (Payouts) summary: Approve Payout operationId: PullPayments_ApprovePayout security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Approve a payout requestBody: content: application/json: schema: $ref: '#/components/schemas/PullPaymentsApprovePayoutRequest' responses: '200': description: >- The payout has been approved, transitioning to `AwaitingPayment` state. content: application/json: schema: $ref: '#/components/schemas/PayoutData' '400': description: >- Wellknown error codes are: `rate-unavailable`, `invalid-state`, `amount-too-low`, `old-revision` content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The payout is not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' delete: tags: - Stores (Payouts) summary: Cancel Payout operationId: PullPayments_CancelPayout security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Cancel the payout responses: '200': description: The payout has been cancelled '404': description: The payout is not found /api/v1/stores/{storeId}/payouts/{payoutId}/mark-paid: parameters: - description: The ID of the payout name: payoutId in: path required: true schema: type: string - description: The ID of the store name: storeId in: path required: true schema: type: string post: tags: - Stores (Payouts) summary: Mark Payout as Paid operationId: PullPayments_MarkPayoutPaid security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Mark a payout as paid responses: '200': description: The payout has been marked paid, transitioning to `Completed` state. '400': description: 'Wellknown error codes are: `invalid-state`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The payout is not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/stores/{storeId}/payouts/{payoutId}/mark: parameters: - description: The ID of the payout name: payoutId in: path required: true schema: type: string - description: The ID of the store name: storeId in: path required: true schema: type: string post: tags: - Stores (Payouts) summary: Mark Payout operationId: PullPayments_MarkPayout security: - API_Key: - btcpay.store.canmanagepullpayments Basic: [] description: Mark a payout with a state requestBody: content: application/json: schema: $ref: '#/components/schemas/PullPaymentsMarkPayoutRequest' responses: '200': description: The payout has been set to the specified state '400': description: 'Wellknown error codes are: `invalid-state`' content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The payout is not found '422': description: Unable to validate the request content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/server/info: get: tags: - ServerInfo summary: Get server info operationId: ServerInfo_GetServerInfo description: Information about the server, chains and sync states responses: '200': description: Server information content: application/json: schema: $ref: '#/components/schemas/ApplicationServerInfoData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/server/roles: get: tags: - ServerInfo summary: Get store's roles operationId: Server_GetStoreRoles security: - API_Key: - btcpay.server.canmodifyserversettings Basic: [] description: View information about the store's roles at the server's scope responses: '200': description: The user roles available at the server's scope content: application/json: schema: $ref: '#/components/schemas/RoleData' '403': description: If you are authenticated but forbidden to get the store's roles '404': description: Store not found /api/v1/stores/{storeId}/email: get: tags: - Stores (Email) summary: Get store email settings operationId: Stores_GetStoreEmailSettings security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View email settings of the specified store parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified store email settings content: application/json: schema: $ref: '#/components/schemas/EmailSettingsData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores (Email) summary: Update store email settings operationId: Stores_UpdateStoreEmailSettings security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update a store's email settings parameters: - description: The store to update name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/EmailSettingsData' required: true x-position: 1 responses: '200': description: The settings were updated content: application/json: schema: $ref: '#/components/schemas/EmailSettingsData' '400': description: A list of errors that occurred when updating the settings content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to modify the store /api/v1/stores/{storeId}/email/send: post: tags: - Stores (Email) summary: Send an email for a store operationId: Stores_SendStoreEmail security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Send an email using the store's SMTP server parameters: - description: The store to send the email from name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/EmailData' required: true x-position: 1 responses: '200': description: The email was sent (scheduled) successfully '400': description: The store's SMTP is not configured '403': description: If you are authenticated but forbidden to add new stores '404': description: The store was not found /api/v1/stores/{storeId}/lightning-addresses: get: tags: - Lightning address summary: Get store configured lightning addresses operationId: StoreLightningAddresses_GetStoreLightningAddresses security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get store configured lightning addresses parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: The lightning addresses configured in the store content: application/json: schema: $ref: >- #/components/schemas/StoreLightningAddressesGetStoreLightningAddressesResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/lightning-addresses/{username}: get: tags: - Lightning address summary: Get store configured lightning address operationId: StoreLightningAddresses_GetStoreLightningAddress security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get store configured lightning address parameters: - description: The lightning address username name: username in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: The lightning address configured in the store content: application/json: schema: $ref: '#/components/schemas/LightningAddressData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet post: tags: - Lightning address summary: Add or update store configured lightning address operationId: StoreLightningAddresses_AddOrUpdateStoreLightningAddress security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Add or update store configured lightning address parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string - description: the lightning address username name: username in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/LightningAddressData' required: true x-position: 1 responses: '200': description: The lightning address configured in the store content: application/json: schema: $ref: '#/components/schemas/LightningAddressData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet delete: tags: - Lightning address summary: Remove configured lightning address operationId: StoreLightningAddresses_RemoveStoreLightningAddress security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Remove store configured lightning address parameters: - description: The lightning address username name: username in: path required: true schema: type: string - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: Lightning address removed '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods: get: tags: - Store Payment Methods summary: Get store payment methods operationId: StorePaymentMethods_GetStorePaymentMethods security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View information about the stores' configured payment methods parameters: - description: Fetch payment methods that are enabled/disabled only name: enabled in: query required: false schema: type: boolean - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: List of payment methods content: application/json: schema: $ref: >- #/components/schemas/StorePaymentMethodsGetStorePaymentMethodsResponse '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/payment-methods/LightningNetwork: get: tags: - Store Payment Methods (Lightning Network) summary: Get store Lightning Network payment methods operationId: StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethods security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: >- View information about the stores' configured Lightning Network payment methods parameters: - description: Fetch payment methods that are enabled/disabled only name: enabled in: query required: false schema: type: boolean - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: List of payment methods content: application/json: schema: $ref: '#/components/schemas/LightningNetworkPaymentMethodDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}: get: tags: - Store Payment Methods (Lightning Network) summary: Get store Lightning Network payment method operationId: StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View information about the specified payment method parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string 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 put: tags: - Store Payment Methods (Lightning Network) summary: Update store Lightning Network payment method operationId: StoreLightningNetworkPaymentMethods_UpdateLightningNetworkPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update the specified store's payment method parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UpdateLightningNetworkPaymentMethodRequest' required: true x-position: 1 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 delete: tags: - Store Payment Methods (Lightning Network) summary: Remove store Lightning Network payment method operationId: StoreLightningNetworkPaymentMethods_DeleteLightningNetworkPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Removes the specified store payment method. parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string 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 /api/v1/stores/{storeId}/payment-methods/LNURL: get: tags: - Store Payment Methods (LNURL Pay) summary: Get store LNURL payment methods operationId: StoreLNURLPayPaymentMethods_GetLNURLPayPaymentMethods security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View information about the stores' configured LNURL payment methods parameters: - description: Fetch payment methods that are enabled/disabled only name: enabled in: query required: false schema: type: boolean - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: list of payment methods content: application/json: schema: $ref: '#/components/schemas/LNURLPayPaymentMethodDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/payment-methods/LNURLPay/{cryptoCode}: get: tags: - Store Payment Methods (LNURL Pay) summary: Get store LNURL Pay payment method operationId: StoreLNURLPayPaymentMethods_GetLNURLPayPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View information about the specified payment method parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified payment method content: application/json: schema: $ref: '#/components/schemas/LNURLPayPaymentMethodData' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '403': description: If you are authenticated but forbidden to view the specified store content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The key is not found for this store/payment method content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' put: tags: - Store Payment Methods (LNURL Pay) summary: Update store LNURL Pay payment method operationId: StoreLNURLPayPaymentMethods_UpdateLNURLPayPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update the specified store's payment method parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/LNURLPayPaymentMethodData' required: true x-position: 1 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 delete: tags: - Store Payment Methods (LNURL Pay) summary: Remove store LNURL Pay payment method operationId: StoreLNURLPayPaymentMethods_DeleteLNURLPayPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Removes the specified store payment method. parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string 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 /api/v1/stores/{storeId}/payment-methods/OnChain: get: tags: - Store Payment Methods (On Chain) summary: Get store on-chain payment methods operationId: StoreOnChainPaymentMethods_GetOnChainPaymentMethods security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View information about the stores' configured on-chain payment methods parameters: - description: Fetch payment methods that are enabled/disabled only name: enabled in: query required: false schema: type: boolean - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: List of payment methods content: application/json: schema: $ref: '#/components/schemas/OnChainPaymentMethodDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}: get: tags: - Store Payment Methods (On Chain) summary: Get store on-chain payment method operationId: StoreOnChainPaymentMethods_GetOnChainPaymentMethod security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View information about the specified payment method parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string 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 put: tags: - Store Payment Methods (On Chain) summary: Update store on-chain payment method operationId: StoreOnChainPaymentMethods_UpdateOnChainPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update the specified store's payment method parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UpdateOnChainPaymentMethodRequest' required: true x-position: 1 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 delete: tags: - Store Payment Methods (On Chain) summary: Remove store on-chain payment method operationId: StoreOnChainPaymentMethods_DeleteOnChainPaymentMethod security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Removes the specified store payment method. parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string 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 /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/generate: post: tags: - Store Payment Methods (On Chain) summary: Generate store on-chain wallet operationId: StoreOnChainPaymentMethods_GenerateOnChainWallet security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Generate a wallet and update the specified store's payment method to it parameters: - description: The crypto code of the payment method to update name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/GenerateOnChainWalletRequest' required: true x-position: 1 responses: '200': description: updated specified payment method with the generated wallet content: application/json: schema: $ref: '#/components/schemas/OnChainPaymentMethodDataWithSensitiveData' '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 /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview: get: tags: - Store Payment Methods (On Chain) summary: Preview store on-chain payment method addresses operationId: StoreOnChainPaymentMethods_GetOnChainPaymentMethodPreview security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View addresses of the current payment method of the store parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: From which index to fetch the addresses name: offset in: query required: false schema: type: number - description: Number of addresses to preview name: amount in: query required: false schema: type: number - description: The store to fetch name: storeId in: path required: true schema: type: string 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 post: tags: - Store Payment Methods (On Chain) summary: Preview proposed store on-chain payment method addresses operationId: StoreOnChainPaymentMethods_POSTOnChainPaymentMethodPreview security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View addresses of a proposed payment method of the store parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: From which index to fetch the addresses name: offset in: query required: false schema: type: number - description: Number of addresses to preview name: amount in: query required: false schema: type: number - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: >- #/components/schemas/StoreOnChainPaymentMethodsPostOnChainPaymentMethodPreviewRequest 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 /api/v1/stores/{storeId}/rates/configuration: get: tags: - Stores (Rates Config) summary: Get store rate settings operationId: Stores_GetStoreRateConfiguration security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View rate settings of the specified store parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified store rate settings content: application/json: schema: $ref: '#/components/schemas/StoreRateConfiguration' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores (Rates Config) summary: Update store rate settings operationId: Stores_UpdateStoreRateConfiguration security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update a store's rate settings parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/StoreRateConfiguration' required: true x-position: 1 responses: '200': description: The settings were updated content: application/json: schema: $ref: '#/components/schemas/StoreRateConfiguration' '400': description: A list of errors that occurred when updating the settings content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to modify the store /api/v1/stores/{storeId}/rates/configuration/preview: post: tags: - Stores (Rates Config) summary: Preview rate configuration results operationId: Stores_PreviewStoreRateConfiguration security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Preview rate configuration results before you set it on the store parameters: - description: The currency pairs to preview name: currencyPair in: query style: form explode: true schema: type: array nullable: true items: type: string x-position: 1 - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/StoreRateConfiguration' required: true x-position: 1 responses: '200': description: The settings were executed and a preview was returned content: application/json: schema: $ref: >- #/components/schemas/StoresPreviewStoreRateConfigurationResponse '400': description: A list of errors that occurred when previewing the settings content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to modify the store /api/v1/stores/{storeId}/rates: get: tags: - Stores (Rates) summary: Get rates operationId: Stores_GetStoreRates security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get rates on the store parameters: - description: The currency pairs to fetch rates for name: currencyPair example: - BTC_USD - BTC_EUR in: query style: form explode: true schema: type: array nullable: true items: type: string x-position: 1 - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: The settings were executed and a preview was returned content: application/json: schema: $ref: '#/components/schemas/StoresGetStoreRatesResponse' '400': description: A list of errors that occurred when previewing the settings content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to modify the store /api/v1/stores/{storeId}/users: get: tags: - Stores (Users) summary: Get store users operationId: Stores_GetStoreUsers security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View users of the specified store parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified store users content: application/json: schema: $ref: '#/components/schemas/StoreUserDataList' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store post: tags: - Stores (Users) summary: Add a store user operationId: Stores_AddStoreUser security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Add a store user parameters: - description: The store id name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/StoreUserData' required: true x-position: 1 responses: '200': description: The user was added '400': description: A list of errors that occurred when creating the store content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to add new stores '409': description: >- Error code: `duplicate-store-user-role`. Removing this user would result in the store having no owner. content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/users/{idOrEmail}: delete: tags: - Stores (Users) summary: Remove Store User operationId: Stores_RemoveStoreUser security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: >- Removes the specified store user. If there is no other owner, this endpoint will fail. parameters: - description: The store name: storeId in: path required: true schema: type: string - description: The user's id or email name: idOrEmail in: path required: true schema: type: string responses: '200': description: The user has been removed '400': description: A list of errors that occurred when removing the store content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to remove the specified store '404': description: The key is not found for this store '409': description: >- Error code: `store-user-role-orphaned`. Removing this user would result in the store having no owner. content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet overview operationId: StoreOnChainWallets_ShowOnChainWalletOverview security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View information about the specified wallet parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified wallet content: application/json: schema: $ref: '#/components/schemas/OnChainWalletOverviewData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/feerate: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet fee rate operationId: StoreOnChainWallets_GetOnChainFeeRate security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: Get wallet onchain fee rate parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: >- The number of blocks away you are willing to target for confirmation. Defaults to the wallet's configured `RecommendedFeeBlockTarget` name: blockTarget in: query required: false schema: type: number minimum: 1 - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: fee rate content: application/json: schema: $ref: '#/components/schemas/OnChainWalletFeeRateData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet address operationId: StoreOnChainWallets_GetOnChainWalletReceiveAddress security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Get or generate address for wallet parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string - description: >- Whether to generate a new address for this request even if the previous one was not used name: forceGenerate in: query required: false schema: type: boolean default: false responses: '200': description: reserved address content: application/json: schema: $ref: '#/components/schemas/OnChainWalletAddressData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet delete: tags: - Store Wallet (On Chain) summary: UnReserve last store on-chain wallet address operationId: StoreOnChainWallets_UnReserveOnChainWalletReceiveAddress security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: UnReserve address parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: address unreserved '403': description: If you are authenticated but forbidden to view the specified store '404': description: >- The key is not found for this store/wallet or there was no address reserved /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet transactions operationId: StoreOnChainWallets_ShowOnChainWalletTransactions security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Get store on-chain wallet transactions parameters: - description: The crypto code of the wallet to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: Transaction label to filter by name: labelFilter in: query required: false schema: type: string example: invoice - description: Maximum number of transactions to return name: limit in: query required: false schema: type: integer - description: Number of transactions to skip from the start name: skip in: query required: false schema: type: integer - description: Statuses to filter the transactions with name: statusFilter in: query required: false schema: type: array items: $ref: '#/components/schemas/TransactionStatus' - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: transactions list content: application/json: schema: $ref: >- #/components/schemas/StoreOnChainWalletsShowOnChainWalletTransactionsResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet '503': description: >- You need to allow non-admins to use hotwallets for their stores (in /server/policies) post: tags: - Store Wallet (On Chain) summary: Create store on-chain wallet transaction operationId: StoreOnChainWallets_CreateOnChainTransaction security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Create store on-chain wallet transaction parameters: - description: The crypto code of the wallet name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateOnChainTransactionRequest' responses: '200': description: the tx content: application/json: schema: $ref: >- #/components/schemas/StoreOnChainWalletsCreateOnChainTransactionResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId}: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet transaction operationId: StoreOnChainWallets_GetOnChainWalletTransaction security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Get store on-chain wallet transaction parameters: - description: The crypto code of the wallet to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string - description: The transaction id to fetch name: transactionId in: path required: true schema: type: string responses: '200': description: transaction content: application/json: schema: $ref: '#/components/schemas/OnChainWalletTransactionData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet patch: tags: - Store Wallet (On Chain) summary: Patch store on-chain wallet transaction info operationId: StoreOnChainWallets_PatchOnChainWalletTransaction security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Patch store on-chain wallet transaction info parameters: - description: The crypto code of the wallet to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string - description: The transaction id to fetch name: transactionId in: path required: true schema: type: string - description: >- Whether to update the label/comments even if the transaction does not yet exist name: force in: query required: false schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchOnChainTransactionRequest' responses: '200': description: transaction content: application/json: schema: $ref: '#/components/schemas/OnChainWalletTransactionData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/utxos: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet UTXOS operationId: StoreOnChainWallets_GetOnChainWalletUTXOs security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Get store on-chain wallet utxos parameters: - description: The crypto code of the wallet to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: utxo list content: application/json: schema: $ref: >- #/components/schemas/StoreOnChainWalletsGetOnChainWalletUtxOsResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/objects: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet objects operationId: StoreOnChainWallets_GetOnChainWalletObjects security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View wallet objects parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The ids of objects to fetch, if used, type should be specified name: ids in: query required: false schema: type: array items: type: string example: 03abcde... - description: The type of object to fetch name: type in: query required: false schema: type: string example: tx - description: The store to fetch name: storeId in: path required: true schema: type: string - description: >- Whether or not you should include neighbour's node data in the result (ie, `links.objectData`) name: includeNeighbourData in: query required: false schema: type: boolean default: true responses: '200': description: Selected objects and their links content: application/json: schema: $ref: >- #/components/schemas/StoreOnChainWalletsGetOnChainWalletObjectsResponse '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet post: tags: - Store Wallet (On Chain) summary: Add/Update store on-chain wallet objects operationId: StoreOnChainWallets_AddOrUpdateOnChainWalletObjects security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Add/Update wallet objects parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OnChainWalletObjectId' responses: '200': description: Wallet object's data and its links content: application/json: schema: $ref: '#/components/schemas/OnChainWalletObjectId' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/objects/{objectType}/{objectId}: get: tags: - Store Wallet (On Chain) summary: Get store on-chain wallet object operationId: StoreOnChainWallets_GetOnChainWalletObject security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View wallet object parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The object id to fetch name: objectId in: path required: true schema: type: string example: abc392... - description: The object type to fetch name: objectType in: path required: true schema: type: string example: tx - description: The store to fetch name: storeId in: path required: true schema: type: string - description: >- Whether or not you should include neighbour's node data in the result (ie, `links.objectData`) name: includeNeighbourData in: query required: false schema: type: boolean default: true responses: '200': description: Wallet object's data and its links content: application/json: schema: $ref: '#/components/schemas/OnChainWalletObjectId' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet delete: tags: - Store Wallet (On Chain) summary: Remove store on-chain wallet objects operationId: StoreOnChainWallets_RemoveOnChainWalletObject security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Remove wallet object parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The object id to fetch name: objectId in: path required: true schema: type: string example: abc392... - description: The object type to fetch name: objectType in: path required: true schema: type: string example: tx - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: successful removal of filtered object '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/objects/{objectType}/{objectId}/links: post: tags: - Store Wallet (On Chain) summary: Add/Update store on-chain wallet object link operationId: StoreOnChainWallets_AddOrUpdateOnChainWalletLink security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Add/Update wallet object link parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The object id to fetch name: objectId in: path required: true schema: type: string example: abc392... - description: The object type to fetch name: objectType in: path required: true schema: type: string example: tx - description: The store to fetch name: storeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OnChainWalletObjectId' responses: '200': description: action completed '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/objects/{objectType}/{objectId}/links/{linkType}/{linkId}: delete: tags: - Store Wallet (On Chain) summary: Remove store on-chain wallet object links operationId: StoreOnChainWallets_RemoveOnChainWalletLink security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Remove wallet object link parameters: - description: The crypto code of the payment method to fetch name: cryptoCode in: path required: true schema: type: string example: BTC - description: The object id of the linked neighbour name: linkId in: path required: true schema: type: string example: abc392... - description: The object id to fetch name: objectId in: path required: true schema: type: string example: abc392... - description: The object type of the linked neighbour name: linkType in: path required: true schema: type: string example: tx - description: The object type to fetch name: objectType in: path required: true schema: type: string example: tx - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: successful removal of filtered object link '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store/wallet /api/v1/stores: get: tags: - Stores summary: Get stores operationId: Stores_GetStores security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View information about the available stores responses: '200': description: list of stores content: application/json: schema: $ref: '#/components/schemas/StoreDataList' '401': description: Missing authorization content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' post: tags: - Stores summary: Create a new store operationId: Stores_CreateStore security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Create a new store requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/StoreBaseData' required: true x-position: 1 responses: '200': description: Information about the new store content: application/json: schema: $ref: '#/components/schemas/StoreData' '400': description: A list of errors that occurred when creating the store content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to add new stores /api/v1/stores/{storeId}: get: tags: - Stores summary: Get store operationId: Stores_GetStore security: - API_Key: - btcpay.store.canviewstoresettings Basic: [] description: View information about the specified store parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: specified store content: application/json: schema: $ref: '#/components/schemas/StoreData' '403': description: If you are authenticated but forbidden to view the specified store '404': description: The key is not found for this store put: tags: - Stores summary: Update store operationId: Stores_UpdateStore security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: Update the specified store parameters: - description: The store to update name: storeId in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/StoreData' required: true x-position: 1 responses: '200': description: updated specified store content: application/json: schema: $ref: '#/components/schemas/StoreData' '400': description: A list of errors that occurred when updating the store 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 delete: tags: - Stores summary: Remove Store operationId: Stores_DeleteStore security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: >- Removes the specified store. If there is another user with access, only your access will be removed. parameters: - description: The store to remove name: storeId in: path required: true schema: type: string responses: '200': description: The store has been removed '400': description: A list of errors that occurred when removing the store content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '403': description: If you are authenticated but forbidden to remove the specified store '404': description: The key is not found for this store /api/v1/stores/{storeId}/roles: get: tags: - Stores summary: Get store's roles operationId: Stores_GetStoreRoles security: - API_Key: - btcpay.store.canmodifystoresettings Basic: [] description: View information about the specified store's roles parameters: - description: The store to fetch name: storeId in: path required: true schema: type: string responses: '200': description: The user roles available for this store content: application/json: schema: $ref: '#/components/schemas/RoleData' '403': description: If you are authenticated but forbidden to get the store's roles '404': description: Store not found /api/v1/users/me: get: tags: - Users summary: Get current user information operationId: Users_GetCurrentUser security: - API_Key: - btcpay.user.canviewprofile Basic: [] description: View information about the current user responses: '200': description: Information about the current user content: application/json: schema: $ref: '#/components/schemas/ApplicationUserData' '404': description: The user could not be found delete: tags: - Users summary: Deletes user profile operationId: Users_DeleteCurrentUser security: - API_Key: - btcpay.user.candeleteuser Basic: [] description: >- Deletes user profile and associated user data for user making the request responses: '200': description: User and associated data deleted successfully '404': description: The user could not be found /api/v1/users: get: tags: - Users summary: Get all users operationId: Users_GetUsers security: - API_Key: - btcpay.server.canviewusers Basic: [] description: Load all users that exist. parameters: [] responses: '200': description: Users found '401': description: Missing authorization for loading the users '403': description: >- Authorized but forbidden to load the users. You have the wrong API permissions. post: tags: - Users summary: Create user operationId: Users_CreateUser security: - API_Key: - btcpay.server.cancreateuser Basic: [] description: >- Create a new user. This operation can be called without authentication in any of this cases: * There is not any administrator yet on the server, * The subscriptions are not disabled in the server's policies. If the first administrator is created by this call, subscriptions are automatically disabled. requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/UsersCreateUserRequest' required: true x-position: 1 responses: '201': description: Information about the new user content: application/json: schema: $ref: '#/components/schemas/ApplicationUserData' '400': description: A list of errors that occurred when creating the user content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' '401': description: >- If you need to authenticate for this endpoint (ie. the server settings policies lock subscriptions and that an admin already exists) '403': description: >- If you are authenticated but forbidden to create a new user (ie. you don't have the `unrestricted` permission on a server administrator or if you are not administrator and registrations are disabled in the server's policies) '429': description: >- DDoS protection if you are creating more than 2 accounts every minutes (non-admin only) /api/v1/users/{idOrEmail}: get: tags: - Users summary: Get user by ID or Email operationId: Users_GetUser security: - API_Key: - btcpay.server.canviewusers Basic: [] description: Get 1 user by ID or Email. parameters: - description: The ID or email of the user to load name: idOrEmail in: path required: true schema: type: string responses: '200': description: User found '401': description: Missing authorization for loading the user '403': description: >- Authorized but forbidden to load the user. You have the wrong API permissions. '404': description: No user found with this ID or email delete: tags: - Users summary: Delete user operationId: Users_DeleteUser security: - API_Key: - btcpay.user.candeleteuser Basic: [] description: >- Delete a user. Must be an admin to perform this operation. Attempting to delete the only admin user will not succeed. All data associated with the user will be deleted as well if the operation succeeds. parameters: - description: The ID or email of the user to be deleted name: idOrEmail in: path required: true schema: type: string responses: '200': description: User has been successfully deleted '401': description: Missing authorization for deleting the user '403': description: >- Authorized but forbidden to delete the user. Can happen if you attempt to delete the only admin user. '404': description: User with provided ID was not found /api/v1/users/{idOrEmail}/lock: post: tags: - Users summary: Toggle user lock out operationId: Users_ToggleUserLock security: - API_Key: - btcpay.user.canmodifyserversettings Basic: [] description: |- Lock or unlock a user. Must be an admin to perform this operation. Attempting to lock the only admin user will not succeed. parameters: - description: The ID of the user to be un/locked name: idOrEmail in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/LockUserRequest' responses: '200': description: User has been successfully toggled '401': description: Missing authorization for locking the user '403': description: >- Authorized but forbidden to lock the user. Can happen if you attempt to disable the only admin user. '404': description: User with provided ID was not found /api/v1/users/{idOrEmail}/approve: post: tags: - Users summary: Toggle user approval operationId: Users_ToggleUserApproval security: - API_Key: - btcpay.user.canmodifyserversettings Basic: [] description: >- Approve or unapprove a user. Must be an admin to perform this operation. Attempting to (un)approve a user for which this requirement does not exist will not succeed. parameters: - description: The ID of the user to be un/approved name: idOrEmail in: path required: true schema: type: string requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/ApproveUserRequest' responses: '200': description: User has been successfully toggled '401': description: Missing authorization for approving the user '403': description: >- Authorized but forbidden to approve the user. Can happen if you attempt to set the status of a user that does not have the approval requirement. '404': description: User with provided ID was not found /api/v1/stores/{storeId}/webhooks: parameters: - description: The store id name: storeId in: path required: true schema: type: string get: tags: - Webhooks summary: Get webhooks of a store operationId: Webhooks_GetWebhooks security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: View webhooks of a store responses: '200': description: List of webhooks content: application/json: schema: $ref: '#/components/schemas/WebhookDataList' '404': description: The key is not found for this list of webhooks post: tags: - Webhooks summary: Create a new webhook operationId: Webhooks_CreateWebhook security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: Create a new webhook requestBody: x-name: request content: application/json: schema: $ref: '#/components/schemas/WebhookDataCreate' required: true x-position: 1 responses: '200': description: Information about the new webhook content: application/json: schema: $ref: '#/components/schemas/WebhookDataCreateResult' '400': description: A list of errors that occurred when creating the webhook content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' /api/v1/stores/{storeId}/webhooks/{webhookId}: parameters: - description: The store id name: storeId in: path required: true schema: type: string - description: The webhook id name: webhookId in: path required: true schema: type: string get: tags: - Webhooks summary: Get a webhook of a store operationId: Webhooks_GetWebhook security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: View webhook of a store responses: '200': description: A webhook content: application/json: schema: $ref: '#/components/schemas/WebhookData' '404': description: The webhook has not been found put: tags: - Webhooks summary: Update a webhook operationId: Webhooks_UpdateWebhook security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: Update a webhook requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookDataUpdate' required: true x-position: 1 responses: '200': description: Information about the updated webhook content: application/json: schema: $ref: '#/components/schemas/WebhookData' '400': description: A list of errors that occurred when creating the webhook content: application/json: schema: $ref: '#/components/schemas/ValidationProblemDetails' delete: tags: - Webhooks summary: Delete a webhook operationId: Webhooks_DeleteWebhook security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: Delete a webhook responses: '200': description: The webhook has been deleted '404': description: The webhook does not exist /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries: parameters: - description: The store id name: storeId in: path required: true schema: type: string - description: The webhook id name: webhookId in: path required: true schema: type: string get: tags: - Webhooks summary: Get latest deliveries operationId: Webhooks_GetWebhookDeliveries security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: List the latest deliveries to the webhook, ordered from the most recent parameters: - description: The number of latest deliveries to fetch name: count in: query required: false schema: type: string responses: '200': description: List of deliveries content: application/json: schema: $ref: '#/components/schemas/WebhookDeliveryList' '404': description: The key is not found for this list of deliveries /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}: parameters: - description: The id of the delivery name: deliveryId in: path required: true schema: type: string - description: The store id name: storeId in: path required: true schema: type: string - description: The webhook id name: webhookId in: path required: true schema: type: string get: tags: - Webhooks summary: Get a webhook delivery operationId: Webhooks_GetWebhookDelivery security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: Information about a webhook delivery responses: '200': description: Information about a delivery content: application/json: schema: $ref: '#/components/schemas/WebhookDeliveryData' '404': description: The delivery does not exists. /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request: parameters: - description: The id of the delivery name: deliveryId in: path required: true schema: type: string - description: The store id name: storeId in: path required: true schema: type: string - description: The webhook id name: webhookId in: path required: true schema: type: string get: tags: - Webhooks summary: Get the delivery's request operationId: Webhooks_GetWebhookDeliveryRequests security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: The delivery's JSON request sent to the endpoint responses: '200': description: The delivery's JSON Request content: application/json: schema: $ref: >- #/components/schemas/WebhooksGetWebhookDeliveryRequestsResponse '404': description: The delivery does not exists. '409': description: >- `webhookdelivery-pruned`: This webhook delivery has been pruned, so it can't be redelivered. /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver: parameters: - description: The id of the delivery name: deliveryId in: path required: true schema: type: string - description: The store id name: storeId in: path required: true schema: type: string - description: The webhook id name: webhookId in: path required: true schema: type: string post: tags: - Webhooks summary: Redeliver the delivery operationId: Webhooks_RedeliverWebhookDelivery security: - API_Key: - btcpay.store.webhooks.canmodifywebhooks Basic: [] description: Redeliver the delivery responses: '200': description: >- The new delivery id being broadcasted. (Broadcast happen asynchronously with this call) content: application/json: schema: $ref: '#/components/schemas/WebhooksRedeliverWebhookDeliveryResponse' '404': description: The delivery does not exists. '409': description: >- `webhookdelivery-pruned`: This webhook delivery has been pruned, so it can't be redelivered. components: schemas: ApiKeyData: type: object properties: apiKey: description: The API Key to use for API Key Authentication type: string nullable: false label: description: The label given by the user to this API Key type: string nullable: false permissions: description: >- The permissions associated to this API Key (can be scoped to a specific store) type: array nullable: false items: type: string example: - btcpay.server.canmanageusers - >- btcpay.server.canmanageusers:2KxSpc9V5zDWfUbvgYiZuAfka4wUhGF96F75Ao8y4zHP PointOfSaleAppData: allOf: - $ref: '#/components/schemas/BasicAppData' - type: object properties: title: description: Display title of the app type: string example: My PoS app description: description: App description type: string example: This is my amazing PoS app defaultView: description: App view type (e.g., static, cart, etc...) type: string example: Cart x-enumNames: - Static - Cart - Light - Print enum: - Static - Cart - Light - Print showItems: description: Display item selection for keypad type: boolean default: false example: true showCustomAmount: description: Whether the option to enter a custom amount is shown type: boolean example: true showDiscount: description: Whether the option to enter a discount is shown default: false type: boolean example: false showSearch: description: Display the search bar type: boolean example: false default: true showCategories: description: Display the list of categories type: boolean example: false default: true enableTips: description: Whether the option to enter a tip is shown default: false type: boolean example: true currency: description: Currency used for the app type: string example: BTC items: description: JSON object of app items type: object example: - title: Green Tea description: >- Lovely, fresh and tender, Meng Ding Gan Lu ('sweet dew') is grown in the lush Meng Ding Mountains of the southwestern province of Sichuan where it has been cultivated for over a thousand years. id: green tea image: ~/img/pos-sample/green-tea.jpg price: type: 2 formatted: $1.00 value: 1 buyButtonText: null inventory: 5 paymentMethods: null disabled: false - title: Black Tea description: >- Tian Jian Tian Jian means 'heavenly tippy tea' in Chinese, and it describes the finest grade of dark tea. Our Tian Jian dark tea is from Hunan province which is famous for making some of the best dark teas available. id: black tea image: ~/img/pos-sample/black-tea.jpg price: type: 2 formatted: $1.00 value: 1 buyButtonText: Test Buy Button Text inventory: null paymentMethods: null disabled: false fixedAmountPayButtonText: description: Payment button text template for items with a set price type: string example: Buy for {0} customAmountPayButtonText: description: >- Payment button text which appears for items which allow user to input a custom amount type: string example: Pay tipText: description: >- Prompt which appears next to the tip amount field if tipping is enabled type: string example: Do you want to leave a tip? customCSSLink: description: Link to a custom CSS stylesheet to be used in the app type: string example: https://bootswatch.com/4/slate/bootstrap.min.css notificationUrl: description: >- Callback notification url to POST to once when invoice is paid for and once when there are enough blockchain confirmations type: string redirectUrl: description: URL user is redirected to once invoice is paid type: string embeddedCSS: description: Custom CSS embedded into the app type: string redirectAutomatically: description: >- Whether user is redirected to specified redirect URL automatically after the invoice is paid type: boolean example: true requiresRefundEmail: description: >- Whether refund email is required when paying the invoice. Defaults to `null` if not explicitly set. type: boolean example: false nullable: true CrowdfundAppData: allOf: - $ref: '#/components/schemas/BasicAppData' - type: object properties: title: description: Display title of the app type: string example: My crowdfund app description: description: App description type: string example: My crowdfund description enabled: description: Whether the app is enabled to be viewed by everyone type: boolean example: true enforceTargetAmount: description: Whether contributions over the set target amount are allowed type: boolean example: false startDate: $ref: '#/components/schemas/UnixTimestamp' endDate: $ref: '#/components/schemas/UnixTimestamp' targetCurrency: description: Target currency for the crowdfund type: string example: BTC targetAmount: description: Target amount for the crowdfund type: number example: 420.69 customCSSLink: description: Link to a custom CSS stylesheet to be used in the app type: string mainImageUrl: description: URL for image used as a cover image for the app type: string embeddedCSS: description: Custom CSS embedded into the app type: string perks: description: JSON of perks available in the app type: object example: - title: test perk description: null id: test perk image: null price: type: 2 formatted: $100.00 value: 100 buyButtonText: null inventory: null paymentMethods: null disabled: false - title: test test description: this is an amazing perk id: test test image: >- https://mainnet.demo.btcpayserver.org/img/errorpages/404_nicolas.jpg price: type: 1 formatted: $69.42 value: 69.42 buyButtonText: null inventory: 5 paymentMethods: null disabled: false - title: amazing perk description: null id: f$t45hj764325 image: null price: type: 0 formatted: null value: null buyButtonText: button text inventory: null paymentMethods: null disabled: true notificationUrl: description: >- Callback notification url to POST to once when invoice is paid for and once when there are enough blockchain confirmations type: string tagline: description: Tagline for the app displayed to user type: string example: I can't believe it's not butter disqusEnabled: description: Whether Disqus is enabled for the app type: boolean disqusShortname: description: Disqus shortname to used for the app type: string soundsEnabled: description: Whether sounds on new contributions are enabled type: boolean example: false animationsEnabled: description: Whether background animations on new contributions are enabled type: boolean example: true resetEveryAmount: description: Contribution goal reset frequency amount type: number example: 1 resetEvery: description: Contribution goal reset frequency type: string example: Day displayPerksValue: description: Whether perk values are displayed type: boolean example: false sortPerksByPopularity: description: Whether perks are sorted by popularity type: boolean default: true sounds: description: Array of custom sounds which can be used on new contributions type: array items: type: string example: - >- https://github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/AQS/doublekill.wav animationColors: description: >- Array of custom HEX colors which can be used for background animations on new contributions type: array items: type: string example: - '#FF0000' - '#00FF00' - '#0000FF' x-konfig-properties: startDate: description: >- UNIX timestamp for crowdfund start time (https://www.unixtimestamp.com/) type: number example: 768658369 endDate: description: >- UNIX timestamp for crowdfund end time (https://www.unixtimestamp.com/) type: number example: 771336769 BasicAppData: type: object properties: id: description: Id of the app type: string example: 3ki4jsAkN4u9rv1PUzj1odX4Nx7s name: description: Name given to the app when it was created type: string example: my test app storeId: description: Id of the store to which the app belongs type: string example: 9CiNzKoANXxmk5ayZngSXrHTiVvvgCrwrpFQd4m2K776 created: description: UNIX timestamp for when the app was created type: integer example: 1651554744 appType: description: Type of the app which was created type: string example: PointOfSale archived: description: If true, the app does not appear in the apps list by default. type: boolean default: false nullable: true CreatePointOfSaleAppRequest: type: object properties: title: description: The title of the app (shown to the user) type: string nullable: true description: description: The description of the app type: string nullable: true appName: description: The name of the app (shown in admin UI) type: string nullable: false template: description: Template for items available in the app type: string nullable: true defaultView: description: Template for items available in the app type: string nullable: true x-enumNames: - Cart - Light - Print - Static enum: - Cart - Light - Print - Static currency: description: >- Currency to use for the app. Defaults to the currency used by the store if not specified type: string example: BTC nullable: true showCustomAmount: description: >- Whether to include a special item in the store which allows user to input a custom payment amount type: boolean default: false nullable: true showDiscount: description: >- Whether to allow user to input a discount amount. Applies to Cart view only. Not recommended for customer self-checkout type: boolean default: true nullable: true enableTips: description: >- Whether to allow user to input a tip amount. Applies to Cart and Light views only type: boolean default: true nullable: true customAmountPayButtonText: description: >- Payment button text which appears for items which allow user to input a custom amount type: string default: Pay nullable: true fixedAmountPayButtonText: description: Payment button text which appears for items which have a fixed price type: string default: Buy for {PRICE_HERE} nullable: true tipText: description: >- Prompt which appears next to the tip amount field if tipping is enabled type: string default: Do you want to leave a tip? nullable: true customCSSLink: description: Link to a custom CSS stylesheet to be used in the app type: string nullable: true embeddedCSS: description: Custom CSS to embed into the app type: string nullable: true notificationUrl: description: >- Callback notification url to POST to once when invoice is paid for and once when there are enough blockchain confirmations type: string nullable: true redirectUrl: description: URL to redirect user to once invoice is paid type: string nullable: true redirectAutomatically: description: >- Whether to redirect user to redirect URL automatically once invoice is paid. Defaults to what is set in the store settings type: boolean nullable: true requiresRefundEmail: description: >- Whether refund email is required when paying the invoice. Defaults to what is set in the store settings type: boolean nullable: true formId: description: Form ID to request customer data type: string nullable: true CreateCrowdfundAppRequest: type: object properties: title: description: The title of the app (shown to the user) type: string example: My crowdfund app nullable: true description: description: The description of the app (shown to the user) type: string example: My app description nullable: true appName: description: The name of the app (shown in admin UI) type: string example: Kukkstarter nullable: false enabled: description: Determines if the app is enabled to be viewed by everyone type: boolean default: true nullable: true enforceTargetAmount: description: Will not allow contributions over the set target amount type: boolean default: false nullable: true startDate: description: >- UNIX timestamp for crowdfund start time (https://www.unixtimestamp.com/) type: number allOf: - $ref: '#/components/schemas/UnixTimestamp' example: 768658369 nullable: true endDate: description: >- UNIX timestamp for crowdfund end time (https://www.unixtimestamp.com/) type: number allOf: - $ref: '#/components/schemas/UnixTimestamp' example: 771336769 nullable: true targetCurrency: description: >- Target currency for the crowdfund. Defaults to the currency used by the store if not specified type: string example: BTC nullable: true targetAmount: description: Target amount for the crowdfund type: number example: 420 nullable: true customCSSLink: description: Link to a custom CSS stylesheet to be used in the app type: string nullable: true mainImageUrl: description: URL for image to be used as a cover image for the app type: string nullable: true embeddedCSS: description: Custom CSS to embed into the app type: string nullable: true perksTemplate: description: YAML template of perks available in the app type: string example: "test_perk:\r\n price: 100\r\n title: test perk\r\n price_type: \"fixed\" \r\n disabled: false" nullable: true notificationUrl: description: >- Callback notification url to POST to once when invoice is paid for and once when there are enough blockchain confirmations type: string nullable: true tagline: description: Tagline for the app (shown to the user) type: string example: I can't believe it's not butter nullable: true disqusShortname: description: >- Disqus shortname to used for the app. Enables Disqus functionality if set. type: string nullable: true soundsEnabled: description: Enables sounds on new contributions if set to true type: boolean default: false nullable: true animationsEnabled: description: Enables background animations on new contributions if set to true type: boolean default: false nullable: true resetEveryAmount: description: >- Contribution goal reset frequency amount. Must be used in conjunction with resetEvery and startDate. type: number default: 1 nullable: true resetEvery: description: >- Contribution goal reset frequency. Must be used in conjunction with resetEveryAmount and startDate. type: string nullable: true default: Never x-enumNames: - Day - Hour - Month - Never - Year enum: - Day - Hour - Month - Never - Year displayPerksValue: description: Displays values of perks if set to true type: boolean default: false nullable: true sortPerksByPopularity: description: Sorts perks by popularity if set to true type: boolean default: false nullable: true sounds: description: Array of custom sounds to use on new contributions type: array items: type: string nullable: true example: - >- https://github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/AQS/doublekill.wav animationColors: description: >- Array of custom HEX colors to use for background animations on new contributions type: array items: type: string nullable: true example: - '#0000FF' - '#00FF00' - '#FF0000' CustodianData: type: object properties: code: description: The unique code of the custodian. type: string nullable: false label: description: The name of the custodian. type: string nullable: false depositablePaymentMethods: description: >- A list of payment methods (crypto code + network) you can deposit to the custodian. type: array items: type: string nullable: false withdrawablePaymentMethods: description: >- A list of payment methods (crypto code + network) you can withdraw from the custodian. type: array items: type: string nullable: false tradableAssetPairs: description: >- A list of tradable asset pair objects, or NULL if the custodian cannot trades/convert assets. type: array nullable: true items: $ref: '#/components/schemas/AssetPairData' example: code: kraken name: Kraken tradableAssetPairs: BTC/USD: assetBought: BTC assetSold: USD minimumTradeQty: 0.001 BTC/EUR: assetBought: BTC assetSold: EUR minimumTradeQty: 0.001 LTC/USD: assetBought: LTC assetSold: USD minimumTradeQty: 0.05 LTC/EUR: assetBought: LTC assetSold: EUR minimumTradeQty: 0.05 withdrawablePaymentMethods: - BTC-OnChain - LTC-OnChain depositablePaymentMethods: - BTC-OnChain - LTC-OnChain CustodianAccountData: type: object properties: id: description: >- The unique code of the customer's account with this custodian. The format depends on the custodian. type: string storeId: description: The store ID. type: string custodianCode: description: The code for the custodian. type: string name: description: The name of the custodian account. type: string assetBalances: description: >- A real-time loaded list of all assets (fiat and crypto) on this custodian and the quantity held in the account. Assets with qty 0 can be omitted. type: array nullable: true items: $ref: '#/components/schemas/AssetBalanceData' config: description: >- The configuration of this custodian account. Specific contents depend on the custodian and your access permissions. type: object nullable: true example: accountId: xxxxxxxxxxxxxxx storeId: xxxxxxxxxxxxxx custodianCode: kraken name: My Kraken Account assetBalances: - asset: BTC qty: '1.23456' - asset: USD qty: '123456.78' config: WithdrawToAddressNamePerPaymentMethod: BTC-OnChain: My Ledger Nano ApiKey: xxx PrivateKey: xxx CreateCustodianAccountRequest: type: object properties: id: description: >- The unique code of the customer's account with this custodian. The format depends on the custodian. type: string storeId: description: The store ID. type: string custodianCode: description: The code for the custodian. type: string name: description: The name of the custodian account. type: string config: description: >- The configuration of this custodian account. Specific contents depend on the custodian and your access permissions. type: object nullable: true example: accountId: xxxxxxxxxxxxxxx storeId: xxxxxxxxxxxxxx custodianCode: kraken name: My Kraken Account config: WithdrawToAddressNamePerPaymentMethod: BTC-OnChain: My Ledger Nano ApiKey: xxx PrivateKey: xxx QuoteResultData: type: object properties: fromAsset: description: The asset to trade. type: string nullable: false toAsset: description: The asset you want. type: string nullable: false bid: description: The bid price. type: string format: decimal nullable: false ask: description: The ask price type: string format: decimal nullable: false example: fromAsset: USD toAsset: BTC bid: '30000.12' ask: '30002.24' TradeRequestData: type: object properties: fromAsset: description: The asset to trade. type: string nullable: false toAsset: description: The asset you want. type: string nullable: false qty: oneOf: - description: The qty of fromAsset to convert into toAsset. type: string format: decimal example: '1.50' - description: >- The percent of fromAsset to convert into toAsset. The value must end with "%" to be considered a percentage. type: string example: 50% nullable: false example: fromAsset: USD toAsset: BTC qty: 50% TradeResultData: type: object properties: fromAsset: description: The asset to trade. type: string toAsset: description: The asset you want. type: string ledgerEntries: description: >- The asset entries that were changed during the trade. This is an array of at least 2 items with the asset sold and the asset gained. It may also include ledger entries for the costs of the trade and possibly exchange tokens used. type: array items: $ref: '#/components/schemas/LedgerEntryData' tradeId: description: >- The unique ID of the trade used by the exchange. This ID can be used to get the details of this trade at a later time. type: string nullable: true accountId: description: The unique ID of the custodian account used. type: string nullable: false custodianCode: description: The code of the custodian used. type: string nullable: false example: fromAsset: USD toAsset: BTC ledgerEntries: - asset: BTC qty: '-0.00123456' type: Fee - asset: BTC qty: '1.23456' type: Trade - asset: KFEE qty: '-123.456' type: Fee - asset: USD qty: '-61728' type: Trade tradeId: XXXX-XXXX-XXXX-XXXX accountId: xxxxxxxxxxxxxx custodianCode: kraken WithdrawalRequestData: type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodId' qty: oneOf: - description: The quantity to withdraw. type: string format: decimal - description: >- The percent of your holdings to withdraw. The value must end with "%" to be considered a percentage. type: string example: paymentMethod: BTC-OnChain qty: '0.123456' x-konfig-properties: paymentMethod: nullable: false WithdrawalResultData: type: object properties: asset: description: The asset that is being withdrawn. type: string paymentMethod: description: The payment method that is used (crypto code + network). type: string ledgerEntries: description: >- The asset entries that were changed during the withdrawal. The first item is always the withdrawal itself. It could also includes ledger entries for the costs and may include credits or exchange tokens to give a discount. type: array items: $ref: '#/components/schemas/LedgerEntryData' withdrawalId: description: The unique ID of the withdrawal used by the exchange. type: string nullable: true accountId: description: The unique ID of the custodian account used. type: string nullable: false custodianCode: description: The code of the custodian used. type: string nullable: false status: description: >- The status of the withdrawal: 'Queued', 'Complete', 'Failed' or 'Unknown'. type: string nullable: false transactionId: description: >- The transaction ID on the blockchain once the withdrawal has been executed. type: string nullable: true targetAddress: description: >- The address where the funds were sent to once the withdrawal has been executed. type: string nullable: true example: asset: BTC paymentMethod: BTC-OnChain ledgerEntries: - asset: BTC qty: '-0.005' type: Fee - asset: BTC qty: '-0.123456' type: Withdrawal withdrawalId: XXXX-XXXX-XXXX-XXXX accountId: xxxxxxxxxxxxxxx custodianCode: kraken status: Complete transactionId: xxxxxxxxxxxxxxx targetAddress: bc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx WithdrawalSimulationResultData: type: object properties: asset: description: The asset that is being withdrawn. type: string paymentMethod: description: The payment method that is used (crypto code + network). type: string ledgerEntries: description: >- The asset entries that would be changed if this were a real withdrawal. The first item is always the withdrawal itself. It could also includes ledger entries for the costs and may include credits or exchange tokens to give a discount. type: array items: $ref: '#/components/schemas/LedgerEntryData' accountId: description: The unique ID of the custodian account used. type: string nullable: false custodianCode: description: The code of the custodian used. type: string nullable: false minQty: description: The minimum amount to withdraw type: string format: decimal nullable: true maxQty: description: The maximum amount to withdraw type: string format: decimal nullable: true example: asset: BTC paymentMethod: BTC-OnChain ledgerEntries: - asset: BTC qty: '-0.005' type: Fee - asset: BTC qty: '-0.123456' type: Withdrawal withdrawalId: XXXX-XXXX-XXXX-XXXX accountId: xxxxxxxxxxxxxxx custodianCode: kraken status: Complete transactionId: xxxxxxxxxxxxxxx targetAddress: bc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx LedgerEntryData: description: >- A single ledger entry meaning an asset and qty has changed (increased or decreased). type: object properties: asset: description: An asset. type: string nullable: false qty: description: The quantity changed of the asset. Can be positive or negative. type: string format: decimal nullable: false type: description: Trade, Fee or Withdrawal type: string nullable: false example: asset: BTC qty: '1.23456' type: Trade AssetBalanceData: description: An asset and it's qty. type: object properties: asset: description: An asset. type: string nullable: false qty: description: The quantity changed of the asset. Can be positive or negative. type: string format: decimal nullable: false example: asset: BTC qty: '1.23456' AssetPairData: description: An asset pair we can trade. type: object properties: pair: description: The name of the asset pair. type: string nullable: false minimumTradeQty: description: The smallest amount we can buy or sell. type: number nullable: false example: assetBought: BTC assetSold: USD minimumTradeQty: 0.0001 ApplicationHealthData: type: object properties: synchronized: description: True if the instance is fully synchronized, according to NBXplorer type: boolean InvoiceDataList: type: array items: $ref: '#/components/schemas/InvoiceData' MarkInvoiceStatusRequest: type: object properties: status: $ref: '#/components/schemas/InvoiceStatusMark' x-konfig-properties: status: description: Mark an invoice as completed or invalid. nullable: false InvoiceStatusMark: description: '' type: string x-enumNames: - Invalid - Settled enum: - Invalid - Settled InvoiceStatus: description: The status of the invoice type: string x-enumNames: - Expired - Invalid - New - Processing - Settled enum: - Expired - Invalid - New - Processing - Settled InvoiceAdditionalStatus: description: >- An additional status that describes why an invoice is in its current status. type: string x-enumNames: - Invalid - Marked - None - PaidLate - PaidOver - PaidPartial enum: - Invalid - Marked - None - PaidLate - PaidOver - PaidPartial InvoiceDataBase: properties: metadata: $ref: '#/components/schemas/InvoiceMetadata' checkout: description: Additional settings to customize the checkout flow nullable: true allOf: - $ref: '#/components/schemas/CheckoutOptions' receipt: description: Additional settings to customize the public receipt nullable: true allOf: - $ref: '#/components/schemas/ReceiptOptions' InvoiceData: allOf: - $ref: '#/components/schemas/InvoiceDataBase' - type: object properties: id: description: The identifier of the invoice type: string storeId: description: The store identifier that the invoice belongs to type: string amount: description: >- The amount of the invoice. Note that the amount will be zero for a top-up invoice that is paid after invoice expiry. type: string format: decimal example: '5.00' currency: description: The currency of the invoice type: string example: USD type: $ref: '#/components/schemas/InvoiceType' checkoutLink: description: >- The link to the checkout page, where you can redirect the customer type: string createdTime: $ref: '#/components/schemas/UnixTimestamp' expirationTime: $ref: '#/components/schemas/UnixTimestamp' monitoringExpiration: $ref: '#/components/schemas/UnixTimestamp' status: $ref: '#/components/schemas/InvoiceStatus' additionalStatus: $ref: '#/components/schemas/InvoiceAdditionalStatus' availableStatusesForManualMarking: description: The statuses the invoice can be manually marked as type: array items: $ref: '#/components/schemas/InvoiceStatus' archived: description: true if the invoice is archived type: boolean x-konfig-properties: createdTime: description: The creation time of the invoice expirationTime: description: The expiration time of the invoice monitoringExpiration: description: Expiration time for monitoring of the invoice for any changes InvoiceMetadata: description: >- Additional information around the invoice that can be supplied. The mentioned properties are all optional and you can introduce any json format you wish. See [our documentation](https://docs.btcpayserver.org/Development/InvoiceMetadata/) for more information. type: object additionalProperties: true example: orderId: pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4 orderUrl: https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos itemDesc: Tea shop posData: tip: 0.48 cart: - title: Pu Erh id: pu erh count: 1 image: ~/img/pos-sample/pu-erh.jpg price: type: 2 value: 2 formatted: $2.00 inventory: null - title: Rooibos id: rooibos count: 1 image: ~/img/pos-sample/rooibos.jpg price: type: 2 value: 1.2 formatted: $1.20 inventory: null total: 3.68 subTotal: 3.2 customAmount: 0 discountAmount: 0 discountPercentage: 0 receiptData: Tip: $0.48 Cart: Pu Erh: $2.00 x 1 = $2.00 Rooibos: $1.20 x 1 = $1.20 anyOf: - title: Buyer informations properties: buyerName: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerEmail: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerCountry: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerZip: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerState: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerCity: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerAddress1: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerAddress2: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true buyerPhone: description: >- Visible in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true - title: Product information properties: itemDesc: description: >- When using the Point of Sale (except in keypad or cart view), this field is set to the item description of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view. type: string nullable: true itemCode: description: >- When using the Point of Sale (except in keypad or cart view), this field is set to the item code of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view. type: string nullable: true - title: Order information properties: orderId: description: >- Refers to the order ID from an external system, such as an e-commerce platform like WooCommerce. This property is indexed, allowing for efficient invoice searches using the `orderId`. type: string nullable: true orderUrl: description: >- Refers to a URL linking back to the order page of the external system. This link is displayed in the invoice details view. type: string nullable: true taxIncluded: description: >- Represents the tax amount in the invoice currency. This information will appear in the invoice details view. During invoice creation, the value is automatically rounded to significant digits and ensured not to be greater than the invoice's price. type: number nullable: true physical: description: >- Indicates if this is a physical good; displayed in the invoice details view and in the BitPay API-compatible endpoints. type: string nullable: true - title: Payment request information properties: paymentRequestId: description: >- In the invoice details view, a link is provided for navigating to the payment request page associated with the invoice. type: string nullable: true - title: Point of Sale (Cart view) properties: posData: description: >- A custom JSON object that represents information displayed in the invoice details view. type: object - title: Receipt information properties: receiptData: description: >- A custom JSON object that represents information displayed on the receipt page of an invoice. nullable: true CreateInvoiceRequest: allOf: - $ref: '#/components/schemas/InvoiceDataBase' - type: object properties: amount: description: >- The amount of the invoice. If null or unspecified, the invoice will be a top-up invoice. (ie. The invoice will consider any payment as a full payment) type: string format: decimal nullable: true example: '5.00' currency: description: >- The currency of the invoice (if null, empty or unspecified, the currency will be the store's settings default)' type: string nullable: true example: USD additionalSearchTerms: description: >- Additional search term to help you find this invoice via text search type: array items: type: string nullable: true UpdateInvoiceRequest: type: object properties: metadata: $ref: '#/components/schemas/InvoiceMetadata' CheckoutOptions: type: object properties: speedPolicy: nullable: true allOf: - $ref: '#/components/schemas/SpeedPolicy' paymentMethods: description: >- A specific set of payment methods to use for this invoice (ie. BTC, BTC-LightningNetwork). By default, select all payment methods enabled in the store. type: array nullable: true items: type: string defaultPaymentMethod: description: >- Default payment type for the invoice (e.g., BTC, BTC-LightningNetwork). Default payment method set for the store is used if this parameter is not specified. allOf: - $ref: '#/components/schemas/PaymentMethodId' nullable: true lazyPaymentMethods: description: >- If true, payment methods are enabled individually upon user interaction in the invoice. Default to store's settings' type: boolean nullable: true expirationMinutes: description: >- The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15) nullable: true allOf: - $ref: '#/components/schemas/TimeSpan' monitoringMinutes: description: >- The number of minutes after an invoice expired after which we are still monitoring for incoming payments. Defaults to the store's settings. (The default store settings is 1440, 1 day) type: number nullable: true allOf: - $ref: '#/components/schemas/TimeSpan' paymentTolerance: description: >- A percentage determining whether to count the invoice as paid when the invoice is paid within the specified margin of error. Defaults to the store's settings. (The default store settings is 100) type: number format: double nullable: true minimum: 0 maximum: 100 redirectURL: description: >- When the customer has paid the invoice, the URL where the customer will be redirected when clicking on the `return to store` button. You can use placeholders `{InvoiceId}` or `{OrderId}` in the URL, BTCPay Server will replace those with this invoice `id` or `metadata.orderId` respectively. type: string nullable: true redirectAutomatically: description: >- When the customer has paid the invoice, and a `redirectURL` is set, the checkout is redirected to `redirectURL` automatically if `redirectAutomatically` is true. Defaults to the store's settings. (The default store settings is false) type: boolean nullable: true requiresRefundEmail: description: >- Invoice will require user to provide a refund email if this option is set to `true`. Has no effect if `buyerEmail` metadata is set as there is no email to collect in this case. type: boolean nullable: true checkoutType: description: |- `"V1"`: The original checkout form `"V2"`: The new experimental checkout form. If `null` or unspecified, the store's settings will be used. type: string nullable: true default: null enum: - null - V1 - V2 defaultLanguage: description: >- The language code (eg. en-US, en, fr-FR...) of the language presented to your customer in the checkout page. BTCPay Server tries to match the best language available. If null or not set, will fallback on the store's default language. You can see the list of language codes with [this operation](https://docs.btcpayserver.org). type: string nullable: true ReceiptOptions: type: object properties: enabled: description: >- A public page will be accessible once the invoice is settled. If null or unspecified, it will fallback to the store's settings. (The default store settings is true) type: boolean nullable: true showQR: description: >- Show the QR code of the receipt in the public receipt page. If null or unspecified, it will fallback to the store's settings. (The default store setting is true) type: boolean nullable: true default: null showPayments: description: >- Show the payment list in the public receipt page. If null or unspecified, it will fallback to the store's settings. (The default store setting is true) type: boolean nullable: true default: null InvoicePaymentMethodDataModel: type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodId' cryptoCode: description: Crypto code of the payment method (e.g., "BTC" or "LTC") type: string example: BTC destination: description: The destination the payment must be made to type: string paymentLink: description: A payment link that helps pay to the payment destination type: string nullable: true rate: description: >- The rate between this payment method's currency and the invoice currency type: string format: decimal example: '64392.23' paymentMethodPaid: description: The amount paid by this payment method type: string format: decimal totalPaid: description: >- The total amount paid by all payment methods to the invoice, converted to this payment method's currency type: string format: decimal due: description: >- The total amount left to be paid, converted to this payment method's currency (will be negative if overpaid) type: string format: decimal amount: description: The invoice amount, converted to this payment method's currency type: string format: decimal networkFee: description: >- The added merchant fee to pay for network costs of this payment method. type: string format: decimal payments: description: Payments made with this payment method. type: array nullable: false items: $ref: '#/components/schemas/Payment' activated: description: >- If the payment method is activated (when lazy payments option is enabled type: boolean additionalData: description: Additional data provided by the payment method. anyOf: - description: LNURL Pay information type: object properties: providedComment: description: >- The provided comment to a LNUrl payment with comments enabled type: string nullable: true example: Thank you! consumedLightningAddress: description: The consumed lightning address of a LN Address payment type: string nullable: true example: customer@example.com - description: No additional information type: object Payment: type: object properties: id: description: A unique identifier for this payment type: string receivedDate: $ref: '#/components/schemas/UnixTimestamp' value: description: The value of the payment type: string format: decimal fee: description: The fee paid for the payment type: string format: decimal status: $ref: '#/components/schemas/PaymentStatus' destination: description: The destination the payment was made to type: string x-konfig-properties: receivedDate: description: The date the payment was recorded PaymentStatus: description: The status of the payment type: string x-enumNames: - Invalid - Processing - Settled enum: - Invalid - Processing - Settled InvoiceType: description: The type of the invoice type: string x-enumNames: - Standard - TopUp enum: - Standard - TopUp ValidationProblemDetails: description: An array of validation errors of the request type: array items: description: A specific validation error on a json property type: object properties: path: description: The json path of the property which failed validation type: string nullable: false message: description: User friendly error message about the validation type: string nullable: false ProblemDetails: description: Description of an error happening during processing of the request type: object properties: code: description: An error code describing the error type: string nullable: false message: description: User friendly error message about the error type: string nullable: false UnixTimestamp: description: A unix timestamp in seconds type: number format: int32 example: 1592312018 SpeedPolicy: description: > This is a risk mitigation parameter for the merchant to configure how they want to fulfill orders depending on the number of block confirmations for the transaction made by the consumer on the selected cryptocurrency. `"HighSpeed"`: 0 confirmations (1 confirmation if RBF enabled in transaction) `"MediumSpeed"`: 1 confirmation `"LowMediumSpeed"`: 2 confirmations `"LowSpeed"`: 6 confirmations type: string x-enumNames: - HighSpeed - LowMediumSpeed - LowSpeed - MediumSpeed enum: - HighSpeed - LowMediumSpeed - LowSpeed - MediumSpeed CheckoutType: description: |- `"V1"`: The original checkout form `"V2"`: The new experimental checkout form type: string nullable: true default: V2 x-enumNames: - V1 - V2 enum: - V1 - V2 TimeSpan: type: number format: int32 example: 90 PaymentMethodId: description: >- Payment method IDs are a combination of crypto code and payment type. Available payment method IDs for Bitcoin are: - `"BTC-OnChain"` (with the equivalent of `"BTC"`) -`"BTC-LightningLike"`: Any supported LN-based payment method (Lightning or LNURL) - `"BTC-LightningNetwork"`: Lightning - `"BTC-LNURLPAY"`: LNURL Note: Separator can be either `-` or `_`. type: string ConnectToNodeRequest: type: object properties: nodeURI: description: Node URI in the form `pubkey@endpoint[:port]` type: string nullable: true CreateLightningInvoiceRequest: type: object properties: description: description: Description of the invoice in the BOLT11 type: string nullable: true amount: description: >- Amount wrapped in a string, represented in a millistatoshi string. (1000 millisatoshi = 1 satoshi) type: string nullable: false descriptionHashOnly: description: >- If `descriptionHashOnly` is `true` (default is `false`), then the BOLT11 returned contains a hash of the `description`, rather than the `description`, itself. This allows for much longer descriptions, but they must be communicated via some other mechanism. type: boolean nullable: true default: false expiry: $ref: '#/components/schemas/TimeSpan' privateRouteHints: description: True if the invoice should include private route hints type: boolean nullable: true default: false x-konfig-properties: expiry: description: Expiration time in seconds LightningChannelData: type: object properties: remoteNode: description: The public key of the node (Node ID) type: string nullable: false isPublic: description: Whether the node is public type: boolean isActive: description: Whether the node is online type: boolean capacity: description: The capacity of the channel in millisatoshi type: string nullable: false localBalance: description: The local balance of the channel in millisatoshi type: string nullable: false channelPoint: type: string nullable: true LightningPaymentData: type: object properties: id: description: The payment's ID type: string status: $ref: '#/components/schemas/LightningPaymentStatus' BOLT11: description: The BOLT11 representation of the payment type: string nullable: false paymentHash: description: The payment hash type: string nullable: false preimage: description: The payment preimage (available when status is complete) type: string createdAt: description: The unix timestamp when the payment got created nullable: true allOf: - $ref: '#/components/schemas/UnixTimestamp' totalAmount: description: The total amount (including fees) in millisatoshi type: string feeAmount: description: The total fees in millisatoshi type: string LightningInvoiceData: type: object properties: id: description: The invoice's ID type: string status: $ref: '#/components/schemas/LightningInvoiceStatus' BOLT11: description: The BOLT11 representation of the invoice type: string nullable: false paidAt: description: The unix timestamp when the invoice got paid nullable: true allOf: - $ref: '#/components/schemas/UnixTimestamp' expiresAt: $ref: '#/components/schemas/UnixTimestamp' amount: description: The amount of the invoice in millisatoshi type: string amountReceived: description: The amount received in millisatoshi type: string paymentHash: description: The payment hash type: string preimage: description: The payment preimage (available when status is complete) type: string nullable: true customRecords: description: The custom TLV records attached to a keysend payment type: object nullable: true x-konfig-properties: expiresAt: description: The unix timestamp when the invoice expires LightningInvoiceStatus: description: '' type: string x-enumNames: - Expired - Paid - Unpaid enum: - Expired - Paid - Unpaid LightningPaymentStatus: description: '' type: string x-enumNames: - Complete - Failed - Pending - Unknown enum: - Complete - Failed - Pending - Unknown LightningNodeInformationData: type: object properties: version: description: The version name of the lightning node type: string nullable: true nodeURIs: description: >- Node URIs to connect to this node in the form `pubkey@endpoint[:port]` type: array items: type: string blockHeight: description: The block height of the lightning node type: integer alias: description: The alias of the lightning node type: string nullable: true color: description: The color attribute of the lightning node type: string nullable: true peersCount: description: The number of peers type: integer nullable: true activeChannelsCount: description: The number of active channels type: integer nullable: true inactiveChannelsCount: description: The number of inactive channels type: integer nullable: true pendingChannelsCount: description: The number of pending channels type: integer nullable: true LightningNodeBalanceData: type: object properties: onchain: description: On-chain balance of the Lightning node nullable: true allOf: - $ref: '#/components/schemas/OnchainBalanceData' offchain: description: Off-chain balance of the Lightning node nullable: true allOf: - $ref: '#/components/schemas/OffchainBalanceData' OnchainBalanceData: type: object properties: confirmed: description: The confirmed amount in satoshi type: string nullable: true unconfirmed: description: The unconfirmed amount in satoshi type: string nullable: true reserved: description: The reserved amount in satoshi type: string nullable: true OffchainBalanceData: type: object properties: opening: description: The amount of current channel openings in millisatoshi type: string nullable: true local: description: >- The amount that is available on the local end of active channels in millisatoshi type: string nullable: true remote: description: >- The amount that is available on the remote end of active channels in millisatoshi type: string nullable: true closing: description: The amount of current channel closings in millisatoshi type: string nullable: true PayLightningInvoiceRequest: type: object properties: BOLT11: description: The BOLT11 of the invoice to pay type: string amount: description: >- Optional explicit payment amount in millisatoshi (if specified, it overrides the BOLT11 amount) type: string nullable: true maxFeePercent: description: The fee limit expressed as a percentage of the payment amount type: string format: float nullable: true example: '6.15' maxFeeFlat: description: The fee limit expressed as a fixed amount in satoshi type: string nullable: true example: '21' sendTimeout: description: The number of seconds after which the payment times out nullable: true example: 30 default: 30 allOf: - $ref: '#/components/schemas/TimeSpan' OpenLightningChannelRequest: type: object properties: nodeURI: description: Node URI in the form `pubkey@endpoint[:port]` type: string channelAmount: description: The amount to fund (in satoshi) type: string feeRate: description: The amount to fund (in satoshi per byte) type: number UpdateNotification: type: object properties: seen: description: >- Sets the notification as seen/unseen. If left null, sets it to the opposite value type: boolean nullable: true NotificationData: type: object properties: id: description: The id of the notification type: string identifier: description: The identifier of the notification type: string type: description: The type of the notification type: string body: description: The html body of the notifications type: string format: html link: description: The link of the notification type: string format: uri nullable: true createdTime: $ref: '#/components/schemas/UnixTimestamp' seen: description: If the notification has been seen by the user type: boolean x-konfig-properties: createdTime: description: The creation time of the notification PaymentRequestDataList: type: array items: $ref: '#/components/schemas/PaymentRequestData' PaymentRequestData: allOf: - $ref: '#/components/schemas/PaymentRequestBaseData' - type: object properties: id: description: The id of the payment request type: string nullable: false storeId: description: The store identifier that the payment request belongs to type: string status: description: The status of the payment request type: string enum: - Pending - Completed - Expired nullable: false createdTime: $ref: '#/components/schemas/UnixTimestamp' x-konfig-properties: createdTime: description: The creation date of the payment request nullable: false PaymentRequestBaseData: type: object properties: title: description: The title of the payment request type: string nullable: false description: description: The description of the payment request type: string nullable: true format: html amount: description: The amount of the payment request type: string format: decimal minimum: 0 exclusiveMinimum: true nullable: false currency: description: >- The currency of the payment request. If empty, the store's default currency code will be used. type: string format: ISO 4217 Currency code(BTC, EUR, USD, etc) nullable: true email: description: The email used in invoices generated by the payment request type: string nullable: true format: email expiryDate: description: The expiry date of the payment request nullable: true allOf: - $ref: '#/components/schemas/UnixTimestamp' embeddedCSS: description: Custom CSS styling for the payment request type: string nullable: true format: css maximum: 500 customCSSLink: description: Custom CSS link for styling the payment request type: string nullable: true format: uri allowCustomPaymentAmounts: description: >- Whether to allow users to create invoices that partially pay the payment request type: boolean nullable: true formId: description: Form ID to request customer data type: string nullable: true formResponse: description: Form data response type: object nullable: true PayoutProcessorData: type: object properties: name: description: unique identifier of the payout processor type: string friendlyName: description: Human name of the payout processor type: string paymentMethods: description: Supported, payment methods by this processor nullable: true type: array items: type: string UpdateLightningAutomatedTransferSettings: type: object properties: intervalSeconds: $ref: '#/components/schemas/TimeSpan' cancelPayoutAfterFailures: description: >- How many failures should the processor tolerate before cancelling the payout type: number nullable: true processNewPayoutsInstantly: description: >- Skip the interval when ane eligible payout has been approved (or created with pre-approval) type: boolean default: false x-konfig-properties: intervalSeconds: description: How often should the processor run LightningAutomatedTransferSettings: type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodId' intervalSeconds: $ref: '#/components/schemas/TimeSpan' cancelPayoutAfterFailures: description: >- How many failures should the processor tolerate before cancelling the payout type: number nullable: true processNewPayoutsInstantly: description: >- Skip the interval when ane eligible payout has been approved (or created with pre-approval) type: boolean default: false x-konfig-properties: intervalSeconds: description: How often should the processor run UpdateOnChainAutomatedTransferSettings: type: object properties: feeTargetBlock: description: >- How many blocks should the fee rate calculation target to confirm in. Set to 1 if not provided type: number nullable: true intervalSeconds: $ref: '#/components/schemas/TimeSpan' threshold: description: Only process payouts when this payout sum is reached. type: string format: decimal minimum: 0 example: '0.1' processNewPayoutsInstantly: description: >- Skip the interval when ane eligible payout has been approved (or created with pre-approval) type: boolean default: false x-konfig-properties: intervalSeconds: description: How often should the processor run OnChainAutomatedTransferSettings: type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodId' feeTargetBlock: description: >- How many blocks should the fee rate calculation target to confirm in. type: number intervalSeconds: $ref: '#/components/schemas/TimeSpan' threshold: description: Only process payouts when this payout sum is reached. type: string format: decimal minimum: 0 example: '0.1' processNewPayoutsInstantly: description: >- Skip the interval when ane eligible payout has been approved (or created with pre-approval) type: boolean default: false x-konfig-properties: intervalSeconds: description: How often should the processor run PullPaymentDataList: type: array items: $ref: '#/components/schemas/PullPaymentData' PayoutDataList: type: array items: $ref: '#/components/schemas/PayoutData' CreatePayoutRequest: type: object properties: destination: description: The destination of the payout (can be an address or a BIP21 url) type: string example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 amount: description: >- The amount of the payout in the currency of the pull payment (eg. USD). type: string format: decimal example: '10399.18' paymentMethod: $ref: '#/components/schemas/PaymentMethodId' CreatePayoutThroughStoreRequest: allOf: - $ref: '#/components/schemas/CreatePayoutRequest' - type: object properties: pullPaymentId: description: The pull payment to create this for. Optional. type: string approved: description: Whether to approve this payout automatically upon creation type: boolean metadata: description: Additional metadata to store with the payout type: object PayoutPaymentProof: description: >- Additional information around how the payout is being or has been paid out. The mentioned properties are all optional (except `proofType`) and you can introduce any json format you wish. type: object additionalProperties: true properties: proofType: description: The type of payment proof it is. type: string anyOf: - properties: id: description: A unique identifier to the proof of payout payment. type: string nullable: true - properties: link: description: A link to the proof of payout payment. type: string format: url nullable: true PayoutState: description: >- The state of the payout (`AwaitingApproval`, `AwaitingPayment`, `InProgress`, `Completed`, `Cancelled`) type: string example: AwaitingPayment x-enumNames: - AwaitingApproval - AwaitingPayment - Cancelled - Completed - InProgress enum: - AwaitingApproval - AwaitingPayment - Cancelled - Completed - InProgress PayoutData: type: object properties: id: description: The id of the payout type: string revision: description: >- The revision number of the payout. This revision number is incremented when the payout amount or destination is modified before the approval. type: integer pullPaymentId: description: The id of the pull payment this payout belongs to type: string date: description: The creation date of the payout as a unix timestamp type: string destination: description: The destination of the payout (can be an address or a BIP21 url) type: string example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 amount: description: >- The amount of the payout in the currency of the pull payment (eg. USD). type: string format: decimal example: '10399.18' paymentMethod: $ref: '#/components/schemas/PaymentMethodId' cryptoCode: description: >- Crypto code of the payment method of the payout (e.g., "BTC" or "LTC") type: string example: BTC paymentMethodAmount: description: >- The amount of the payout in the currency of the payment method (eg. BTC). This is only available from the `AwaitingPayment` state. type: string format: decimal nullable: true example: '1.12300000' state: $ref: '#/components/schemas/PayoutState' paymentProof: $ref: '#/components/schemas/PayoutPaymentProof' metadata: description: >- Additional information around the payout that can be supplied. The mentioned properties are all optional and you can introduce any json format you wish. type: object additionalProperties: true example: source: Payout created through the API anyOf: - title: General information properties: source: description: >- The source of the payout creation. Shown on the payout list page. type: string nullable: true sourceLink: description: >- A link to the source of the payout creation. Shown on the payout list page. type: string format: url nullable: true PullPaymentData: type: object properties: description: description: Description given to pull payment when it was created type: string id: description: Id of the pull payment type: string name: description: Name given to pull payment when it was created type: string currency: description: The currency of the pull payment's amount type: string example: BTC amount: description: The amount in the currency of this pull payment as a decimal string type: string format: decimal example: '1.12000000' period: description: The length of each period in seconds type: integer example: 604800 nullable: true BOLT11Expiration: description: >- If lightning is activated, do not accept BOLT11 invoices with expiration less than … days type: string example: 30 autoApproveClaims: description: >- Any payouts created for this pull payment will skip the approval phase upon creation type: boolean example: false default: false nullable: true archived: description: Whether this pull payment is archived type: boolean viewLink: description: The link to a page to claim payouts to this pull payment type: string LNURLData: type: object properties: lnurlBech32: description: Bech32 representation of LNURL type: string example: >- lightning:lnurl1dp68gup69uhnzv3h9cczuvpwxyarzdp3xsez7sj5gvh42j2vfe24ynp0wa5hg6rywfshwtmswqhngvntdd6x6uzvx4jrvu2kvvur23n8v46rwjpexcc45563fn53w7 lnurlUri: description: URI representation of LNURL type: string example: >- lnurlw://example.com/BTC/UILNURL/withdraw/pp/42kktmpL5d6qVc85Fget7H961ZSQ ApplicationServerInfoData: type: object properties: version: description: BTCPay Server version type: string onion: description: The Tor hostname type: string supportedPaymentMethods: description: The payment methods this server supports type: array items: type: string fullySynched: description: True if the instance is fully synchronized, according to NBXplorer type: boolean syncStatus: type: array items: $ref: '#/components/schemas/ApplicationServerInfoSyncStatusData' ApplicationServerInfoNodeStatusData: description: Detailed sync status of the internal full node type: object nullable: true properties: headers: description: The height of the chain of header of the internal full node type: integer blocks: description: The height of the latest validated block of the internal full node type: integer verificationProgress: description: The current synchronization progress type: number format: double minimum: 0 maximum: 1 ApplicationServerInfoSyncStatusData: description: Detailed sync status type: object properties: cryptoCode: description: The CryptoCode of the crypto currency (eg. BTC) type: string example: BTC nodeInformation: $ref: '#/components/schemas/ApplicationServerInfoNodeStatusData' chainHeight: description: The height of the chain of header of the internal indexer type: integer syncHeight: description: The height of the latest indexed block of the internal indexer type: number format: integer nullable: true available: description: True if the full node and the indexer are fully synchronized type: boolean nullable: false EmailData: type: object properties: email: description: Email of the recipient type: string subject: description: Subject of the email type: string body: description: Body of the email to send as plain text. type: string EmailSettingsData: type: object properties: server: description: Smtp server host type: string port: description: Smtp server port type: number login: description: Smtp server username type: string password: description: Smtp server password type: string from: description: Email to send from type: string format: email fromDisplay: description: The name of the sender type: string disableCertificateCheck: description: Disable TLS certificate security checks type: boolean default: false LightningAddressData: type: object properties: username: description: The username of the lightning address type: string currencyCode: description: >- The currency to generate the invoices for this lightning address in. Leave null lto use the store default. type: string nullable: true min: description: The minimum amount in sats this ln address allows type: string nullable: true max: description: The maximum amount in sats this ln address allows type: string nullable: true GenericPaymentMethodData: type: object properties: enabled: description: Whether the payment method is enabled type: boolean cryptoCode: description: The currency code of the payment method type: string data: description: Associated dynamic data based on payment method type. type: object oneOf: - $ref: '#/components/schemas/LightningNetworkPaymentMethodBaseData' - $ref: '#/components/schemas/OnChainPaymentMethodBaseData' - description: Any other unofficial payment method data type: object additionalProperties: true LightningNetworkPaymentMethodDataList: type: array items: $ref: '#/components/schemas/LightningNetworkPaymentMethodData' LightningNetworkPaymentMethodBaseData: type: object properties: connectionString: 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) type: string example: type=clightning;server=... LightningNetworkPaymentMethodData: allOf: - $ref: '#/components/schemas/LightningNetworkPaymentMethodBaseData' - type: object properties: enabled: description: Whether the payment method is enabled type: boolean cryptoCode: description: Crypto code of the payment method type: string paymentMethod: description: The payment method type: string UpdateLightningNetworkPaymentMethodRequest: allOf: - $ref: '#/components/schemas/LightningNetworkPaymentMethodBaseData' - type: object properties: enabled: description: Whether the payment method is enabled type: boolean LNURLPayPaymentMethodDataList: type: array items: $ref: '#/components/schemas/LNURLPayPaymentMethodData' LNURLPayPaymentMethodBaseData: type: object properties: useBech32Scheme: 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. type: boolean lud12Enabled: description: Allow comments to be passed on via lnurl. type: boolean LNURLPayPaymentMethodData: allOf: - $ref: '#/components/schemas/LNURLPayPaymentMethodBaseData' - type: object properties: enabled: description: >- Whether the payment method is enabled. Note that this can only enabled when a Lightning Network payment method is available and enabled type: boolean cryptoCode: description: Crypto code of the payment method type: string OnChainPaymentMethodDataList: type: array items: $ref: '#/components/schemas/OnChainPaymentMethodData' OnChainPaymentMethodDataWithSensitiveData: allOf: - $ref: '#/components/schemas/OnChainPaymentMethodData' - type: object properties: mnemonic: description: The mnemonic used to generate the wallet type: string nullable: false OnChainPaymentMethodBaseData: type: object properties: derivationScheme: description: The derivation scheme type: string example: xpub... label: description: A label that will be shown in the UI type: string accountKeyPath: description: >- The wallet fingerprint followed by the keypath to derive the account key used for signing operation or creating PSBTs type: string example: abcd82a1/84'/0'/0' UpdateOnChainPaymentMethodRequest: allOf: - $ref: '#/components/schemas/OnChainPaymentMethodBaseData' - type: object properties: enabled: description: Whether the payment method is enabled type: boolean OnChainPaymentMethodData: allOf: - $ref: '#/components/schemas/OnChainPaymentMethodDataPreview' - type: object properties: enabled: description: Whether the payment method is enabled type: boolean paymentMethod: description: The payment method type: string OnChainPaymentMethodDataPreview: allOf: - $ref: '#/components/schemas/OnChainPaymentMethodBaseData' - type: object properties: cryptoCode: description: Crypto code of the payment method type: string OnChainPaymentMethodPreviewResultData: type: object properties: addresses: description: a list of addresses generated by the derivation scheme type: array items: $ref: '#/components/schemas/OnChainPaymentMethodPreviewResultAddressItem' OnChainPaymentMethodPreviewResultAddressItem: type: object properties: keyPath: description: The key path relative to the account key path. type: string address: description: The address generated at the key path type: string GenerateOnChainWalletRequest: type: object properties: existingMnemonic: description: An existing BIP39 mnemonic seed to generate the wallet with type: string passphrase: description: A passphrase for the BIP39 mnemonic seed type: string accountNumber: description: The account to derive from the BIP39 mnemonic seed type: number default: 0 savePrivateKeys: 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! type: boolean default: false importKeysToRPC: 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. type: boolean default: false wordList: description: >- If `existingMnemonic` is not set, a mnemonic is generated using the specified wordList. type: string default: English x-enumNames: - ChineseSimplified - ChineseTraditional - Czech - English - French - Japanese - PortugueseBrazil - Spanish enum: - ChineseSimplified - ChineseTraditional - Czech - English - French - Japanese - PortugueseBrazil - Spanish wordCount: description: >- If `existingMnemonic` is not set, a mnemonic is generated using the specified wordCount. type: number default: 12 x-enumNames: - 12 - 15 - 18 - 21 - 24 enum: - 12 - 15 - 18 - 21 - 24 scriptPubKeyType: description: the type of wallet to generate type: string default: Segwit x-enumNames: - Legacy - Segwit - SegwitP2SH enum: - Legacy - Segwit - SegwitP2SH StoreRateConfiguration: type: object properties: spread: description: >- A spread applies to the rate fetched in `%`. Must be `>= 0` or `<= 100` type: string preferredSource: description: >- If `isCustomerScript` is `false` affect use this source in the default's `effectiveScript`, if `isCustomerScript` is `false`, this setting is set to `null`. (See /misc/rate-sources for the available sources) type: string isCustomScript: description: >- Whether to use `preferredSource` with default script or a custom `effectiveScript`. type: boolean effectiveScript: description: >- When `isCustomScript` is `true`, this represent the custom script used to calculate a currency pair's exchange rate. Else, it represent the script generated by the default rules and `preferredSource`. type: string StoreRateResult: type: object properties: currencyPair: description: Currency pair in the format of `BTC_USD` type: string example: BTC_USD errors: description: Errors relating to this currency pair fetching based on your config type: array nullable: true items: type: string rate: description: the rate fetched based on the currency pair type: string format: decimal example: '64392.23' StoreUserDataList: type: array items: $ref: '#/components/schemas/StoreUserData' StoreUserData: allOf: - type: object properties: userId: description: The id of the user type: string nullable: false role: description: The role of the user. Default roles are `Owner` and `Guest` type: string nullable: false OnChainWalletOverviewData: type: object properties: balance: description: The total current balance of the wallet type: string format: decimal unconfirmedBalance: description: The current unconfirmed balance of the wallet type: string format: decimal confirmedBalance: description: The current confirmed balance of the wallet type: string format: decimal OnChainWalletFeeRateData: type: object properties: feerate: description: >- The fee rate (sats per byte) based on the wallet's configured recommended block confirmation target type: number format: decimal OnChainWalletAddressData: type: object properties: address: description: The bitcoin address type: string keyPath: description: the derivation path in relation to the HD account type: string format: keypath paymentLink: description: a bip21 payment link type: string format: BIP21 TransactionStatus: type: string x-enumNames: - Confirmed - Unconfirmed enum: - Confirmed - Unconfirmed LabelData: type: object additionalProperties: true deprecated: true properties: type: description: The type of label type: string text: description: Information about this label type: string OnChainWalletTransactionData: type: object properties: transactionHash: description: The transaction id type: string nullable: true comment: description: A comment linked to the transaction type: string amount: description: The amount the wallet balance changed with this transaction type: string format: decimal blockHash: description: >- The hash of the block that confirmed this transaction. Null if still unconfirmed. type: string nullable: true blockHeight: description: >- The height of the block that confirmed this transaction. Null if still unconfirmed. type: string nullable: true confirmations: description: The number of confirmations for this transaction type: string nullable: true timestamp: $ref: '#/components/schemas/UnixTimestamp' status: $ref: '#/components/schemas/TransactionStatus' labels: description: Labels linked to this transaction deprecated: true type: array items: $ref: '#/components/schemas/LabelData' x-konfig-properties: timestamp: description: The time of the transaction status: description: The status of this transaction OnChainWalletUTXOData: type: object properties: comment: description: A comment linked to this utxo type: string amount: description: the value of this utxo type: string link: description: a link to the configured blockchain explorer to view the utxo type: string format: url outpoint: description: outpoint of this utxo type: string format: '{txid}:{outputIndex}' timestamp: $ref: '#/components/schemas/UnixTimestamp' keyPath: description: the derivation path in relation to the HD account type: string format: keypath address: description: The wallet address of this utxo type: string confirmations: description: The number of confirmations of this utxo type: number labels: description: Labels linked to this transaction deprecated: true type: array items: $ref: '#/components/schemas/LabelData' x-konfig-properties: timestamp: description: The time of the utxo CreateOnChainTransactionRequestDestination: type: object properties: destination: description: A wallet address or a BIP21 payment link type: string amount: description: >- The amount to send. If `destination` is a BIP21 link, the amount must be the same or null. type: string format: decimal nullable: true subtractFromAmount: description: >- Whether to subtract the transaction fee from the provided amount. This makes the receiver receive less, or in other words: he or she pays the transaction fee. Also useful if you want to clear out your wallet. Must be false if `destination` is a BIP21 link type: boolean CreateOnChainTransactionRequest: type: object properties: destinations: description: What and where to send money nullable: false type: array items: $ref: '#/components/schemas/CreateOnChainTransactionRequestDestination' feerate: description: Transaction fee. type: number format: decimal or long (sats/byte) proceedWithPayjoin: description: >- Whether to attempt to do a BIP78 payjoin if one of the destinations is a BIP21 with payjoin enabled type: boolean default: true nullable: true proceedWithBroadcast: description: >- Whether to broadcast the transaction after creating it or to simply return the transaction in hex format. type: boolean default: true nullable: true noChange: description: >- Whether to send all the spent coins to the destinations (THIS CAN COST YOU SIGNIFICANT AMOUNTS OF MONEY, LEAVE FALSE UNLESS YOU KNOW WHAT YOU ARE DOING). type: boolean default: false nullable: true rbf: description: >- Whether to enable RBF for the transaction. Leave blank to have it random (beneficial to privacy) type: boolean nullable: true excludeUnconfirmed: description: Whether to exclude unconfirmed UTXOs from the transaction. type: boolean default: false nullable: true selectedInputs: description: >- Restrict the creation of the transactions from the outpoints provided ONLY (coin selection) nullable: true type: array items: type: string PatchOnChainTransactionRequest: type: object properties: comment: description: Transaction comment nullable: true type: string labels: description: Transaction labels nullable: true deprecated: true type: array items: type: string OnChainWalletObjectId: type: object properties: type: description: The type of wallet object type: string id: description: The identifier of the wallet object (unique per type, per wallet) type: string OnChainWalletObjectLink: type: object properties: type: description: The type of wallet object type: string id: description: The identifier of the wallet object (unique per type, per wallet) type: string linkData: description: The data of the link type: object additionalProperties: true objectData: description: >- The data of the neighbour's node (`null` if there isn't any data or `includeNeighbourData` is `false`) type: object additionalProperties: true RoleData: type: object properties: id: description: >- The role's Id (Same as role if the role is created at server level, if the role is created at the store level the format is `STOREID::ROLE`) type: string nullable: false example: Owner role: description: The role's name type: string nullable: false example: Owner permissions: description: The permissions attached to this role type: array items: type: string example: - btcpay.store.candeposittocustodianaccount - btcpay.store.canmodifystoresettings - btcpay.store.cantradecustodianaccount - btcpay.store.canwithdrawfromcustodianaccount isServerRole: description: >- Whether this role is at the scope of the store or scope of the server type: boolean example: true StoreDataList: type: array items: $ref: '#/components/schemas/StoreData' StoreData: allOf: - $ref: '#/components/schemas/StoreBaseData' - type: object properties: id: description: The id of the store type: string nullable: false PaymentMethodCriteriaData: type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodId' currencyCode: description: The currency type: string default: USD example: USD amount: description: The amount type: string format: decimal minimum: 0 above: description: If the criterion is for above or below the amount type: boolean default: false x-konfig-properties: paymentMethod: nullable: false StoreBaseData: type: object x-abstract: true properties: name: description: The name of the store type: string website: description: The absolute url of the store type: string nullable: true format: url supportUrl: description: >- The support URI of the store, can contain the placeholders `{OrderId}` and `{InvoiceId}`. Can be any valid URI, such as a website, email, and nostr. type: string nullable: true format: uri defaultCurrency: description: The default currency of the store type: string default: USD example: USD invoiceExpiration: $ref: '#/components/schemas/TimeSpan' displayExpirationTimer: $ref: '#/components/schemas/TimeSpan' monitoringExpiration: $ref: '#/components/schemas/TimeSpan' speedPolicy: $ref: '#/components/schemas/SpeedPolicy' lightningDescriptionTemplate: description: >- The BOLT11 description of the lightning invoice in the checkout. You can use placeholders '{StoreName}', '{ItemDescription}' and '{OrderId}'. type: string nullable: true paymentTolerance: description: >- Consider an invoice fully paid, even if the payment is missing 'x' % of the full amount. type: number format: double minimum: 0 maximum: 100 default: 0 archived: description: If true, the store does not appear in the stores list by default. type: boolean default: false anyoneCanCreateInvoice: description: >- If true, then no authentication is needed to create invoices on this store. type: boolean default: false requiresRefundEmail: description: >- If true, the checkout page will ask to enter an email address before accessing payment information. type: boolean default: false checkoutType: $ref: '#/components/schemas/CheckoutType' receipt: description: Additional settings to customize the public receipt nullable: true allOf: - $ref: '#/components/schemas/ReceiptOptions' lightningAmountInSatoshi: description: >- If true, lightning payment methods show amount in satoshi in the checkout page. type: boolean default: false lightningPrivateRouteHints: description: >- Should private route hints be included in the lightning payment of the checkout page. type: boolean default: false onChainWithLnInvoiceFallback: description: Unify on-chain and lightning payment URL. type: boolean default: false redirectAutomatically: description: >- After successfull payment, should the checkout page redirect the user automatically to the redirect URL of the invoice? type: boolean default: false showRecommendedFee: type: boolean default: true recommendedFeeBlockTarget: description: >- The fee rate recommendation in the checkout page for the on-chain payment to be confirmed after 'x' blocks. type: integer format: int32 default: 1 defaultLang: description: >- The default language to use in the checkout page. (The different translations available are listed [here](https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer/wwwroot/locales) type: string default: en customLogo: description: URL to a logo to include in the checkout page. type: string nullable: true customCSS: description: URL to a CSS stylesheet to include in the checkout page type: string nullable: true htmlTitle: description: >- The HTML title of the checkout page (when you over the tab in your browser) type: string nullable: true networkFeeMode: $ref: '#/components/schemas/NetworkFeeMode' payJoinEnabled: description: >- If true, payjoin will be proposed in the checkout page if possible. ([More information](https://docs.btcpayserver.org/Payjoin/)) type: boolean default: false autoDetectLanguage: description: >- If true, the language on the checkout page will adapt to the language defined by the user's browser settings type: boolean default: false showPayInWalletButton: description: >- If true, the "Pay in wallet" button will be shown on the checkout page (Checkout V2) type: boolean default: true showStoreHeader: description: >- If true, the store header will be shown on the checkout page (Checkout V2) type: boolean default: true celebratePayment: description: >- If true, payments on the checkout page will be celebrated with confetti (Checkout V2) type: boolean default: true playSoundOnPayment: description: If true, sounds on the checkout page will be enabled (Checkout V2) type: boolean default: false lazyPaymentMethods: description: >- If true, payment methods are enabled individually upon user interaction in the invoice type: boolean default: false defaultPaymentMethod: $ref: '#/components/schemas/PaymentMethodId' paymentMethodCriteria: description: The criteria required to activate specific payment methods. type: array nullable: true items: $ref: '#/components/schemas/PaymentMethodCriteriaData' x-konfig-properties: invoiceExpiration: description: >- The time after which an invoice is considered expired if not paid. The value will be rounded down to a minute. default: 900 minimum: 60 maximum: 2073600 displayExpirationTimer: description: >- The time left that will trigger the countdown timer on the checkout page to be shown. The value will be rounded down to a minute. default: 300 minimum: 60 maximum: 2073600 monitoringExpiration: description: >- The time after which an invoice which has been paid but not confirmed will be considered invalid. The value will be rounded down to a minute. default: 3600 minimum: 600 maximum: 2073600 NetworkFeeMode: description: >- Check whether network fee should be added to the invoice if on-chain payment is used. ([More information](https://docs.btcpayserver.org/FAQ/Stores/#add-network-fee-to-invoice-vary-with-mining-fees)) type: string x-enumNames: - Always - MultiplePaymentsOnly - Never enum: - Always - MultiplePaymentsOnly - Never ApplicationUserData: type: object properties: id: description: The id of the user type: string nullable: false email: description: The email of the user type: string nullable: false emailConfirmed: description: True if the email has been confirmed by the user type: boolean requiresEmailConfirmation: description: True if the email requires confirmation to log in type: boolean approved: description: True if an admin has approved the user type: boolean requiresApproval: description: True if the instance requires approval to log in type: boolean created: description: >- The creation date of the user as a unix timestamp. Null if created before v1.0.5.6 nullable: true allOf: - $ref: '#/components/schemas/UnixTimestamp' roles: description: The roles of the user type: array nullable: false items: type: string LockUserRequest: type: object properties: locked: description: Whether to lock or unlock the user type: boolean ApproveUserRequest: type: object properties: approved: description: Whether to approve or unapprove the user type: boolean WebhookDeliveryList: type: array items: $ref: '#/components/schemas/WebhookDeliveryData' WebhookDeliveryData: type: object properties: id: description: The id of the delivery type: string nullable: false timestamp: $ref: '#/components/schemas/UnixTimestamp' httpCode: description: HTTP code received by the remote service, if any. type: number nullable: true errorMessage: description: User friendly error message, if any. type: string status: description: >- Whether the delivery failed or not (possible values are: `Failed`, `HttpError`, `HttpSuccess`) type: string x-konfig-properties: timestamp: description: Timestamp of when the delivery got broadcasted nullable: false WebhookDataList: type: array items: $ref: '#/components/schemas/WebhookData' WebhookData: allOf: - $ref: '#/components/schemas/WebhookDataBase' - type: object properties: id: description: The id of the webhook type: string nullable: false WebhookDataCreate: allOf: - $ref: '#/components/schemas/WebhookDataBase' - type: object properties: secret: description: >- Must be used by the callback receiver to ensure the delivery comes from BTCPay Server. BTCPay Server includes the `BTCPay-Sig` HTTP header, whose format is `sha256=HMAC256(UTF8(webhook's secret), body)`. The pattern to authenticate the webhook is similar to [how to secure webhooks in Github](https://docs.github.com/webhooks/securing/). If left out, null, or empty, the secret will be auto-generated. type: string nullable: true WebhookDataCreateResult: allOf: - $ref: '#/components/schemas/WebhookData' - type: object properties: secret: description: >- Must be used by the callback receiver to ensure the delivery comes from BTCPay Server. BTCPay Server includes the `BTCPay-Sig` HTTP header, whose format is `sha256=HMAC256(UTF8(webhook's secret), body)`. The pattern to authenticate the webhook is similar to [how to secure webhooks in Github](https://docs.github.com/webhooks/securing/). Value of the auto-generated or custom secret. type: string nullable: true WebhookDataUpdate: allOf: - $ref: '#/components/schemas/WebhookDataBase' - type: object properties: secret: description: >- Must be used by the callback receiver to ensure the delivery comes from BTCPay Server. BTCPay Server includes the `BTCPay-Sig` HTTP header, whose format is `sha256=HMAC256(UTF8(webhook's secret), body)`. The pattern to authenticate the webhook is similar to [how to secure webhooks in Github](https://docs.github.com/webhooks/securing/). If left out, null, or empty, the secret will not be changed. type: string nullable: true WebhookDataBase: type: object properties: enabled: description: Whether this webhook is enabled or not type: boolean nullable: false default: true automaticRedelivery: description: >- If true, BTCPay Server will retry to redeliver any failed delivery after 10 seconds, 1 minutes and up to 6 times after 10 minutes. type: boolean nullable: false default: true url: description: >- The endpoint where BTCPay Server will make the POST request with the webhook body type: string nullable: false authorizedEvents: description: Which event should be received by this endpoint type: object properties: everything: description: >- If true, the endpoint will receive all events related to the store. type: boolean nullable: false default: true specificEvents: description: >- If `everything` is false, the specific events that the endpoint is interested in. Current events are: `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoiceProcessing`, `InvoiceExpired`, `InvoiceSettled`, `InvoiceInvalid`. type: array items: type: string nullable: false WebhookEvent: type: object properties: deliveryId: description: The delivery id of the webhook type: string nullable: false webhookId: description: The id of the webhook type: string nullable: false originalDeliveryId: description: >- If this delivery is a redelivery, the is the delivery id of the original delivery. type: string nullable: false isRedelivery: description: True if this delivery is a redelivery type: boolean nullable: false type: description: >- The type of this event, current available are `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoiceProcessing`, `InvoiceExpired`, `InvoiceSettled`, `InvoiceInvalid`, and `InvoicePaymentSettled`. type: string nullable: false timestamp: $ref: '#/components/schemas/UnixTimestamp' x-konfig-properties: timestamp: description: The timestamp when this delivery has been created WebhookInvoiceEvent: allOf: - $ref: '#/components/schemas/WebhookEvent' - type: object properties: storeId: description: The store id of the invoice's event type: string nullable: false invoiceId: description: The invoice id of the invoice's event type: string nullable: false metadata: description: >- User-supplied metadata added to the invoice at the time of its creation type: object nullable: false WebhookInvoiceSettledEvent: description: Callback sent if the `type` is `InvoiceSettled` allOf: - $ref: '#/components/schemas/WebhookInvoiceEvent' - type: object properties: manuallyMarked: description: Whether the invoice have been manually marked as confirmed type: boolean nullable: false - type: object properties: overPaid: description: Whether this invoice has received more money than expected type: boolean nullable: false WebhookInvoiceInvalidEvent: description: Callback sent if the `type` is `InvoiceInvalid` allOf: - $ref: '#/components/schemas/WebhookInvoiceEvent' - type: object properties: manuallyMarked: description: >- Whether the invoice have been manually marked as confirmed. If false, this invoice has received payments which could not confirm in time. type: boolean nullable: false WebhookInvoiceProcessingEvent: description: Callback sent if the `type` is `InvoiceProcessing` allOf: - $ref: '#/components/schemas/WebhookInvoiceEvent' - type: object properties: overPaid: description: Whether this invoice has received more money than expected type: boolean nullable: false WebhookInvoiceReceivedPaymentEvent: description: Callback sent if the `type` is `InvoiceReceivedPayment` allOf: - $ref: '#/components/schemas/WebhookInvoiceEvent' - type: object properties: afterExpiration: description: >- Whether this payment has been sent after expiration of the invoice type: boolean nullable: false paymentMethod: $ref: '#/components/schemas/PaymentMethodId' payment: $ref: '#/components/schemas/Payment' x-konfig-properties: paymentMethod: description: What payment method was used for this payment nullable: false payment: description: Details about the payment WebhookInvoiceExpiredEvent: description: Callback sent if the `type` is `InvoiceExpired` allOf: - $ref: '#/components/schemas/WebhookInvoiceEvent' - type: object properties: partiallyPaid: description: Whether the invoice received some payments before being expired. type: boolean nullable: false ApiKeysCreateApiKeyRequest: type: object properties: label: description: The label of the new API Key type: string nullable: true permissions: description: The permissions granted to this API Key (See API Key Authentication) type: array nullable: true items: type: string ApiKeysCreateUserApiKeyRequest: type: object properties: label: description: The label of the new API Key type: string nullable: true permissions: description: The permissions granted to this API Key (See API Key Authentication) type: array nullable: true items: type: string InvoicesRefundRequest: type: object properties: description: description: Description of the pull payment type: string name: description: >- Name of the pull payment (Default: 'Refund' followed by the invoice id) type: string nullable: true paymentMethod: $ref: '#/components/schemas/PaymentMethodId' refundVariant: description: "* `RateThen`: Refund the crypto currency price, at the rate the invoice got paid.\r\n* `CurrentRate`: Refund the crypto currency price, at the current rate.\r\n*`Fiat`: Refund the invoice currency, at the rate when the refund will be sent.\r\n*`OverpaidAmount`: Refund the crypto currency amount that was overpaid.\r\n*`Custom`: Specify the amount, currency, and rate of the refund. (see `customAmount` and `customCurrency`)" type: string x-enumNames: - CurrentRate - Custom - Fiat - RateThen enum: - CurrentRate - Custom - Fiat - OverpaidAmount - RateThen subtractPercentage: description: >- Optional percentage by which to reduce the refund, e.g. as processing charge or to compensate for the mining fee. type: string format: decimal example: '2.1' customAmount: description: The amount to refund if the `refundVariant` is `Custom`. type: string format: decimal example: '5.00' customCurrency: description: The currency to refund if the `refundVariant` is `Custom` type: string example: USD x-konfig-properties: paymentMethod: description: The payment method to use for the refund PaymentRequestsPayRequest: type: object properties: amount: description: >- The amount of the invoice. If `null` or `unspecified`, it will be set to the payment request's due amount. Note that the payment's request `allowCustomPaymentAmounts` must be `true`, or a 422 error will be sent back.' type: string format: decimal minimum: 0 exclusiveMinimum: true nullable: true example: '0.1' allowPendingInvoiceReuse: description: >- If `true`, this endpoint will not necessarily create a new invoice, and instead attempt to give back a pending one for this payment request. type: boolean nullable: true default: false PullPaymentsLinkBoltcardRequest: required: - UID type: object properties: UID: description: The `UID` of the NTag424 type: string example: 46ab87ff36a3b7 nullable: false onExisting: description: |- What to do if the boltcard is already linked. * `KeepVersion` will return the keys (K0-K4) that are already registered. * `UpdateVersion` will increment the version of the key, and thus return different keys (K0-K4). (See [Deterministic Boltcard Key Generation](https://github.com/boltcard/boltcard/blob/main/docs/DETERMINISTIC.md)) type: string x-enumNames: - KeepVersion - UpdateVersion enum: - KeepVersion - UpdateVersion default: UpdateVersion PullPaymentsCreatePullPaymentRequest: type: object properties: description: description: The description of the pull payment type: string nullable: true name: description: The name of the pull payment type: string nullable: true amount: description: The amount in `currency` of this pull payment as a decimal string type: string format: decimal example: '0.1' currency: description: The currency of the amount. type: string example: BTC period: description: The length of each period in seconds. type: integer format: decimal example: 604800 nullable: true BOLT11Expiration: description: >- If lightning is activated, do not accept BOLT11 invoices with expiration less than … days type: string example: 30 default: 30 nullable: true autoApproveClaims: description: >- Any payouts created for this pull payment will skip the approval phase upon creation type: boolean example: false default: false nullable: true startsAt: description: >- When this pull payment is effective. Already started if null or unspecified. type: integer format: unix timestamp in seconds example: 1592312018 nullable: true expiresAt: description: >- When this pull payment expires. Never expires if null or unspecified. type: integer format: unix timestamp in seconds example: 1593129600 nullable: true paymentMethods: description: >- The list of supported payment methods supported by this pull payment. Available options can be queried from the `StorePaymentMethods_GetStorePaymentMethods` endpoint type: array items: type: string example: BTC PullPaymentsApprovePayoutRequest: type: object properties: revision: description: The revision number of the payout being modified type: integer rateRule: description: >- The rate rule to calculate the rate of the payout. This can also be a fixed decimal. (if null or unspecified, will use the same rate setting as the store's settings) type: string nullable: true example: kraken(BTC_USD) PullPaymentsMarkPayoutRequest: type: object properties: state: $ref: '#/components/schemas/PayoutState' paymentProof: $ref: '#/components/schemas/PayoutPaymentProof' StoreOnChainPaymentMethodsPostOnChainPaymentMethodPreviewRequest: type: object properties: derivationScheme: description: The derivation scheme type: string example: xpub... UsersCreateUserRequest: type: object properties: email: description: The email of the new user type: string nullable: false password: description: >- The password of the new user (if no password is set, an email will be sent to the user requiring him to set the password) type: string nullable: true isAdministrator: description: >- Make this user administrator (only if you have the `unrestricted` permission of a server administrator) type: boolean nullable: true default: false AppsGetAllAppsForStoreResponse: type: array items: $ref: '#/components/schemas/BasicAppData' AppsGetAllAppsResponse: type: array items: $ref: '#/components/schemas/BasicAppData' CustodiansGetSupportedCustodiansResponse: type: array items: $ref: '#/components/schemas/CustodianData' CustodiansGetStoreCustodianAccountsResponse: type: array items: $ref: '#/components/schemas/CustodianAccountData' CustodiansGetStoreCustodianAccountDepositAddressResponse: description: A bitcoin address belonging to the custodian type: object properties: depositAddress: description: The address to deposit your funds. type: string CustodiansSimulateWithdrawFromStoreCustodianAccountResponse: oneOf: - description: If you are authenticated but forbidden to create withdrawals type: string - description: Withdrawing to the address provided is not allowed type: string CustodiansWithdrawFromStoreCustodianAccountResponse: oneOf: - description: If you are authenticated but forbidden to withdraw type: string - description: Withdrawing to the address provided is not allowed type: string CustodiansGetStoreCustodianAccountWithdrawalInfoResponse: oneOf: - description: If you are authenticated but forbidden to create trades type: string - description: Withdrawing to the address provided is not allowed type: string InvoicesGetInvoicePaymentMethodsResponse: type: array nullable: false items: $ref: '#/components/schemas/InvoicePaymentMethodDataModel' InternalLightningNodeApiGetChannelsResponse: type: array items: $ref: '#/components/schemas/LightningChannelData' InternalLightningNodeApiGetDepositAddressResponse: description: A bitcoin address belonging to the lightning node type: string InternalLightningNodeApiGetInvoicesResponse: type: array items: $ref: '#/components/schemas/LightningInvoiceData' InternalLightningNodeApiGetPaymentsResponse: type: array items: $ref: '#/components/schemas/LightningPaymentData' StoreLightningNodeApiGetChannelsResponse: type: array items: $ref: '#/components/schemas/LightningChannelData' StoreLightningNodeApiGetDepositAddressResponse: type: string StoreLightningNodeApiGetInvoicesResponse: type: array items: $ref: '#/components/schemas/LightningInvoiceData' StoreLightningNodeApiGetPaymentsResponse: type: array items: $ref: '#/components/schemas/LightningPaymentData' MiscelleneousListRateSourcesResponse: type: array items: type: object properties: id: description: The id of the rate provider type: string name: description: The name of the rate provider type: string MiscelleneousListPermissionsMetadataResponse: type: array items: type: object properties: name: description: The permission id type: string nullable: false included: description: >- Permissions included in this array are also granted by this permission type: array nullable: false items: type: string MiscelleneousGetSupportedLangCodesResponse: type: array items: type: object properties: code: description: The language code type: string nullable: false currentLanguage: description: The language name type: string nullable: false StorePayoutProcessorsGetStorePayoutProcessorsResponse: type: array items: $ref: '#/components/schemas/PayoutProcessorData' PayoutProcessorsGetPayoutProcessorsResponse: type: array items: $ref: '#/components/schemas/PayoutProcessorData' GreenfieldStoreAutomatedOnChainPayoutProcessorsControllerGetStoreOnChainAutomatedPayoutProcessorsForPaymentMethodResponse: type: array items: $ref: '#/components/schemas/OnChainAutomatedTransferSettings' GreenfieldStoreAutomatedLightningPayoutProcessorsControllerGetStoreLightningAutomatedPayoutProcessorsForPaymentMethodResponse: type: array items: $ref: '#/components/schemas/LightningAutomatedTransferSettings' GreenfieldStoreAutomatedOnChainPayoutProcessorsControllerGetStoreOnChainAutomatedTransferSenderFactoryResponse: type: array items: $ref: '#/components/schemas/OnChainAutomatedTransferSettings' GreenfieldStoreAutomatedLightningPayoutProcessorsControllerGetStoreLightningAutomatedPayoutSenderFactoryResponse: type: array items: $ref: '#/components/schemas/LightningAutomatedTransferSettings' PullPaymentsLinkBoltcardResponse: type: object properties: version: description: >- The version of the registration (See [Deterministic Boltcard Key Generation](https://github.com/boltcard/boltcard/blob/main/docs/DETERMINISTIC.md)) type: number LNURLW: description: The lnurl withdraw of the server type: string example: lnurlw://example.com/boltcard K0: description: The public key K0 of the boltcard type: string example: 02a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b K1: description: The public key K1 of the boltcard type: string example: 02a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b K2: description: The public key K2 of the boltcard type: string example: 02a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b K3: description: The public key K3 of the boltcard type: string example: 02a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b K4: description: The public key K4 of the boltcard type: string example: 02a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b StoreLightningAddressesGetStoreLightningAddressesResponse: type: array items: $ref: '#/components/schemas/LightningAddressData' StorePaymentMethodsGetStorePaymentMethodsResponse: type: array items: $ref: '#/components/schemas/GenericPaymentMethodData' StoresPreviewStoreRateConfigurationResponse: type: array items: $ref: '#/components/schemas/StoreRateResult' StoresGetStoreRatesResponse: type: array items: $ref: '#/components/schemas/StoreRateResult' StoreOnChainWalletsShowOnChainWalletTransactionsResponse: type: array items: $ref: '#/components/schemas/OnChainWalletTransactionData' StoreOnChainWalletsCreateOnChainTransactionResponse: oneOf: - $ref: '#/components/schemas/OnChainWalletTransactionData' - description: The unbroadcasted transaction in hex format type: string StoreOnChainWalletsGetOnChainWalletUtxOsResponse: type: array items: $ref: '#/components/schemas/OnChainWalletUTXOData' StoreOnChainWalletsGetOnChainWalletObjectsResponse: type: array items: $ref: '#/components/schemas/OnChainWalletObjectId' WebhooksGetWebhookDeliveryRequestsResponse: type: object additionalProperties: true WebhooksRedeliverWebhookDeliveryResponse: type: string securitySchemes: API_Key: description: > BTCPay Server supports authenticating and authorizing users through an API Key that is generated by them. Send the API Key as a header value to Authorization with the format: `token {token}`. For a smoother experience, you can generate a url that redirects users to an API key creation screen. The following permissions are available to the context of the user creating the API Key: * `unrestricted`: Unrestricted access * `btcpay.user.candeleteuser`: Delete user * `btcpay.user.canviewprofile`: View your profile * `btcpay.user.canmodifyprofile`: Manage your profile * `btcpay.user.canmanagenotificationsforuser`: Manage your notifications * `btcpay.user.canviewnotificationsforuser`: View your notifications The following permissions are available if the user is an administrator: * `btcpay.server.canviewusers`: View users * `btcpay.server.cancreateuser`: Create new users * `btcpay.server.canmanageusers`: Manage users * `btcpay.server.canmodifyserversettings`: Manage your server * `btcpay.server.canuseinternallightningnode`: Use the internal lightning node * `btcpay.server.canviewlightninginvoiceinternalnode`: View invoices from internal lightning node * `btcpay.server.cancreatelightninginvoiceinternalnode`: Create invoices with internal lightning node The following permissions applies to all stores of the user, you can limit to a specific store with the following format: `btcpay.store.cancreateinvoice:6HSHAEU4iYWtjxtyRs9KyPjM9GAQp8kw2T9VWbGG1FnZ`: * `btcpay.store.canmodifystoresettings`: Modify your stores * `btcpay.store.canviewcustodianaccounts`: View exchange accounts linked to your stores * `btcpay.store.canmanagecustodianaccounts`: Manage exchange accounts linked to your stores * `btcpay.store.candeposittocustodianaccount`: Deposit funds to exchange accounts linked to your stores * `btcpay.store.canwithdrawfromcustodianaccount`: Withdraw funds from exchange accounts to your store * `btcpay.store.cantradecustodianaccount`: Trade funds on your store's exchange accounts * `btcpay.store.webhooks.canmodifywebhooks`: Modify stores webhooks * `btcpay.store.canviewstoresettings`: View your stores * `btcpay.store.canviewreports`: View your reports * `btcpay.store.cancreateinvoice`: Create an invoice * `btcpay.store.canviewinvoices`: View invoices * `btcpay.store.canmodifyinvoices`: Modify invoices * `btcpay.store.canmodifypaymentrequests`: Modify your payment requests * `btcpay.store.canviewpaymentrequests`: View your payment requests * `btcpay.store.canviewpullpayments`: View your pull payments * `btcpay.store.canmanagepullpayments`: Manage your pull payments * `btcpay.store.canarchivepullpayments`: Archive your pull payments * `btcpay.store.cancreatepullpayments`: Create pull payments * `btcpay.store.canmanagepayouts`: Manage payouts * `btcpay.store.canviewpayouts`: View payouts * `btcpay.store.cancreatenonapprovedpullpayments`: Create non-approved pull payments * `btcpay.store.canuselightningnode`: Use the lightning nodes associated with your stores * `btcpay.store.canviewlightninginvoice`: View the lightning invoices associated with your stores * `btcpay.store.cancreatelightninginvoice`: Create invoices from the lightning nodes associated with your stores Note that API Keys only limits permission of a user and can never expand it. If an API Key has the permission `btcpay.server.canmodifyserversettings` but that the user account creating this API Key is not administrator, the API Key will not be able to modify the server settings. Some permissions may include other permissions, see [this operation](https://docs.btcpayserver.org). type: apiKey name: Authorization in: header Basic: description: >- BTCPay Server supports authenticating and authorizing users through the Basic HTTP authentication scheme. Send the user and password encoded in base64 with the format `Basic {base64(username:password)}`. Using this authentication method implicitly provides you with the `unrestricted` permission type: http scheme: Basic security: - API_Key: [] Basic: [] externalDocs: description: BTCPay Greenfield Plugins API url: https://docs.btcpayserver.org/API/Greenfield/Plugins/ x-webhooks: InvoiceCreated: post: tags: - Webhooks summary: InvoiceCreated operationId: Webhook_InvoiceCreated description: A new invoice has been created parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoiceExpired: post: tags: - Webhooks summary: InvoiceExpired operationId: Webhook_InvoiceExpired description: An invoice expired parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceExpiredEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoiceReceivedPayment: post: tags: - Webhooks summary: InvoiceReceivedPayment operationId: Webhook_InvoiceReceivedPayment description: An invoice received a payment parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceReceivedPaymentEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoicePaymentSettled: post: tags: - Webhooks summary: InvoicePaymentSettled operationId: Webhook_InvoicePaymentSettled description: An payment relating to an invoice has settled parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceReceivedPaymentEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoiceProcessing: post: tags: - Webhooks summary: InvoiceProcessing operationId: Webhook_InvoiceProcessing description: >- Triggers when an invoice is fully paid, but doesn't have the required amount of confirmations on the blockchain yet according to your store's settings. parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceProcessingEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoiceInvalid: post: tags: - Webhooks summary: InvoiceInvalid operationId: Webhook_InvoiceInvalid description: An invoice became invalid parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceInvalidEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' InvoiceSettled: post: tags: - Webhooks summary: InvoiceSettled operationId: Webhook_InvoiceSettled description: >- Triggers when an invoice is considered settled and the merchant can proceed with the order's delivery. The invoice now has enough confirmations on the blockchain (if paid on-chain) according to your store's configuration. parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookInvoiceSettledEvent' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PaymentRequestCreated: post: tags: - Webhooks summary: PaymentRequestCreated operationId: Webhook_PaymentRequestCreated description: A new payment request has been created parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: paymentRequestId: description: The id of the payment request type: string nullable: false status: description: The status of the payment request type: string enum: - Completed - Expired - Pending nullable: false responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PaymentRequestUpdated: post: tags: - Webhooks summary: PaymentRequestUpdated operationId: Webhook_PaymentRequestUpdated description: A payment request has been updated parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: paymentRequestId: description: The id of the payment request type: string nullable: false status: description: The status of the payment request type: string enum: - Completed - Expired - Pending nullable: false responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PaymentRequestArchived: post: tags: - Webhooks summary: PaymentRequestArchived operationId: Webhook_PaymentRequestArchved description: A payment request has been archived parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: paymentRequestId: description: The id of the payment request type: string nullable: false status: description: The status of the payment request type: string enum: - Completed - Expired - Pending nullable: false responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PaymentRequestStatusChanged: post: tags: - Webhooks summary: PaymentRequestStatusChanged operationId: Webhook_PaymentRequestStatusChanged description: A payment request has had its status changed parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: paymentRequestId: description: The id of the payment request type: string nullable: false status: description: The status of the payment request type: string enum: - Completed - Expired - Pending nullable: false responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PayoutCreated: post: tags: - Webhooks summary: PayoutCreated operationId: Webhook_PayoutCreated description: A payout has been created parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: payoutId: description: The id of the payout type: string nullable: false pullPaymentId: description: The id of the pull payment this payout belongs to type: string nullable: true payoutState: $ref: '#/components/schemas/PayoutState' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PayoutApproved: post: tags: - Webhooks summary: PayoutApproved operationId: Webhook_PayoutApproved description: A payout has been approved parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: payoutId: description: The id of the payout type: string nullable: false pullPaymentId: description: The id of the pull payment this payout belongs to type: string nullable: true payoutState: $ref: '#/components/schemas/PayoutState' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' PayoutUpdated: post: tags: - Webhooks summary: PayoutUpdated operationId: Webhook_PayoutUpdated description: A payout has been updated parameters: - description: >- The HMAC of the body's byte with the secret's of the webhook. `sha256=HMAC256(UTF8(webhook's secret), body)` in: header name: BTCPay-Sig required: true schema: type: string example: >- sha256=b438519edde5c8144a4f9bcec51a9d346eca6506887c2ceeae1c0092884a97b9 requestBody: content: application/json: schema: type: object properties: payoutId: description: The id of the payout type: string nullable: false pullPaymentId: description: The id of the pull payment this payout belongs to type: string nullable: true payoutState: $ref: '#/components/schemas/PayoutState' responses: default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetails'