Create Payment Term
POST/api/payment-terms
Creates a new payment term.
settings:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Fields:
- name (required, string, max:255, unique)
- net_days (required, integer, 0-365)
- discount_percentage (optional, numeric, 0-100)
- discount_days (optional, integer >= 0; must be less than net_days for types: from_invoice_date, end_of_month, day_of_month)
- due_date_type (required): immediate | from_invoice_date | end_of_month | end_of_next_month | day_of_month
- description (optional, string, max:500)
- is_default (optional, boolean)
- applies_to (optional): purchasing | sales | both (default: both). Which side of the business can select the term — purchasing (suppliers, purchase orders, bills), sales (customers, sales orders), or both. Terms using purchasing-only features (a vendor deposit schedule, consignment, or treat_as_purchase) must keep applies_to = purchasing.
- is_default_sales (optional, boolean): marks the term as the account-wide default for sales orders, used when a customer has no default term of their own. Only one term can hold the flag — setting it clears it from any other term.
Vendor Deposit Schedule (optional, array):
- vendor_deposit_schedule.*.label (optional, string)
- vendor_deposit_schedule.*.amount_mode (optional): percent | fixed
- vendor_deposit_schedule.*.percentage (numeric, 0-100)
- vendor_deposit_schedule.*.fixed_amount (optional, numeric)
- vendor_deposit_schedule.*.settlement_type (optional): vendor_deposit | final_invoice_balance. A schedule may carry several final_invoice_balance lines — they become the goods invoice's installment tranches, each dated by its own trigger + offset, and the bill's due date tracks the earliest tranche still owed
- vendor_deposit_schedule.*.trigger_event (required): manual | po_approved | po_shipped | po_fully_shipped | po_received | po_fully_received | logistics_tracking_field | invoice_date.
invoice_date("Bill Date") is accepted only on a final_invoice_balance line, and never together with per_shipment: true or a shipment_date_basis — a bill on such a term is due its own bill date plus offset_days, with no shipment link or purchase-order event needed, e.g.{"label": "Balance net 30 from bill date", "settlement_type": "final_invoice_balance", "trigger_event": "invoice_date", "offset_days": 30}. Violations return 422 with "Milestone N: Bill Date applies only to Final Goods Invoice milestones.", "Milestone N cannot repeat per shipment when it dates from the bill." or "Milestone N cannot set a shipment date basis when it dates from the bill." (N is the line's 1-based position) - vendor_deposit_schedule.*.offset_days (optional, integer, nullable)
- vendor_deposit_schedule.*.per_shipment (optional, boolean): repeat this milestone per shipment (prorated). Requires a per-shipment-capable trigger_event and a shipment_date_basis. Also allowed on the final_invoice_balance line — each shipment's goods invoice then derives its own due date from its linked shipment (projected from the shipment ETA until received)
- vendor_deposit_schedule.*.shipment_date_basis (optional): dispatched | planned_etd | actual_dispatched | received_at
- vendor_deposit_schedule.*.is_ownership_transfer (optional, boolean) — only one line per schedule may be true
- vendor_deposit_schedule.*.logistics_tracking_field_id (optional, integer, exists:logistics_tracking_fields,id) — REQUIRED when trigger_event is logistics_tracking_field
Requires permission: payment_terms.create
Consignment fields: set is_consignment to true to mark the term as consignment (supplier-owned stock billed as it sells). consignment_settlement_frequency controls how often consigned sales are settled (on_demand, weekly, biweekly, monthly, quarterly). treat_as_purchase overrides consignment so goods received on this term are capitalized as owned inventory immediately at receipt (substance-over-form).
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.