2020-07-24 12:46:46 +02:00
{
"paths" : {
"/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"
}
2021-04-26 04:32:44 +02:00
} ,
{
"name" : "orderId" ,
"in" : "query" ,
"required" : false ,
"description" : "Array of OrderIds to fetch the invoices for" ,
"schema" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2021-08-09 13:33:56 +02:00
} ,
"example" : "1000&orderId=1001&orderId=1002"
2021-04-26 04:32:44 +02:00
} ,
{
"name" : "status" ,
"in" : "query" ,
"required" : false ,
"description" : "Array of statuses of invoices to be fetched" ,
"$ref" : "#/components/schemas/InvoiceStatus"
} ,
2021-07-14 16:32:20 +02:00
{
"name" : "textSearch" ,
"in" : "query" ,
"required" : false ,
"description" : "A term that can help locating specific invoices." ,
"schema" : {
"type" : "string"
}
} ,
2021-04-26 04:32:44 +02:00
{
"name" : "startDate" ,
"in" : "query" ,
"required" : false ,
"description" : "Start date of the period to retrieve invoices" ,
"$ref" : "#/components/schemas/UnixTimestamp"
} ,
{
"name" : "endDate" ,
"in" : "query" ,
"required" : false ,
"description" : "End date of the period to retrieve invoices" ,
"$ref" : "#/components/schemas/UnixTimestamp"
2020-07-24 12:46:46 +02:00
}
] ,
"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" : {
2021-06-20 05:02:55 +02:00
"description" : "If you are authenticated but forbidden to view the specified invoice"
2020-07-24 12:46:46 +02:00
} ,
"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" : [
2021-07-10 17:30:01 +02:00
"btcpay.store.canmodifyinvoices"
2020-07-24 12:46:46 +02:00
] ,
"Basic" : [ ]
}
]
2020-12-12 07:15:34 +01:00
} ,
"put" : {
"tags" : [
"Invoices"
] ,
"summary" : "Update invoice" ,
"description" : "Updates the specified invoice." ,
"operationId" : "Invoices_UpdateInvoice" ,
"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 update" ,
"schema" : {
"type" : "string"
}
}
] ,
"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"
}
} ,
"requestBody" : {
"required" : true ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UpdateInvoiceRequest"
}
}
}
} ,
"security" : [
{
"API Key" : [
2021-07-10 17:30:01 +02:00
"btcpay.store.canmodifyinvoices"
2020-12-12 07:15:34 +01:00
] ,
"Basic" : [ ]
}
]
2020-07-27 10:43:35 +02:00
}
} ,
2020-09-10 13:54:36 +02:00
"/api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods" : {
"get" : {
"tags" : [
"Invoices"
] ,
"summary" : "Get invoice payment methods" ,
"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"
}
2021-05-14 09:16:19 +02:00
} ,
{
"name" : "onlyAccountedPayments" ,
"in" : "query" ,
"required" : false ,
"description" : "If default or true, only returns payments which are accounted (in Bitcoin, this mean not returning RBF'd or double spent payments)" ,
"schema" : {
"type" : "boolean" ,
"default" : true
}
2020-09-10 13:54:36 +02:00
}
] ,
"description" : "View information about the specified invoice's payment methods" ,
"operationId" : "Invoices_GetInvoicePaymentMethods" ,
"responses" : {
"200" : {
"description" : "specified invoice payment methods data" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"nullable" : false ,
"items" : {
"$ref" : "#/components/schemas/InvoicePaymentMethodDataModel"
}
}
}
}
} ,
"403" : {
2021-06-20 05:02:55 +02:00
"description" : "If you are authenticated but forbidden to view the specified invoice"
2020-09-10 13:54:36 +02:00
} ,
"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" : [
2021-07-10 17:30:01 +02:00
"btcpay.store.canmodifyinvoices"
2020-09-10 13:54:36 +02:00
] ,
"Basic" : [ ]
}
]
}
} ,
2020-07-27 10:43:35 +02:00
"/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"
}
}
] ,
2021-02-23 13:18:16 +01:00
"description" : "Mark an invoice as invalid or settled." ,
2020-07-27 10:43:35 +02:00
"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"
2020-07-24 12:46:46 +02:00
}
}
}
} ,
"security" : [
{
"API Key" : [
2021-07-10 17:30:01 +02:00
"btcpay.store.canmodifyinvoices"
2020-07-24 12:46:46 +02:00
] ,
"Basic" : [ ]
}
]
}
2020-07-27 10:43:35 +02:00
} ,
"/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" : [
2021-07-10 17:30:01 +02:00
"btcpay.store.canmodifyinvoices"
2020-07-27 10:43:35 +02:00
] ,
"Basic" : [ ]
}
]
}
2021-04-07 06:08:42 +02:00
} ,
"/api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate" : {
"post" : {
"tags" : [
"Invoices"
] ,
"summary" : "Activate Payment Method" ,
"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"
}
} ,
{
"name" : "paymentMethod" ,
"in" : "path" ,
"required" : true ,
"description" : "The payment method to activate" ,
"schema" : {
"type" : "string"
}
}
] ,
"description" : "Activate an invoice payment method (if lazy payments mode is enabled)" ,
"operationId" : "Invoices_ActivatePaymentMethod" ,
"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"
}
} ,
"security" : [
{
"API Key" : [
"btcpay.store.canviewinvoices"
] ,
"Basic" : [ ]
}
]
}
2020-07-24 12:46:46 +02:00
}
} ,
"components" : {
"schemas" : {
"InvoiceDataList" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/InvoiceData"
}
} ,
2020-07-27 10:43:35 +02:00
"MarkInvoiceStatusRequest" : {
2020-07-24 12:46:46 +02:00
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"status" : {
2020-07-27 10:43:35 +02:00
"nullable" : false ,
2020-07-24 12:46:46 +02:00
"description" : "Mark an invoice as completed or invalid." ,
"oneOf" : [
{
"$ref" : "#/components/schemas/InvoiceStatusMark"
}
]
2020-07-27 10:43:35 +02:00
}
}
} ,
"AddCustomerEmailRequest" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
2020-07-24 12:46:46 +02:00
"email" : {
"type" : "string" ,
2020-07-27 10:43:35 +02:00
"nullable" : false ,
2020-07-24 12:46:46 +02:00
"description" : "Sets the customer email, if it was not set before."
}
}
} ,
"InvoiceStatusMark" : {
"type" : "string" ,
"description" : "" ,
"x-enumNames" : [
"Invalid" ,
2021-07-07 06:27:04 +02:00
"Settled"
2020-07-24 12:46:46 +02:00
] ,
"enum" : [
"Invalid" ,
2021-07-07 06:27:04 +02:00
"Settled"
2020-07-24 12:46:46 +02:00
]
} ,
"InvoiceStatus" : {
"type" : "string" ,
"description" : "" ,
"x-enumNames" : [
"New" ,
2020-11-23 07:57:05 +01:00
"Processing" ,
2020-07-24 12:46:46 +02:00
"Expired" ,
"Invalid" ,
2020-11-23 07:57:05 +01:00
"Settled"
2020-07-24 12:46:46 +02:00
] ,
"enum" : [
"New" ,
2020-11-23 07:57:05 +01:00
"Processing" ,
2020-07-24 12:46:46 +02:00
"Expired" ,
"Invalid" ,
2020-11-23 07:57:05 +01:00
"Settled"
2020-07-24 12:46:46 +02:00
]
} ,
2020-07-27 10:43:35 +02:00
"InvoiceAdditionalStatus" : {
2020-07-24 12:46:46 +02:00
"type" : "string" ,
2020-07-27 10:43:35 +02:00
"description" : "An additional status that describes why an invoice is in its current status." ,
2020-07-24 12:46:46 +02:00
"x-enumNames" : [
"None" ,
"PaidLate" ,
"PaidPartial" ,
"Marked" ,
"Invalid" ,
"PaidOver"
] ,
"enum" : [
"None" ,
"PaidLate" ,
"PaidPartial" ,
"Marked" ,
"Invalid" ,
"PaidOver"
]
} ,
2021-07-14 16:32:20 +02:00
"InvoiceDataBase" : {
"properties" : {
"currency" : {
"type" : "string" ,
"nullable" : true ,
"description" : "The currency the invoice will use"
} ,
"metadata" : {
"$ref" : "#/components/schemas/InvoiceMetadata"
} ,
"checkout" : {
"nullable" : true ,
"oneOf" : [
{
"$ref" : "#/components/schemas/CheckoutOptions"
}
] ,
"description" : "Additional settings to customize the checkout flow"
}
}
} ,
2020-07-24 12:46:46 +02:00
"InvoiceData" : {
"allOf" : [
{
2021-07-14 16:32:20 +02:00
"$ref" : "#/components/schemas/InvoiceDataBase"
2020-07-24 12:46:46 +02:00
} ,
{
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "string" ,
"description" : "The identifier of the invoice"
} ,
2021-06-24 16:15:51 +02:00
"storeId" : {
"type" : "string" ,
"description" : "The store identifier that the invoice belongs to"
} ,
2021-08-03 10:03:00 +02:00
"amount" : {
"type" : "string" ,
"format" : "decimal" ,
"description" : "The amount of the invoice"
} ,
"type" : {
"$ref" : "#/components/schemas/InvoiceType" ,
"description" : "The type of invoice"
} ,
2020-12-10 15:34:50 +01:00
"checkoutLink" : {
"type" : "string" ,
"description" : "The link to the checkout page, where you can redirect the customer"
} ,
2020-08-26 14:31:08 +02:00
"createdTime" : {
2021-03-30 04:18:00 +02:00
"description" : "The creation time of the invoice" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/UnixTimestamp" } ]
2020-08-26 14:31:08 +02:00
} ,
"expirationTime" : {
2021-03-30 04:18:00 +02:00
"description" : "The expiration time of the invoice" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/UnixTimestamp" } ]
2020-08-26 14:31:08 +02:00
} ,
"monitoringTime" : {
2021-03-30 04:18:00 +02:00
"description" : "The monitoring time of the invoice" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/UnixTimestamp" } ]
2020-08-26 14:31:08 +02:00
} ,
2020-07-24 12:46:46 +02:00
"status" : {
"$ref" : "#/components/schemas/InvoiceStatus" ,
"description" : "The status of the invoice"
} ,
2020-07-27 10:43:35 +02:00
"additionalStatus" : {
"$ref" : "#/components/schemas/InvoiceAdditionalStatus" ,
2020-07-24 12:46:46 +02:00
"description" : "a secondary status of the invoice"
}
}
}
]
} ,
2021-04-08 09:42:18 +02:00
"InvoiceMetadataPosString" : {
"type" : "string" ,
"description" : "shown on the invoice details page"
} ,
"InvoiceMetadataPosObject" : {
"type" : "object" ,
"description" : "Any json object in any schema you want. Will be rendered on a best effort basis in terms of style on the invoice details UI"
} ,
2021-07-14 16:32:20 +02:00
"InvoiceMetadata" : {
2021-04-08 09:42:18 +02:00
"type" : "object" ,
"additionalProperties" : true ,
"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." ,
"anyOf" : [
{
"properties" : {
"orderId" : {
"type" : "string" ,
"nullable" : true ,
"description" : "You can use this property to store the ID of an external system. We allow you to search in the invoice list based on this ID."
2021-07-14 13:43:13 +02:00
} ,
"orderUrl" : {
"type" : "string" ,
"nullable" : true ,
"description" : "You can use this property to store the URL to the order of an external system. This makes navigating to the order easier."
2021-04-08 09:42:18 +02:00
}
}
} ,
{
"properties" : {
"posData" : {
"oneOf" : [
{
"$ref" : "#/components/schemas/InvoiceMetadataPosString"
} ,
{
"$ref" : "#/components/schemas/InvoiceMetadataPosObject"
}
]
}
}
} ,
{
"properties" : {
"buyerName" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerEmail" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerCountry" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerZip" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerState" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerCity" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerAddress1" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerAddress2" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"buyerPhone" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"itemDesc" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"itemCode" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"physical" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
{
"properties" : {
"taxIncluded" : {
"type" : "number" ,
"nullable" : true
}
}
}
]
} ,
2020-07-24 12:46:46 +02:00
"CreateInvoiceRequest" : {
2021-07-14 16:32:20 +02:00
"allOf" : [
{
"$ref" : "#/components/schemas/InvoiceDataBase"
2020-07-24 12:46:46 +02:00
} ,
2021-07-14 16:32:20 +02:00
{
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
2021-08-03 10:03:00 +02:00
"amount" : {
"type" : "string" ,
"format" : "decimal" ,
"nullable" : true ,
"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)"
} ,
2021-07-14 16:32:20 +02:00
"additionalSearchTerms" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"description" : "Additional search term to help you find this invoice via text search" ,
"nullable" : true
2020-07-24 12:46:46 +02:00
}
2021-07-14 16:32:20 +02:00
}
2020-07-24 12:46:46 +02:00
}
2021-07-14 16:32:20 +02:00
]
2020-07-24 12:46:46 +02:00
} ,
2020-12-12 07:15:34 +01:00
"UpdateInvoiceRequest" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"metadata" : {
2021-04-08 09:42:18 +02:00
"$ref" : "#/components/schemas/InvoiceMetadata"
2020-12-12 07:15:34 +01:00
}
}
} ,
2020-07-24 12:46:46 +02:00
"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"
2020-12-09 15:20:13 +01:00
} ,
2021-04-07 06:08:42 +02:00
"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."
2020-07-24 12:46:46 +02:00
} ,
2020-08-26 13:02:18 +02:00
"expirationMinutes" : {
2020-07-24 12:46:46 +02:00
"nullable" : true ,
2021-03-30 04:18:00 +02:00
"description" : "The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15)" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/TimeSpanMinutes" } ]
2020-07-24 12:46:46 +02:00
} ,
2020-08-26 13:02:18 +02:00
"monitoringMinutes" : {
2021-08-09 13:33:56 +02:00
"type" : "number" ,
2020-07-24 12:46:46 +02:00
"nullable" : true ,
2021-03-30 04:18:00 +02:00
"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)" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/TimeSpanMinutes" } ]
2020-07-24 12:46:46 +02:00
} ,
"paymentTolerance" : {
2020-08-26 13:02:18 +02:00
"type" : "number" ,
2020-07-24 12:46:46 +02:00
"format" : "double" ,
"nullable" : true ,
"minimum" : 0 ,
"maximum" : 100 ,
2021-03-01 14:34:07 +01:00
"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)"
2020-12-09 15:20:13 +01:00
} ,
"redirectURL" : {
"type" : "string" ,
"nullable" : true ,
2021-03-01 14:34:07 +01:00
"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."
} ,
"redirectAutomatically" : {
"type" : "boolean" ,
"nullable" : true ,
"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)"
2020-12-10 15:34:50 +01:00
} ,
"defaultLanguage" : {
"type" : "string" ,
"nullable" : true ,
2020-12-12 06:07:25 +01:00
"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](#operation/langCodes)."
2020-07-24 12:46:46 +02:00
}
}
} ,
"SpeedPolicy" : {
"type" : "string" ,
"description" : "" ,
"x-enumNames" : [
"HighSpeed" ,
"MediumSpeed" ,
"LowSpeed" ,
"LowMediumSpeed"
] ,
"enum" : [
"HighSpeed" ,
"MediumSpeed" ,
"LowSpeed" ,
"LowMediumSpeed"
]
2020-09-10 13:54:36 +02:00
} ,
"InvoicePaymentMethodDataModel" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"paymentMethod" : {
"type" : "string" ,
"description" : "The payment method"
} ,
"destination" : {
"type" : "string" ,
"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" : false ,
"items" : {
"$ref" : "#/components/schemas/Payment"
} ,
"description" : "Payments made with this payment method."
2021-04-07 06:08:42 +02:00
} ,
"activated" : {
"type" : "boolean" ,
"description" : "If the payment method is activated (when lazy payments option is enabled"
2020-09-10 13:54:36 +02:00
}
}
} ,
"Payment" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "string" ,
"description" : "A unique identifier for this payment"
} ,
"receivedDate" : {
2021-03-30 04:18:00 +02:00
"description" : "The date the payment was recorded" ,
2021-07-14 16:32:20 +02:00
"allOf" : [ { "$ref" : "#/components/schemas/UnixTimestamp" } ]
2020-09-10 13:54:36 +02:00
} ,
"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" ,
"description" : "The destination the payment was made to"
}
}
} ,
"PaymentStatus" : {
"type" : "string" ,
"description" : "" ,
"x-enumNames" : [
"Invalid" ,
2020-11-23 07:57:05 +01:00
"Processing" ,
"Settled"
2020-09-10 13:54:36 +02:00
] ,
"enum" : [
"Invalid" ,
2020-11-23 07:57:05 +01:00
"Processing" ,
"Settled"
2020-09-10 13:54:36 +02:00
]
2021-08-03 10:03:00 +02:00
} ,
"InvoiceType" : {
"type" : "string" ,
"description" : "" ,
"x-enumNames" : [
"Standard" ,
"TopUp"
] ,
"enum" : [
"Standard" ,
"TopUp"
]
2020-07-24 12:46:46 +02:00
}
}
} ,
"tags" : [
{
"name" : "Invoices"
}
]
}