Skip to main content
POST
Apply Credit to Open Invoices

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_'.

id
string
required

The resource ID

Body

application/json
invoice_uuids
string[] | null

The invoice UUIDs to apply the credits to. If not provided, we apply the credits to open invoices one by one till the credits run out or there are no more open invoices. We start by applying the invoices to the oldest invoice.

Response

200 - application/json

OK

amount
object

The amount which has value in cents and a currency

coupon_id
null | string
created_at
string<date-time>
customer_id
string
expiration_date
null | string<date-time>
id
string
import_created_at_ref
null | string<date-time>
import_ref
null | string
imported_from
null | string
issued_amount
object

The amount which has value in cents and a currency

issued_units
number<double>
item
object
item_id
null | string
metric_record_id
null | string
name
string
one_time_billable_id
null | string
proration_date
null | string<date-time>
restricted_product_ids
string[] | null
state
string
subscription_id
null | string
type
string
units
number<double>