Add Charge
Add a one time charge
client.v1.customers.invoices.addCharge(InvoiceAddChargeParamsparams, RequestOptionsoptions?): InvoiceAddChargeResponse
post/v1/customers/{customer_id}/addCharge
Add a one time charge to the specified invoice
Parameters
paramscustomer_idstringcharge_idstringcustomer_plan_idstringdescriptionstringinvoice_start_timestampstringpricenumberquantitynumberInvoiceAddChargeParams
Returns
InvoiceAddChargeResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
const response = await client.v1.customers.invoices.addCharge({
customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
charge_id: '5ae4b726-1ebe-439c-9190-9831760ba195',
customer_plan_id: 'a23b3cf4-47fb-4c3f-bb3d-9e64f7704015',
description: 'One time charge',
invoice_start_timestamp: '2024-01-01T00:00:00Z',
price: 250,
quantity: 1,
});
console.log(response);
200 Example
{}