Create a sale

Creates a sale for the authenticated business.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required

The sale type. Use LPO for a local purchase order sale or EXPORT for an export sale. See Types of Sales for an overview.

Allowed:
date
required

The sale date in YYYY-MM-DD format. The service rejects dates earlier than 29 days before or later than 29 days after the current time in Africa/Lusaka.

string
required

The sale currency code. See the Currency Code table for supported currencies. For a currency other than ZMW, provide a positive exchange_rate.

string

The customer's Zambia Taxpayer Identification Number (TPIN), exactly 10 digits when used. For non-export sales without customer_id, this is used to find or create the customer. Ignored for export sales.

string

The customer's name.

string

The customer's phone number. When customer_tpin is used to create a new customer, a supplied phone number must contain exactly 10 characters. Unlike the customer-creation endpoint, this endpoint does not normalize phone numbers.

string

The DigiTax ID of an existing customer. Required for LPO sales, where the customer must be registered as an LPO customer. For non-export sales, this customer is used instead of customer_tpin. Ignored for export sales.

string
required

The invoice reference from your system. It must be unique across sales, credit notes, and debit notes in the business, including failed transactions.

number

The exchange rate to ZMW. Required and greater than zero when currency_code is not ZMW.

string

The destination country code for an export sale. See the Country Codes table. It is required for EXPORT sales and must not be ZM.

string

The local purchase order number. Required for LPO sales.

string

The payment method code. See the Payment Type Codes table for codes 01 through 07; the API also supports 08 for bank transfer. Defaults to 01 when omitted or empty.

string

URL where DigiTax sends an HTTP POST callback with event sale.sync after the sale successfully syncs with ZRA. Failed syncs do not trigger this callback.

number

The sale-level discount rate, from 0 to 1. For example, 0.1 represents 10%. When both this rate and cash_discount_amount are nonzero, the amount must equal the sum of line totals times this rate.

number

The sale-level discount amount, in major currency units. When both this amount and cash_discount_rate are nonzero, they must agree. A nonzero sale-level discount rate or amount cannot be combined with a line that has both a nonzero discount_rate and discount_amount.

items
array of objects
required

The items included in the sale.

items*
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json