POST
/
v1
/
c
/
preferences
/
invoicing
curl --request POST \
  --url http://127.0.0.1:8080/v1/c/preferences/invoicing \
  --header 'Content-Type: application/json' \
  --header 'wb-key: <api-key>' \
  --data '{
  "automatic_payment": true,
  "due_date_policy": "start_of_period",
  "flat_fee_due_date_policy": "start_of_period",
  "invoice_trigger": "immediate",
  "usage_period_closing_policy": "automatic"
}'

Authorizations

wb-key
string
header
required

Body

application/json

Configuration of invoicing engine

Empty fields (i.e. as None) won't be changed

automatic_payment
boolean | null

Should invoice amount be charged automatically or not

due_date_policy
enum<string>

Determines when the due_date of the invoices should be set when created:

  • StartOfPeriod - invoices are due at the beginning of the billing period
  • EndOfPeriod - invoices are due at the end of the billing period
Available options:
start_of_period,
end_of_period
flat_fee_due_date_policy
enum<string>

Determines when the due_date of the invoices should be set when created:

  • StartOfPeriod - invoices are due at the beginning of the billing period
  • EndOfPeriod - invoices are due at the end of the billing period
Available options:
start_of_period,
end_of_period
invoice_trigger

When the invoices should be created

Note: EveryCycle and Periodic aren't yet supported, they will behave as Manual

Available options:
immediate
usage_period_closing_policy
enum<string>

Determines how usage period should be closed:

  • Automatic - usage period will be closed as soon as claim period ends
  • Manual - usage period will be open until closed manually
  • Delayed - automatic with delay after the claim period ends. Valid delays are 15 minutes, 1 hour, 1 day
Available options:
automatic,
manual,
15 minutes,
1 hour,
1 day