POST
/
billing-groups
curl -X POST \
 /billing-groups \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "customer": "ad3f4b3c-1b2a-4d5c-8e6f-7a8b9c0d1e2f",
    "name": "Billing of payments at the end of the month",
    "type": "end_of_month",
    "customDay": "31",
    "customMonth": "12"
}'
{
  "id": "01F9ZQZJZJQZJZJZJZJZJZJZJZ",
  "name": "Billing of payments at the end of the month",
  "type": "<any>",
  "customDay": 31,
  "customMonth": 12
}

Authorizations

Authorization
string
header
required

Value for the Authorization header parameter.

Body

The new BillingGroup resource
customer
string
required

The customer of the billing group.

Example:

"ad3f4b3c-1b2a-4d5c-8e6f-7a8b9c0d1e2f"

name
string
required

The name of the billing group.

Maximum length: 255
Example:

"Billing of payments at the end of the month"

type
enum<string>
required

The type of the billing group.

Available options:
start_of_month,
end_of_month,
start_of_year,
end_of_year,
custom
Example:

"end_of_month"

customDay
integer | null

The custom day of the billing group, only used when type is "custom".

Required range: 0 < x <= 31
Example:

31

customMonth
integer | null

The custom month of the billing group, only used when type is "custom".

Required range: 0 < x <= 12
Example:

12

Response

201
application/json
BillingGroup resource created
name
string
required

The name of the billing group.

Maximum length: 255
Example:

"Billing of payments at the end of the month"

type
any
required

The type of the billing group.

Possible values:

  • start_of_month: The billing group will be charged on the first day of the month.
  • end_of_month: The billing group will be charged on the last day of the month.
  • start_of_year: The billing group will be charged on the first day of the year.
  • end_of_year: The billing group will be charged on the last day of the year.
  • custom: The billing group will be charged on a custom day of the month.
id
string
Example:

"01F9ZQZJZJQZJZJZJZJZJZJZJZ"

customDay
integer | null

The custom day of the billing group, only used when type is "custom".

Required range: 0 < x <= 31
Example:

31

customMonth
integer | null

The custom month of the billing group, only used when type is "custom".

Required range: 0 < x <= 12
Example:

12