Skip to main content
POST
Create One-Time Charges V2

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

The company ID with the prefix 'cmp_'.

Body

application/json
customer_id
string
required

The customer to whom the one-time charges belong

onetime_items
object[]
required

The list of one-time charges

type
enum<string>
required

The type of one-time charges which can be IMMEDIATE or NEXT depending on whether they are invoiced immediately or on the next invoice for the customer

Available options:
IMMEDIATE,
NEXT
auto_charges
null | boolean

Whether the one-time charges are automatically charged to the payment method for the customer

discounts
object[] | null

The discounts attached to the one-time charges

invoice_date
null | string<date-time>

The date of invoice for the customer

invoice_due_date_from_creation
null | integer

Number of days before the invoice is due (from the invoice date)

Required range: x >= 0
invoice_payment_instructions
string | null

The payment instructions for the customer

metadata
object

Any additional data as key-value pairs attached to the charge

notes
null | string

The notes attached to the one-time charges

parent_billed
null | boolean

Whether the invoice should be billed to the parent customer instead of the customer directly

Response

201 - application/json

Created

one_time_charges
object[] | null