Skip to main content

Create a billing statement line item

Creates a billing statement line item resource.


Endpoint

POST /billing_statement_line_items

Sample code

const client = require('payrex-node')('insert your PayRex Secret API key.');

const billingStatementLineItem = await client.billingStatementLineItems.create({
billing_statement_id: '<ID of a billing statement resource>',
quantity: 1,
unit_price: 10000,
description: 'Product X'
});

Parameters

billing_statement_id REQUIRED

The ID of a billing statement resource. To learn more about the billing statement resource, refer here.


description REQUIRED

The description of the line item. It could be a product name or the service that you offer.


unit_price REQUIRED

The amount of the line item in a single unit.

This is a positive integer in the smallest currency unit, cents. If the line item should be ₱ 120.50, the amount should be 12050.


quantity REQUIRED

The quantity of the line item. The quantity will be multiplied by the line_item.amount to compute the final amount of the billing statement.

Returns

Returns a Billing Statement Line Item resource.