@coin-voyage/paykit@3.4.0 and later. Every method requires your API secret and must run on the server.
createInvoice
Creates and publishes an invoice. Includeid to publish an existing draft, together with the complete invoice fields required by CreateInvoiceParams.
params (CreateInvoiceParams), apiSecret, opts?Returns:
Promise<APIResponse<InvoiceResponse>>
saveInvoiceDraft
Creates a partial draft or updates an unpublished draft whenid is supplied. Draft fields are validated when the invoice is published.
Promise<APIResponse<InvoiceResponse>>
listInvoices
Lists invoices and drafts newest first. Search matches invoice IDs, invoice numbers, recipient names or email addresses, and linked order IDs.Promise<APIResponse<InvoicesWithPagination>>
getInvoice
Promise<APIResponse<InvoiceResponse>>
archiveInvoice
Archives an invoice. Archiving retains the invoice and recordsarchived_at.
Promise<APIResponse<InvoiceResponse>>
deleteInvoice
Deletes an unpublished draft. Published invoices cannot be deleted.Promise<APIResponse<void>>
Invoice types
unitPrice, quantity, and tax are decimal strings. tax is a percentage from 0 through 100.
See Invoices overview for the lifecycle and Invoices API for the raw REST endpoints.