Skip to content

Instantly share code, notes, and snippets.

@Kukks
Last active July 28, 2020 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kukks/be7b6597acec868be3943ce68611d4bb to your computer and use it in GitHub Desktop.
Save Kukks/be7b6597acec868be3943ce68611d4bb to your computer and use it in GitHub Desktop.
{"paths":{"/api/v1/api-keys/{apikey}":{"delete":{"tags":["API Keys"],"summary":"Revoke an API Key","description":"Revoke the current API key so that it cannot be used anymore","parameters":[{"name":"apikey","in":"path","required":true,"description":"The API Key to revoke","schema":{"type":"string"}}],"responses":{"200":{"description":"The key has been deleted"},"404":{"description":"The key is not found for this user"}},"security":[{"API Key":["unrestricted"],"Basic":[]}]}},"/api/v1/api-keys/current":{"get":{"tags":["API Keys"],"summary":"Get the current API Key information","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"}}}}},"security":[{"API Key":[]}]},"delete":{"tags":["API Keys"],"summary":"Revoke the current 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"}}}}},"security":[{"API Key":[]}]}},"/api/v1/api-keys":{"post":{"tags":["API Keys"],"summary":"Create a new API Key","description":"Create a new API Key","responses":{"200":{"description":"Information about the new api key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyData"}}}}},"requestBody":{"x-name":"request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","description":"The label of the new API Key","nullable":true},"permissions":{"type":"array","description":"The permissions granted to this API Key (See API Key Authentication)","nullable":true,"items":{"type":"string"}}}}}}},"security":[{"API Key":["unrestricted"],"Basic":[]}]}},"/api-keys/authorize":{"get":{"tags":["Authorization"],"summary":"Authorize User","description":"Redirect the browser to this endpoint to request the user to generate an api-key with specific permissions","parameters":[{"name":"permissions","description":"The permissions to request. (See API Key authentication)","in":"query","style":"form","explode":true,"schema":{"type":"array","nullable":true,"items":{"type":"string"}},"x-position":1},{"name":"applicationName","description":"The name of your application","in":"query","schema":{"type":"string","nullable":true},"x-position":2},{"name":"strict","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.","in":"query","schema":{"type":"boolean","default":true,"nullable":true},"x-position":3},{"name":"selectiveStores","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.","in":"query","schema":{"type":"boolean","default":false,"nullable":true},"x-position":4}],"responses":{"200":{"description":"A HTML form that a user can use to confirm permissions to grant","content":{"text/html":{}}}},"security":[]}},"/api/v1/health":{"get":{"tags":["Health"],"summary":"Get health status","description":"Check the instance health status","operationId":"Health_GetHealth","responses":{"200":{"description":"Instance is up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationHealthData"}}}}},"security":[]}},"/api/v1/stores/{storeId}/invoices":{"get":{"tags":["Invoices"],"summary":"Get invoices","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}}],"description":"View information about the existing invoices","operationId":"Invoices_GetInvoices","responses":{"200":{"description":"list of invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDataList"}}}}},"security":[{"API Key":["btcpay.store.canviewinvoices"],"Basic":[]}]},"post":{"tags":["Invoices"],"summary":"Create a new invoice","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}}],"description":"Create a new invoice","operationId":"Invoices_CreateInvoice","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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceRequest"}}}},"security":[{"API Key":["btcpay.store.cancreateinvoice"],"Basic":[]}]}},"/api/v1/stores/{storeId}/invoices/{invoiceId}":{"get":{"tags":["Invoices"],"summary":"Get invoice","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to fetch","schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"description":"The invoice to fetch","schema":{"type":"string"}}],"description":"View information about the specified invoice","operationId":"Invoices_GetInvoice","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 invoie"},"404":{"description":"The key is not found for this invoice"}},"security":[{"API Key":["btcpay.store.canviewinvoices"],"Basic":[]}]},"delete":{"tags":["Invoices"],"summary":"Archive invoice","description":"Archives the specified invoice.","operationId":"Invoices_ArchiveInvoice","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store the invoice belongs to","schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"description":"The invoice to remove","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"}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]}},"/api/v1/stores/{storeId}/invoices/{invoiceId}/email":{"post":{"tags":["Invoices"],"summary":"Add customer email to invoice","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"description":"The invoice to update","schema":{"type":"string"}}],"description":"Adds the customer's email to the invoice if it has not been set already.","operationId":"Invoices_AddCustomerEmail","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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCustomerEmailRequest"}}}},"security":[{"API Key":["btcpay.store.cancreateinvoice"],"Basic":[]}]}},"/api/v1/stores/{storeId}/invoices/{invoiceId}/status":{"post":{"tags":["Invoices"],"summary":"Mark invoice status","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"description":"The invoice to update","schema":{"type":"string"}}],"description":"Mark an invoice as invalid or completed.","operationId":"Invoices_MarkInvoiceStatus","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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkInvoiceStatusRequest"}}}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]}},"/api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive":{"post":{"tags":["Invoices"],"summary":"Unarchive invoice","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"description":"The invoice to update","schema":{"type":"string"}}],"description":"Unarchive an invoice","operationId":"Invoices_UnarchiveInvoice","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"}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/info":{"get":{"tags":["Lightning (Internal Node)"],"summary":"Get node information","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"View information about the lightning node","operationId":"InternalLightningNodeApi_GetInfo","responses":{"200":{"description":"Lightning node information such as reachable nodeinfos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningNodeInformationData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/connect":{"post":{"tags":["Lightning (Internal Node)"],"summary":"Connect to lightning node","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"Connect to another lightning node.","operationId":"InternalLightningNodeApi_ConnectToNode","responses":{"200":{"description":"Successfully connected"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"400":{"description":"Wellknown error codes are: `could-not-connect`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectToNodeRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/channels":{"get":{"tags":["Lightning (Internal Node)"],"summary":"Get channels","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"View information about the current channels of the lightning node","operationId":"InternalLightningNodeApi_GetChannels","responses":{"200":{"description":"list of channels","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LightningChannelData"}}}}},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]},"post":{"tags":["Lightning (Internal Node)"],"summary":"Open channel","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"Open a channel with another lightning node. You should connect to that node first.","operationId":"InternalLightningNodeApi_OpenChannel","responses":{"200":{"description":"Successfully opened"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenLightningChannelRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/address":{"post":{"tags":["Lightning (Internal Node)"],"summary":"Get deposit address","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"Get an on-chain deposit address for the lightning node ","operationId":"InternalLightningNodeApi_GetDepositAddress","responses":{"200":{"description":"deposit address","content":{"application/json":{"schema":{"type":"string","description":"A bitcoin address belonging to the lightning node"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/invoices/{id}":{"get":{"tags":["Lightning (Internal Node)"],"summary":"Get invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The id of the lightning invoice.","schema":{"type":"string"}}],"description":"View information about the requested lightning invoice","operationId":"InternalLightningNodeApi_GetInvoice","responses":{"200":{"description":"Lightning invoice data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningInvoiceData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration or the specified invoice was not found "}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/invoices/pay":{"post":{"tags":["Lightning (Internal Node)"],"summary":"Pay Lightning Invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"Pay a lightning invoice.","operationId":"InternalLightningNodeApi_PayInvoice","responses":{"200":{"description":"Successfully paid"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"400":{"description":"Wellknown error codes are: `could-not-find-route`, `generic-error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLightningInvoiceRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/server/lightning/{cryptoCode}/invoices":{"post":{"tags":["Lightning (Internal Node)"],"summary":"Create lightning invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}}],"description":"Create a lightning invoice.","operationId":"InternalLightningNodeApi_CreateInvoice","responses":{"200":{"description":"Successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningInvoiceData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLightningInvoiceRequest"}}}},"security":[{"API Key":["btcpay.server.cancreatelightninginvoiceinternalnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/info":{"get":{"tags":["Lightning (Store)"],"summary":"Get node information","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"View information about the lightning node","operationId":"StoreLightningNodeApi_GetInfo","responses":{"200":{"description":"Lightning node information such as reachable nodeinfos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningNodeInformationData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/connect":{"post":{"tags":["Lightning (Store)"],"summary":"Connect to lightning node","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"Connect to another lightning node.","operationId":"StoreLightningNodeApi_ConnectToNode","responses":{"200":{"description":"Successfully connected"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"400":{"description":"Wellknown error codes are: `could-not-connect`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectToNodeRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/channels":{"get":{"tags":["Lightning (Store)"],"summary":"Get channels","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"View information about the current channels of the lightning node","operationId":"StoreLightningNodeApi_GetChannels","responses":{"200":{"description":"list of channels","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LightningChannelData"}}}}},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]},"post":{"tags":["Lightning (Store)"],"summary":"Open channel","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"Open a channel with another lightning node. You should connect to that node first.","operationId":"StoreLightningNodeApi_OpenChannel","responses":{"200":{"description":"Successfully opened"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"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"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenLightningChannelRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/address":{"post":{"tags":["Lightning (Store)"],"summary":"Get deposit address","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string","description":"A bitcoin address belonging to the lightning node"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"Get an on-chain deposit address for the lightning node ","operationId":"StoreLightningNodeApi_GetDepositAddress","responses":{"200":{"description":"deposit address","content":{"application/json":{"schema":{"type":"string"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{id}":{"get":{"tags":["Lightning (Store)"],"summary":"Get invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The id of the lightning invoice.","schema":{"type":"string"}}],"description":"View information about the requested lightning invoice","operationId":"StoreLightningNodeApi_GetInvoice","responses":{"200":{"description":"Lightning invoice data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningInvoiceData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration or the specified invoice was not found "}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay":{"post":{"tags":["Lightning (Store)"],"summary":"Pay Lightning Invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"Pay a lightning invoice.","operationId":"StoreLightningNodeApi_PayInvoice","responses":{"200":{"description":"Successfully paid"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"400":{"description":"Wellknown error codes are: `could-not-find-route`, `generic-error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLightningInvoiceRequest"}}}},"security":[{"API Key":["btcpay.server.canuseinternallightningnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices":{"post":{"tags":["Lightning (Store)"],"summary":"Create lightning invoice","parameters":[{"name":"cryptoCode","in":"path","required":true,"description":"The cryptoCode of the lightning-node to query","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"The store id with the lightning-node configuration to query","schema":{"type":"string"}}],"description":"Create a lightning invoice.","operationId":"StoreLightningNodeApi_CreateInvoice","responses":{"200":{"description":"Successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningInvoiceData"}}}},"503":{"description":"Unable to access the lightning node"},"404":{"description":"The lightning node configuration was not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLightningInvoiceRequest"}}}},"security":[{"API Key":["btcpay.server.cancreatelightninginvoiceinternalnode"],"Basic":[]}]}},"/api/v1/stores/{storeId}/payment-requests":{"get":{"tags":["Payment Requests"],"summary":"Get payment requests","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}}],"description":"View information about the existing payment requests","operationId":"PaymentRequests_GetPaymentRequests","responses":{"200":{"description":"list of payment requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestDataList"}}}}},"security":[{"API Key":["btcpay.store.canviewpaymentrequests"],"Basic":[]}]},"post":{"tags":["Payment Requests"],"summary":"Create a new payment request","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}}],"description":"Create a new payment request","operationId":"PaymentRequests_CreatePaymentRequest","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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestBaseData"}}}},"security":[{"API Key":["btcpay.store.canmodifypaymentrequests"],"Basic":[]}]}},"/api/v1/stores/{storeId}/payment-requests/{paymentRequestId}":{"get":{"tags":["Payment Requests"],"summary":"Get payment request","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to fetch","schema":{"type":"string"}},{"name":"paymentRequestId","in":"path","required":true,"description":"The payment request to fetch","schema":{"type":"string"}}],"description":"View information about the specified payment request","operationId":"PaymentRequests_GetPaymentRequest","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"}},"security":[{"API Key":["btcpay.store.canviewpaymentrequests"],"Basic":[]}]},"delete":{"tags":["Payment Requests"],"summary":"Archive payment request","description":"Archives the specified payment request.","operationId":"PaymentRequests_ArchivePaymentRequest","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store the payment request belongs to","schema":{"type":"string"}},{"name":"paymentRequestId","in":"path","required":true,"description":"The payment request to remove","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"}},"security":[{"API Key":["btcpay.store.canmodifypaymentrequests"],"Basic":[]}]},"put":{"tags":["Payment Requests"],"summary":"Update payment request","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to query","schema":{"type":"string"}},{"name":"paymentRequestId","in":"path","required":true,"description":"The payment request to update","schema":{"type":"string"}}],"description":"Update a payment request","operationId":"PaymentRequests_UpdatePaymentRequest","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"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestBaseData"}}}},"security":[{"API Key":["btcpay.store.canmodifypaymentrequests"],"Basic":[]}]}},"/api/v1/stores/{storeId}/pull-payments":{"parameters":[{"name":"storeId","in":"path","required":true,"description":"The store ID","schema":{"type":"string"}}],"get":{"summary":"Get store's pull payments","parameters":[{"name":"includeArchived","in":"query","required":false,"description":"Whether this should list archived pull payments","schema":{"type":"boolean","default":false}}],"description":"Get the pull payments of a store","responses":{"200":{"description":"List of pull payments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullPaymentDataList"}}}}},"tags":["Pull payments (Management)"],"security":[{"API Key":["btcpay.store.canmanagepullpayments"],"Basic":[]}]},"post":{"summary":"Create a new pull payment","description":"A pull payment allows its receiver to ask for payouts up to `amount` of `currency` every `period`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the pull payment","nullable":true},"amount":{"type":"string","format":"decimal","example":"0.1","description":"The amount in `currency` of this pull payment as a decimal string"},"currency":{"type":"string","example":"BTC","description":"The currency of the amount. In this current release, this parameter must be set to a cryptoCode like (`BTC`)."},"period":{"type":"integer","format":"decimal","example":604800,"nullable":true,"description":"The length of each period in seconds."},"startsAt":{"type":"integer","example":1592312018,"nullable":true,"description":"The unix timestamp when this pull payment is effective. Starts now if null or unspecified."},"expiresAt":{"type":"integer","example":1593129600,"nullable":true,"description":"The unix timestamp when this pull payment is expired. Never expires if null or unspecified."},"paymentMethods":{"type":"array","description":"The list of supported payment methods supported. In this current release, this must be set to an array with a single entry equals to `currency` (eg. `[ \"BTC\" ]`)","items":{"type":"string","example":"BTC"}}}}}}},"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"}}}}},"tags":["Pull payments (Management)"],"security":[{"API Key":["btcpay.store.canmanagepullpayments"],"Basic":[]}]}},"/api/v1/pull-payments/{pullPaymentId}":{"parameters":[{"name":"pullPaymentId","in":"path","required":true,"description":"The ID of the pull payment","schema":{"type":"string"}}],"get":{"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"}},"tags":["Pull payments (Public)"],"security":[]}},"/api/v1/stores/{storeId}/pull-payments/{pullPaymentId}":{"parameters":[{"name":"storeId","in":"path","required":true,"description":"The ID of the store","schema":{"type":"string"}},{"name":"pullPaymentId","in":"path","required":true,"description":"The ID of the pull payment","schema":{"type":"string"}}],"delete":{"summary":"Archive a pull payment","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"}},"tags":["Pull payments (Management)"],"security":[{"API Key":["btcpay.store.canmanagepullpayments"],"Basic":[]}]}},"/api/v1/pull-payments/{pullPaymentId}/payouts":{"parameters":[{"name":"pullPaymentId","in":"path","required":true,"description":"The ID of the pull payment","schema":{"type":"string"}}],"get":{"description":"Get payouts","parameters":[{"name":"includeCancelled","in":"query","required":false,"description":"Whether this should list cancelled payouts","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"}},"tags":["Pull payments (Public)"],"security":[]},"post":{"description":"Create a new payout","responses":{"200":{"description":"A new payout has been created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutData"}}}},"404":{"description":"Pull payment not found"},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"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"}}}}},"tags":["Pull payments (Public)"],"security":[]}},"/api/v1/stores/{storeId}/payouts/{payoutId}":{"parameters":[{"name":"storeId","in":"path","required":true,"description":"The ID of the store","schema":{"type":"string"}},{"name":"payoutId","in":"path","required":true,"description":"The ID of the payout","schema":{"type":"string"}}],"post":{"description":"Approve a payout","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","description":"The revision number of the payout being modified"},"rateRule":{"type":"string","nullable":true,"example":"kraken(BTC_USD)","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)"}}}}}},"responses":{"200":{"description":"The payout has been approved, transitioning to `AwaitingPayment` state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutData"}}}},"422":{"description":"Unable to validate the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"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"}},"tags":["Pull payments (Management)"],"security":[{"API Key":["btcpay.store.canmanagepullpayments"],"Basic":[]}]},"delete":{"description":"Cancel the payout","responses":{"200":{"description":"The payout has been cancelled"},"404":{"description":"The payout is not found"}},"tags":["Pull payments (Management)"],"security":[{"API Key":["btcpay.store.canmanagepullpayments"],"Basic":[]}]}},"/api/v1/server/info":{"get":{"tags":["ServerInfo"],"summary":"Get server info","description":"Information about the server, chains and sync states","operationId":"ServerInfo_GetServerInfo","responses":{"200":{"description":"Server information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationServerInfoData"}}}}},"security":[{"API Key":[],"Basic":[]}]}},"/api/v1/stores":{"get":{"tags":["Stores"],"summary":"Get stores","description":"View information about the available stores","operationId":"Stores_GetStores","responses":{"200":{"description":"list of stores","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreDataList"}}}}},"security":[{"API Key":["btcpay.store.canviewstoresettings"],"Basic":[]}]},"post":{"tags":["Stores"],"summary":"Create a new store","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"}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]}},"/api/v1/stores/{storeId}":{"get":{"tags":["Stores"],"summary":"Get store","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to fetch","schema":{"type":"string"}}],"description":"View information about the specified store","operationId":"Stores_GetStore","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"}},"security":[{"API Key":["btcpay.store.canviewstoresettings"],"Basic":[]}]},"put":{"tags":["Stores"],"summary":"Update store","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to update","schema":{"type":"string"}}],"description":"Update the specified store","requestBody":{"x-name":"request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreData"}}},"required":true,"x-position":1},"operationId":"Stores_UpdateStore","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"}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]},"delete":{"tags":["Stores"],"summary":"Remove Store","description":"Removes the specified store. If there is another user with access, only your access will be removed.","parameters":[{"name":"storeId","in":"path","required":true,"description":"The store to remove","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"}},"security":[{"API Key":["btcpay.store.canmodifystoresettings"],"Basic":[]}]}},"/api/v1/users/me":{"get":{"tags":["Users"],"summary":"Get current user information","description":"View information about the current user","operationId":"Users_GetCurrentUser","responses":{"200":{"description":"Information about the current user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationUserData"}}}}},"security":[{"API Key":["btcpay.user.canviewprofile"],"Basic":[]}]}},"/api/v1/users":{"post":{"tags":["Users"],"summary":"Create user","description":"Create a new user.\n\nThis operation can be called without authentication in any of this cases:\n* There is not any administrator yet on the server,\n* The subscriptions are not disabled in the server's policies.\n\nIf the first administrator is created by this call, subscriptions are automatically disabled.","requestBody":{"x-name":"request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","description":"The email of the new user","nullable":false},"password":{"type":"string","description":"The password of the new user"},"isAdministrator":{"type":"boolean","description":"Make this user administrator (only if you have the `unrestricted` permission of a server administrator)","nullable":true,"default":false}}}}},"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)"}},"security":[{"API Key":["btcpay.server.cancreateuser"],"Basic":[]}]}}},"components":{"schemas":{"ApiKeyData":{"type":"object","additionalProperties":false,"properties":{"apiKey":{"type":"string","description":"The API Key to use for API Key Authentication","nullable":false},"label":{"type":"string","description":"The label given by the user to this API Key","nullable":false},"permissions":{"type":"array","description":"The permissions associated to this API Key","nullable":false,"items":{"type":"string"}}}},"ApplicationHealthData":{"type":"object","additionalProperties":false,"properties":{"synchronized":{"type":"boolean","description":"True if the instance is fully synchronized, according to NBXplorer"}}},"InvoiceDataList":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceData"}},"MarkInvoiceStatusRequest":{"type":"object","additionalProperties":false,"properties":{"status":{"nullable":false,"description":"Mark an invoice as completed or invalid.","oneOf":[{"$ref":"#/components/schemas/InvoiceStatusMark"}]}}},"AddCustomerEmailRequest":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","nullable":false,"description":"Sets the customer email, if it was not set before."}}},"InvoiceStatusMark":{"type":"string","description":"","x-enumNames":["Invalid","Complete"],"enum":["Invalid","Complete"]},"InvoiceStatus":{"type":"string","description":"","x-enumNames":["New","Paid","Expired","Invalid","Complete","Confirmed"],"enum":["New","Paid","Expired","Invalid","Complete","Confirmed"]},"InvoiceAdditionalStatus":{"type":"string","description":"An additional status that describes why an invoice is in its current status.","x-enumNames":["None","PaidLate","PaidPartial","Marked","Invalid","PaidOver"],"enum":["None","PaidLate","PaidPartial","Marked","Invalid","PaidOver"]},"InvoiceData":{"allOf":[{"$ref":"#/components/schemas/CreateInvoiceRequest"},{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"The identifier of the invoice"},"status":{"$ref":"#/components/schemas/InvoiceStatus","description":"The status of the invoice"},"additionalStatus":{"$ref":"#/components/schemas/InvoiceAdditionalStatus","description":"a secondary status of the invoice"},"paymentMethodData":{"type":"object","nullable":false,"additionalProperties":{"$ref":"#/components/schemas/PaymentMethodDataModel"},"description":"Activated payment methods details"}}}]},"PaymentMethodDataModel":{"type":"object","additionalProperties":false,"properties":{"destination":{"type":"string","nullable":true,"description":"The destination the payment must be made to"},"paymentLink":{"type":"string","nullable":true,"description":"A payment link that helps pay to the payment destination"},"rate":{"type":"string","format":"decimal","description":"The rate between this payment method's currency and the invoice currency"},"paymentMethodPaid":{"type":"string","format":"decimal","description":"The amount paid by this payment method"},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid by all payment methods to the invoice, converted to this payment method's currency"},"due":{"type":"string","format":"decimal","description":"The total amount left to be paid, converted to this payment method's currency"},"amount":{"type":"string","format":"decimal","description":"The invoice amount, converted to this payment method's currency"},"networkFee":{"type":"string","format":"decimal","description":"The added merchant fee to pay for network costs of this payment method."},"payments":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Payment"},"description":"Payments made with this payment method."}}},"Payment":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","nullable":true,"description":"A unique identifier for this payment"},"receivedDate":{"type":"string","format":"date-time","description":"The date the payment was recorded"},"value":{"type":"string","format":"decimal","description":"The value of the payment"},"fee":{"type":"string","format":"decimal","description":"The fee paid for the payment"},"status":{"$ref":"#/components/schemas/PaymentStatus","description":"The status of the payment"},"destination":{"type":"string","nullable":true,"description":"The destination the payment was made to"}}},"PaymentStatus":{"type":"string","description":"","x-enumNames":["Invalid","AwaitingConfirmation","AwaitingCompletion","Complete"],"enum":["Invalid","AwaitingConfirmation","AwaitingCompletion","Complete"]},"CreateInvoiceRequest":{"type":"object","additionalProperties":false,"properties":{"amount":{"type":"string","format":"decimal","description":"The amount of the invoice"},"customerEmail":{"type":"string","format":"email","nullable":true,"description":"The email of the customer. If the store is configured to ask for a refund email, the checkout UI will prompt for one when not provided."},"currency":{"type":"string","nullable":true,"description":"The currency the invoice will use"},"metadata":{"type":"string","nullable":true,"description":"Additional information around the invoice that can be supplied.<br/> You can pass a json body with values of `ProductInformation` `BuyerInformation` which will populate the fields to stay compatible with previous workflows (and bitpay invoice api)./>"},"checkout":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/CheckoutOptions"}],"description":"Additional settings to customize the checkout flow"}}},"ProductInformation":{"type":"object","additionalProperties":false,"properties":{"orderId":{"type":"string","nullable":true,"description":"Can be used by the merchant to assign their own internal ID to an invoice."},"posData":{"type":"string","nullable":true,"description":"A passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order or other object in their system. This passthru variable can be a serialized object, e.g.:"},"itemDesc":{"type":"string","nullable":true,"description":"Invoice description - will be added as a line item on the checkout page, under the merchant name"},"itemCode":{"type":"string","nullable":true,"description":"An item code, for a specific product code that is being paid for. Usually used in conjunction with the POS/Crowdfund apps"},"physical":{"type":"boolean","description":"Whether it was a physical purchase"},"taxIncluded":{"type":"string","format":"decimal","nullable":true,"description":"How much tax is included in the invoice amount"}}},"BuyerInformation":{"type":"object","additionalProperties":false,"properties":{"buyerName":{"type":"string","nullable":true},"buyerEmail":{"type":"string","nullable":true},"buyerCountry":{"type":"string","nullable":true},"buyerZip":{"type":"string","nullable":true},"buyerState":{"type":"string","nullable":true},"buyerCity":{"type":"string","nullable":true},"buyerAddress2":{"type":"string","nullable":true},"buyerAddress1":{"type":"string","nullable":true},"buyerPhone":{"type":"string","nullable":true}}},"CheckoutOptions":{"type":"object","additionalProperties":false,"properties":{"speedPolicy":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/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"},"paymentMethods":{"type":"array","nullable":true,"items":{"type":"string"},"description":"A specific set of payment methods to use for this invoice"},"redirectAutomatically":{"type":"boolean","nullable":true,"description":"Whether to redirect to the redirectUri automatically after the invoice has been paid. Default to the store setting (which is `false` by default)"},"redirectUri":{"type":"string","nullable":true,"description":"This is the URL for a return link that is displayed on the receipt, to return the shopper back to your website after a successful purchase. This could be a page specific to the order, or to their account."},"webHook":{"type":"string","format":"uri","nullable":true,"description":"A URL to send webhook notification to. Sent when the status changes or a payment is detected"},"expirationTime":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice expires. By default will use the store settings (which is set to 15 minutes by default)"},"paymentTolerance":{"type":"string","format":"double","nullable":true,"minimum":0,"maximum":100,"description":"A percentage dtermining whether to count the invoice as paid when the invoice is paid within the specified margin of error"}}},"SpeedPolicy":{"type":"string","description":"","x-enumNames":["HighSpeed","MediumSpeed","LowSpeed","LowMediumSpeed","HighSpeed","MediumSpeed","LowSpeed","LowMediumSpeed"],"enum":["HighSpeed","MediumSpeed","LowSpeed","LowMediumSpeed","HighSpeed","MediumSpeed","LowSpeed","LowMediumSpeed"]},"ValidationProblemDetails":{"type":"array","description":"An array of validation errors of the request","items":{"type":"object","description":"A specific validation error on a json property","properties":{"path":{"type":"string","nullable":false,"description":"The json path of the property which failed validation"},"message":{"type":"string","nullable":false,"description":"User friendly error message about the validation"}}}},"ProblemDetails":{"type":"object","description":"Description of an error happening during processing of the request","properties":{"code":{"type":"string","nullable":false,"description":"An error code describing the error"},"message":{"type":"string","nullable":false,"description":"User friendly error message about the error"}}},"ConnectToNodeRequest":{"type":"object","additionalProperties":false,"properties":{"nodeURI":{"type":"string","nullable":true,"description":"Node URI in the form `pubkey@endpoint[:port]`"}}},"CreateLightningInvoiceRequest":{"type":"object","properties":{"amount":{"type":"string","description":"Amount wrapped in a string, represented in a millistatoshi string. (1000 millisatoshi = 1 satoshi)","nullable":false},"description":{"type":"string","nullable":true,"description":"Description of the invoice in the BOLT11"},"expiry":{"type":"integer","description":"Expiration time in seconds"},"privateRouteHints":{"type":"boolean","nullable":true,"default":false,"description":"True if the invoice should include private route hints"}}},"LightningChannelData":{"type":"object","additionalProperties":false,"properties":{"remoteNode":{"type":"string","nullable":false,"description":"The public key of the node (Node ID)"},"isPublic":{"type":"boolean","description":"Whether the node is public"},"isActive":{"type":"boolean","description":"Whether the node is online"},"capacity":{"type":"string","description":"The capacity of the channel in millisatoshi","nullable":false},"localBalance":{"type":"string","description":"The local balance of the channel in millisatoshi","nullable":false},"channelPoint":{"type":"string","nullable":true}}},"LightningInvoiceData":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The invoice's ID"},"status":{"$ref":"#/components/schemas/LightningInvoiceStatus"},"BOLT11":{"type":"string","description":"The BOLT11 representation of the invoice","nullable":false},"paidAt":{"type":"integer","description":"The unix timestamp when the invoice got paid","nullable":true},"expiresAt":{"type":"integer","description":"The unix timestamp when the invoice expires"},"amount":{"type":"string","description":"The amount of the invoice in millisatoshi"},"amountReceived":{"type":"string","description":"The amount received in millisatoshi"}}},"LightningInvoiceStatus":{"type":"string","description":"","x-enumNames":["Unpaid","Paid","Expired"],"enum":["Unpaid","Paid","Expired"]},"LightningNodeInformationData":{"type":"object","properties":{"nodeURIs":{"type":"array","description":"Node URIs to connect to this node in the form `pubkey@endpoint[:port]`","items":{"type":"string"}},"blockHeight":{"type":"integer","description":"The block height of the lightning node"}}},"PayLightningInvoiceRequest":{"type":"object","properties":{"BOLT11":{"type":"string","description":"The BOLT11 of the invoice to pay"}}},"OpenLightningChannelRequest":{"type":"object","additionalProperties":false,"properties":{"nodeURI":{"type":"string","description":"Node URI in the form `pubkey@endpoint[:port]`"},"channelAmount":{"type":"string","description":"The amount to fund (in satoshi)"},"feeRate":{"type":"number","description":"The amount to fund (in satoshi per byte)"}}},"PaymentRequestDataList":{"type":"array","items":{"$ref":"#/components/schemas/PaymentRequestData"}},"PaymentRequestData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PaymentRequestBaseData"},"properties":{"id":{"type":"string","description":"The id of the payment request","nullable":false},"status":{"type":"string","enum":["Pending","Completed","Expired"],"description":"The status of the payment request","nullable":false},"created":{"type":"string","description":"The creation date of the payment request","nullable":false,"format":"date-time"}}},"PaymentRequestBaseData":{"type":"object","additionalProperties":false,"properties":{"amount":{"type":"string","format":"decimal","minimum":0,"exclusiveMinimum":true,"description":"The amount of the payment request","nullable":false},"title":{"type":"string","description":"The title of the payment request","nullable":false},"currency":{"type":"string","format":"ISO 4217 Currency code(BTC, EUR, USD, etc)","description":"The currency of the payment request","nullable":false},"email":{"type":"string","description":"The email used in invoices generated by the payment request","nullable":true,"format":"email"},"description":{"type":"string","description":"The description of the payment request","nullable":true,"format":"html"},"expiryDate":{"type":"string","description":"The expiry date of the payment request","nullable":true,"format":"date-time"},"embeddedCSS":{"type":"string","description":"Custom CSS styling for the payment request","nullable":true,"format":"css","maximum":500},"customCSSLink":{"type":"string","description":"Custom CSS link for styling the payment request","nullable":true,"format":"uri"},"allowCustomPaymentAmounts":{"type":"boolean","description":"Whether to allow users to create invoices that partially pay the payment request ","nullable":true}}},"PullPaymentDataList":{"type":"array","items":{"$ref":"#/components/schemas/PullPaymentData"}},"PayoutDataList":{"type":"array","items":{"$ref":"#/components/schemas/PayoutData"}},"PayoutData":{"type":"object","properties":{"id":{"type":"string","description":"The id of the payout"},"revision":{"type":"integer","description":"The revision number of the payout. This revision number is incremented when the payout amount or destination is modified before the approval."},"pullPaymentId":{"type":"string","description":"The id of the pull payment this payout belongs to"},"date":{"type":"string","description":"The creation date of the payout as a unix timestamp"},"destination":{"type":"string","example":"1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2","description":"The destination of the payout (can be an address or a BIP21 url)"},"amount":{"type":"string","format":"decimal","example":"10399.18","description":"The amount of the payout in the currency of the pull payment (eg. USD)."},"paymentMethod":{"type":"string","example":"BTC","description":"The payment method of the payout"},"paymentMethodAmount":{"type":"string","format":"decimal","nullable":true,"example":"1.12300000","description":"The amount of the payout in the currency of the payment method (eg. BTC). This is only available from the `AwaitingPayment` state."},"state":{"type":"string","example":"AwaitingPayment","description":"The state of the payout (`AwaitingApproval`, `AwaitingPayment`, `InProgress`, `Completed`, `Cancelled`)","x-enumNames":["AwaitingApproval","AwaitingPayment","InProgress","Completed","Cancelled"],"enum":["AwaitingApproval","AwaitingPayment","InProgress","Completed","Cancelled"]}}},"PullPaymentData":{"type":"object","properties":{"id":{"type":"string","description":"Id of the pull payment"},"name":{"type":"string","description":"Payment method of of the pull payment"},"currency":{"type":"string","example":"BTC","description":"The currency of the pull payment's amount"},"amount":{"type":"string","format":"decimal","example":"1.12000000","description":"The amount in the currency of this pull payment as a decimal string"},"period":{"type":"integer","example":604800,"nullable":true,"description":"The length of each period in seconds"},"archived":{"type":"boolean","description":"Whether this pull payment is archived"},"viewLink":{"type":"string","description":"The link to a page to claim payouts to this pull payment"}}},"ApplicationServerInfoData":{"type":"object","properties":{"version":{"type":"string","description":"BTCPay Server version"},"onion":{"type":"string","description":"The Tor hostname"},"supportedPaymentMethods":{"type":"array","description":"The payment methods this server supports","items":{"type":"string"}},"fullySynched":{"type":"boolean","description":"True if the instance is fully synchronized, according to NBXplorer"},"syncStatus":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationServerInfoSyncStatusData"}}}},"ApplicationServerInfoNodeStatusData":{"type":"object","nullable":true,"description":"Detailed sync status of the internal full node","properties":{"headers":{"type":"integer","description":"The height of the chain of header of the internal full node"},"blocks":{"type":"integer","description":"The height of the latest validated block of the internal full node"},"verificationProgress":{"type":"number","format":"double","minimum":0.0,"maximum":1.0,"description":"The current synchronization progress"}}},"ApplicationServerInfoSyncStatusData":{"type":"object","description":"Detailed sync status","properties":{"cryptoCode":{"type":"string","description":"The CryptoCode of the crypto currency (eg. BTC)"},"nodeInformation":{"$ref":"#/components/schemas/ApplicationServerInfoNodeStatusData"},"chainHeight":{"type":"integer","description":"The height of the chain of header of the internal indexer"},"syncHeight":{"type":"number","format":"integer","nullable":true,"description":"The height of the latest indexed block of the internal indexer"}}},"StoreDataList":{"type":"array","items":{"$ref":"#/components/schemas/StoreData"}},"StoreData":{"allOf":[{"$ref":"#/components/schemas/StoreBaseData"},{"type":"object","properties":{"id":{"type":"string","description":"The id of the store","nullable":false}}}]},"StoreBaseData":{"type":"object","x-abstract":true,"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the store"},"website":{"type":"string","description":"The absolute url of the store","format":"url"},"invoiceExpiration":{"type":"integer","format":"int32","default":900,"minimum":60,"maximum":2073600,"description":"The time after which an invoice is considered expired if not paid. The value will be rounded down to a minute."},"monitoringExpiration":{"type":"integer","format":"int32","default":3600,"minimum":600,"maximum":2073600,"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."},"speedPolicy":{"$ref":"#/components/schemas/SpeedPolicy"},"lightningDescriptionTemplate":{"type":"string","nullable":true,"description":"The BOLT11 description of the lightning invoice in the checkout. You can use placeholders '{StoreName}', '{ItemDescription}' and '{OrderId}'."},"paymentTolerance":{"type":"number","format":"double","minimum":0.0,"maximum":100.0,"default":0.0,"description":"Consider an invoice fully paid, even if the payment is missing 'x' % of the full amount."},"anyoneCanCreateInvoice":{"type":"boolean","default":false,"description":"If true, then no authentication is needed to create invoices on this store."},"showRecommendedFee":{"type":"boolean","default":true},"recommendedFeeBlockTarget":{"type":"integer","format":"int32","default":1,"description":"The fee rate recommendation in the checkout page for the on-chain payment to be confirmed after 'x' blocks."},"defaultLang":{"type":"string","default":"en","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)"},"lightningAmountInSatoshi":{"type":"boolean","default":false,"description":"If true, lightning payment methods show amount in satoshi in the checkout page."},"customLogo":{"type":"string","nullable":true,"description":"URL to a logo to include in the checkout page."},"customCSS":{"type":"string","nullable":true,"description":"URL to a CSS stylesheet to include in the checkout page"},"htmlTitle":{"type":"string","nullable":true,"description":"The HTML title of the checkout page (when you over the tab in your browser)"},"redirectAutomatically":{"type":"boolean","default":false,"description":"After successfull payment, should the checkout page redirect the user automatically to the redirect URL of the invoice?"},"requiresRefundEmail":{"type":"boolean","default":false,"description":"If true, the checkout page will ask to enter an email address before accessing payment information."},"networkFeeMode":{"$ref":"#/components/schemas/NetworkFeeMode"},"payJoinEnabled":{"type":"boolean","default":false,"description":"If true, payjoin will be proposed in the checkout page if possible. ([More information](https://docs.btcpayserver.org/Payjoin/))"},"lightningPrivateRouteHints":{"type":"boolean","default":false,"description":"Should private route hints be included in the lightning payment of the checkout page."}}},"NetworkFeeMode":{"type":"string","description":"Check whether network fee should be added to the invoice if on-chain payment is used. ([More information](https://docs.btcpayserver.org/FAQ/FAQ-Stores/#add-network-fee-to-invoice-vary-with-mining-fees))","x-enumNames":["MultiplePaymentsOnly","Always","Never"],"enum":["MultiplePaymentsOnly","Always","Never"]},"ApplicationUserData":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The id of the new user","nullable":false},"email":{"type":"string","description":"The email of the new user","nullable":false},"emailConfirmed":{"type":"boolean","description":"True if the email has been confirmed by the user"},"requiresEmailConfirmation":{"type":"boolean","description":"True if the email requires email confirmation to log in"}}}},"securitySchemes":{"API Key":{"type":"apiKey","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.\n\n The following permissions applies to the context of the user creating the API Key:\n * `unrestricted`: Allow unrestricted access to your account.\n * `btcpay.server.canmodifyserversettings`: Allow total control on the server settings. (only if user is administrator)\n * `btcpay.server.cancreateuser`: Allow the creation of new users on this server. (only if user is an administrator)\n * `btcpay.user.canviewprofile`: Allow view access to your user profile.\n * `btcpay.user.canmodifyprofile`: Allow view and modification access to your user profile.\n\nThe following permissions applies to all stores of the user, you can limit to a specific store with the following format: `btcpay.store.cancreateinvoice:6HSHAEU4iYWtjxtyRs9KyPjM9GAQp8kw2T9VWbGG1FnZ`:\n * `btcpay.store.canviewstoresettings`: Allow view access to the stores settings. \n * `btcpay.store.canmodifystoresettings`: Allow view and modification access to the stores settings.\n * `btcpay.store.cancreateinvoice`: Allow invoice creation of the store.\n\nNote 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.\n","name":"Authorization","in":"header","scheme":"token"},"Basic":{"type":"http","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","name":"Authorization","in":"header","scheme":"Basic"}}},"tags":[{"name":"API Keys"},{"name":"Health"},{"name":"Invoices"},{"name":"Lightning (Internal Node)"},{"name":"Lightning (Store)"},{"name":"Payment Requests"},{"name":"ServerInfo"},{"name":"Stores"},{"name":"Users"}],"openapi":"3.0.0","info":{"title":"BTCPay Greenfield API","description":"A full API to use your BTCPay Server","contact":{"name":"BTCPay Server","url":"https://btcpayserver.org"},"version":"v1"},"servers":[{"url":"https://localhost:14142"}],"security":[{"API Key":[],"Basic":[]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment