Skip to navigation

Create a new order

Creates a new order for the organization. If draft pricing cannot be confirmed, returns 503 BILLING_UNAVAILABLE only after deleting the new draft. A retained draft returns 409 ORDER_RETAINED with its order id and externalId in details. Retrieve that order and check its state instead of repeating creation.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Request

Body
customerIdstringRequired
billingCustomerIdstringOptional
billingContactIdslist of stringsOptional
namestringOptional
startDatedatetimeOptional
endDatedatetimeOptional
subscriptionTermsintegerOptional
creationStateenumOptional
Allowed values:
billingAnchorintegerOptional1-31

Day of month for billing anchor (1-31). Defaults to start date day if not provided.

paymentTermsenumOptional
externalIdstringOptional
metadatamap from strings to anyOptional
currencystringOptional
autoPostInvoicesbooleanOptional
autoSendBillingEmailsbooleanOptional
autoSendPaymentEmailsbooleanOptional
lineslist of objectsOptional
billingFrequencyOverrideobjectOptional
purchaseOrderReferencestring or nullOptional
Purchase order number printed on invoices generated from this order.

Response

201
idstring
customerIdstring
billingCustomerIdstring or null
billingContactIdslist of strings
createdAtdatetime
updatedAtdatetime
endDatedatetime or null
namestring
startDatedatetime
subscriptionTermsinteger or null
currencystring

Three-letter ISO currency code of the order’s amounts.

currencyDecimalsinteger

Decimals of this order’s amounts, from the currency and how Paid stores it: 2 for USD (4999 is $49.99); 2 for JPY, which Paid stores in hundredths of a yen (150000 is ¥1,500). Divide amounts by 10^currencyDecimals; never assume 100.

billedAmountNoTaxdouble
billedTaxdouble
estimatedTaxdouble
orderAmountdouble
pendingBillingAmountdouble
totalAmountdouble
totalBilledAmountdouble
creationStateenum
Allowed values:
paymentTermsstring or null
numberdouble
metadatamap from strings to any or null
showBankDetailsboolean or null
autoPostInvoicesboolean or null
autoSendBillingEmailsboolean or null
autoSendPaymentEmailsboolean or null
versioninteger
billingFrequencyOverriddenboolean
purchaseOrderReferencestring or null
billingFrequencyOverrideobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error