Invoices: Creates a new draft invoice.
POST
/api/invoicing/invoices
deprecated
Requires: Invoicing.Invoices, Invoicing.Invoices.Create, merchant scope.
**Required permissions**: `Invoicing.Invoices`, `Invoicing.Invoices.Create` **Scope**: merchant
Example request
Every block below sends the same request. Replace {{BASE_URL}} with the address of the API you are calling and {{API_KEY}} with your own key.
The request body is a InvoiceCreateDto. See the Request body section below for its fields.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
suppressNulls
required |
query | boolean | If true, omit properties with null values. |
Request body
application/json
, required
| Field | Type | Description |
|---|---|---|
recipientId
required |
string (uuid) | Recipient entity ID. |
recipientType
required |
all of InvoicePartyType | Recipient entity type. |
currency
required |
string | ISO 4217 currency code. nullablemin length 3max length 3pattern ^[A-Za-z]{3}$ |
paymentTermsValue
required |
all of PaymentTerms | Standard payment terms. nullable |
customPaymentDays
required |
integer (int32) | Custom number of days when PaymentTerms is Custom. Conditional: When PaymentTermsValue == Custom. Must be > 0. nullable |
dueDate
required |
string (date-time) | Manual due date override (used if PaymentTerms is null). nullable |
allowPartialPayment
required |
boolean | Whether partial payments are allowed. nullable |
minimumPaymentAmount
required |
number (double) | Minimum payment amount when partial payments are enabled. Conditional: When AllowPartialPayment is true and MinimumPaymentAmount is not null. Must be > 0. nullable |
partialPaymentTolerance
required |
number (double) | Auto-close tolerance. nullable |
depositType
required |
all of InvoiceDepositType | When set, requests an up-front deposit on the invoice: the payer is charged exactly the deposit first, then the remaining balance. Null means no deposit is requested. When set, `depositValue` is required. nullable |
depositValue
required |
number (double) | The deposit percentage (e.g. 25 for 25%) when `depositType` is `Percentage`, or the fixed deposit amount when it is `FixedAmount`. Must be positive; the resolved amount must be strictly less than the invoice total. Required: When DepositType is not null. Must be > 0. Must be < 100. nullable |
depositDueDate
required |
string (date-time) | Optional deposit due date, distinct from the balance `dueDate`. When set, it must not be after the balance due date. Conditional: When DepositType is not null. nullable |
allowedPaymentMethods
required |
array of string | Subset of biller's supported payment methods for this invoice. Conditional: When AllowedPaymentMethods is not null. nullable |
vaultRestriction
required |
all of VaultRestriction | Controls whether new or saved payment methods are allowed. nullable |
applyConvenienceFee
required |
boolean | Per-invoice override of the merchant's convenience fee on this invoice's payments: `true` applies it, `false` suppresses it, and `null` (the default, and the behaviour of any payload that omits the field) inherits the merchant and feature decision. An override can suppress a fee but can never create one: `true` applies the fee only when invoice convenience fees are enabled for the tenant and the merchant has a convenience-fee configuration, and the platform's compliance rules still govern whether the resulting transaction keeps the fee. nullable |
hppPageId
required |
string (uuid) | Linked HPP configuration ID. nullable |
templateId
required |
string (uuid) | Invoice style/template reference. nullable |
invoiceLevelDiscount
required |
all of InvoiceDiscountDto | Invoice-level discount. |
reminderConfig
required |
all of InvoiceReminderConfigDto | Per-invoice reminder overrides. |
sourceType
required |
all of InvoiceSourceType | How this invoice was created. nullable |
sourceReferenceId
required |
string | Caller-provided reference. Conditional: When SourceReferenceId is not empty. Max length: 200. nullable |
notes
required |
array of EntityNote | Internal notes (not shown to recipient). nullable |
recipientNote
required |
string | Shown on the invoice to the recipient. Conditional: When RecipientNote is not empty. Max length: 2000. nullable |
footerText
required |
string | Terms and conditions text. Conditional: When FooterText is not empty. Max length: 5000. nullable |
lineItems
required |
array of InvoiceLineItemInputDto | Line items to set on the invoice. nullable |
customFields
required |
array of CustomFieldValueDto | Custom field values. nullable |
billerSnapshot
required |
all of InvoicePartySnapshotDto | Optional biller snapshot to freeze on this invoice at creation time. When supplied, overrides the empty-placeholder default used by IssueAsync. Useful for programmatic/system-generated invoices where the caller already holds the party's display info (e.g., billing-run invoice generation). |
recipientSnapshot
required |
all of InvoicePartySnapshotDto | Optional recipient snapshot to freeze on this invoice at creation time. |
billerId
required |
string (uuid) | The billing entity ID. |
billerType
required |
all of InvoicePartyType | The type of billing entity. |
This request body has no documented fields.
Responses
200 OK
Body: InvoiceDto
Each item has these fields.
| Field | Type | Description |
|---|---|---|
extraProperties
required |
object | nullableread only |
id
required |
string (uuid) | |
creationTime
required |
string (date-time) | The date and time when this entity was created. |
creatorId
required |
string (uuid) | The ID of the user who created this entity. nullable |
lastModificationTime
required |
string (date-time) | The date and time when this entity was last modified. nullable |
lastModifierId
required |
string (uuid) | The ID of the user who last modified this entity. nullable |
isDeleted
required |
boolean | Indicates whether this entity has been deleted. |
deleterId
required |
string (uuid) | The ID of the user who deleted this entity, if it is deleted. nullable |
deletionTime
required |
string (date-time) | The date and time when this entity was deleted, if it is deleted. nullable |
tenantId
required |
string (uuid) | nullable |
billerId
required |
string (uuid) | |
billerType
required |
InvoicePartyType | Identifies the type of entity acting as the biller or recipient on an invoice. one of: GatewayOwner, Reseller, Merchant, Customer |
recipientId
required |
string (uuid) | |
recipientType
required |
InvoicePartyType | Identifies the type of entity acting as the biller or recipient on an invoice. one of: GatewayOwner, Reseller, Merchant, Customer |
invoiceNumber
required |
string | nullable |
status
required |
InvoiceStatus | Represents the lifecycle status of an invoice. one of: Draft, Issued, Sent, Viewed, PartiallyPaid, Paid, PastDue, Closed, Uncollectible, Cancelled, Refunded |
isLocked
required |
boolean | nullable |
billerSnapshot
required |
InvoicePartySnapshotDto | Read DTO for denormalized biller/recipient info frozen at invoice issuance. |
recipientSnapshot
required |
InvoicePartySnapshotDto | Read DTO for denormalized biller/recipient info frozen at invoice issuance. |
currency
required |
string | nullable |
subtotal
required |
number (double) | nullable |
taxTotal
required |
number (double) | nullable |
discountTotal
required |
number (double) | nullable |
grandTotal
required |
number (double) | nullable |
amountPaid
required |
number (double) | nullable |
balanceDue
required |
number (double) | nullable |
invoiceLevelDiscount
required |
InvoiceDiscountDto | DTO for an invoice-level discount. |
issueDate
required |
string (date-time) | nullable |
dueDate
required |
string (date-time) | nullable |
sentAt
required |
string (date-time) | nullable |
viewedAt
required |
string (date-time) | nullable |
paidAt
required |
string (date-time) | nullable |
paymentTermsValue
required |
all of PaymentTerms | nullable |
customPaymentDays
required |
integer (int32) | nullable |
allowPartialPayment
required |
boolean | nullable |
minimumPaymentAmount
required |
number (double) | nullable |
partialPaymentTolerance
required |
number (double) | nullable |
allowedPaymentMethods
required |
array of string | nullable |
vaultRestriction
required |
all of VaultRestriction | nullable |
applyConvenienceFee
required |
boolean | Per-invoice override of the merchant's convenience fee on this invoice's payments. `null` inherits the merchant and feature decision. `true` applies the fee only when invoice convenience fees are enabled for the tenant. nullable |
depositRequest
required |
all of InvoiceDepositRequestInfoDto | The deposit request on this invoice, if any. Null when no deposit was requested. |
hppPageId
required |
string (uuid) | nullable |
templateId
required |
string (uuid) | nullable |
sourceType
required |
all of InvoiceSourceType | nullable |
sourceReferenceId
required |
string | nullable |
notes
required |
array of EntityNote | nullable |
recipientNote
required |
string | nullable |
footerText
required |
string | nullable |
reminderConfig
required |
InvoiceReminderConfigDto | DTO for invoice reminder configuration. Each member overrides the tenant's reminder default on its own; a member that is null or omitted inherits that default. |
lineItems
required |
array of InvoiceLineItemDto | nullable |
payments
required |
array of InvoicePaymentDto | nullable |
activities
required |
array of InvoiceActivityDto | nullable |
customFields
required |
array of CustomFieldValueDto | nullable |
concurrencyStamp
required |
string | nullable |
entityVersion
required |
integer (int32) |
This response has no documented body fields.
403 Forbidden
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
401 Unauthorized
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
400 Bad Request
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
404 Not Found
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
501 Not Implemented
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
500 Internal Server Error
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
default The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.
Body: RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo |
This response has no documented body fields.
429 The request was refused because a rate limit was exceeded. Wait at least the interval `Retry-After` names before retrying, then back off. Limits are tuned per deployment, so read the allowance from the response headers rather than assuming a fixed ceiling.
Body: RateLimitProblemDetails
Each item has these fields.
| Field | Type | Description |
|---|---|---|
type
required |
string | The problem type identifier. Always the same value: the failure is the status code itself, so there is no sub-type for a caller to branch on. nullable |
title
required |
string | A short, human-readable summary of the problem type. nullable |
status
required |
integer (int32) | The HTTP status code, repeated in the body as the problem-details format defines. |
detail
required |
string | A human-readable explanation of this occurrence of the problem. nullable |
retryAfterSeconds
required |
integer (int32) | How long to wait before retrying, in whole seconds, carrying the same figure as the `Retry-After` header. Always at least one: a value of zero would invite an immediate retry that is certain to be rejected again. |
This response has no documented body fields.
Errors
A failed request returns the platform error envelope. The
error reference lists every value
error.code can carry and shows the four response shapes.