Create Rate Card
client.rateCards.create(RateCardCreateParams { billing_interval, name, description, 3 more } body, RequestOptionsoptions?): RateCardResource { id, billing_interval, created_at, 6 more }
/rate-cards
Create Rate Card
Parameters
Returns
Create Rate Card
import Lark from 'lark-billing';
const client = new Lark({
apiKey: 'My API Key',
});
const rateCardResource = await client.rateCards.create({
billing_interval: 'monthly',
name: 'Pro Plan',
description: 'For production applicatidddons with moderate usage.',
fixed_rates: [
{ name: 'Base Rate', price: { price_type: 'flat', amount: { value: 2500, currency_code: 'usd' } } },
],
metadata: {},
usage_based_rates: [
{
usage_based_rate_type: 'simple',
name: 'Compute Hours',
price: { price_type: 'flat', amount: { value: 100, currency_code: 'usd' } },
included_units: 30,
pricing_metric_id: 'pmtr_GlX5Tcm2HOn00CoRTFxw2Amw',
},
],
});
console.log(rateCardResource.id);
{
"id": "rc_jQK2n0wutCj6bBcAIrL6o07g",
"billing_interval": "monthly",
"created_at": "2025-11-01T00:00:00Z",
"fixed_rates": [
{
"id": "fr_04EjnYJoQLC7gtLKI6mPzZny",
"description": "description",
"name": "Base Rate",
"price": {
"amount": {
"currency_code": "usd",
"value": "2500"
},
"price_type": "flat"
}
}
],
"metadata": {},
"name": "Pro Plan",
"updated_at": "2025-11-01T00:00:00Z",
"usage_based_rates": [
{
"id": "ubr_zoXOJrDXlGGJWRNq3HqFYhbP",
"description": "description",
"included_units": 30,
"name": "Compute Hours",
"price": {
"amount": {
"currency_code": "usd",
"value": "100"
},
"price_type": "flat"
},
"pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"usage_based_rate_type": "simple"
}
],
"description": "For production applications with moderate usage."
}Returns Examples
{
"id": "rc_jQK2n0wutCj6bBcAIrL6o07g",
"billing_interval": "monthly",
"created_at": "2025-11-01T00:00:00Z",
"fixed_rates": [
{
"id": "fr_04EjnYJoQLC7gtLKI6mPzZny",
"description": "description",
"name": "Base Rate",
"price": {
"amount": {
"currency_code": "usd",
"value": "2500"
},
"price_type": "flat"
}
}
],
"metadata": {},
"name": "Pro Plan",
"updated_at": "2025-11-01T00:00:00Z",
"usage_based_rates": [
{
"id": "ubr_zoXOJrDXlGGJWRNq3HqFYhbP",
"description": "description",
"included_units": 30,
"name": "Compute Hours",
"price": {
"amount": {
"currency_code": "usd",
"value": "100"
},
"price_type": "flat"
},
"pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"usage_based_rate_type": "simple"
}
],
"description": "For production applications with moderate usage."
}