Attributes
- idstring
Unique identifier for the object.
- objectstring, value is "v2.billing.custom_pricing_unit"
String representing the object’s type. Objects of the same type share the same value of the object field.
- activeboolean
Whether the custom pricing unit is active.
- createdtimestamp
Timestamp of when the object was created.
- display_
namestring Description that customers will see in the invoice line item. Maximum length of 10 characters.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - lookup_
keynullable string An internal key you can use to search for a particular Custom Pricing Unit. Maximum length of 200 characters.
- metadatanullable map
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
{ "created": "2025-01-01T00:00:00.000Z", "display_name": "Unit #1", "id": "cpu_61T4sQA90ELFdWUhl16Ss95I3tSQSib3S1PC0IDCSFCS", "lookup_key": "my-custom-pricing-unit-1", "metadata": {}, "object": "v2.billing.custom_pricing_unit", "livemode": true}
Create a Custom Pricing Unit object.
Learn more about calling API v2 endpoints.Parameters
- display_
namestringRequired Description that customers will see in the invoice line item. Maximum length of 10 characters.
- lookup_
keystring An internal key you can use to search for a particular custom pricing unit item. Must be unique among items. Maximum length of 200 characters.
- metadatamap
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Returns
Response attributes
- idstring
Unique identifier for the object.
- objectstring, value is "v2.billing.custom_pricing_unit"
String representing the object’s type. Objects of the same type share the same value of the object field.
- activeboolean
Whether the custom pricing unit is active.
- createdtimestamp
Timestamp of when the object was created.
- display_
namestring Description that customers will see in the invoice line item. Maximum length of 10 characters.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - lookup_
keynullable string An internal key you can use to search for a particular Custom Pricing Unit. Maximum length of 200 characters.
- metadatanullable map
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Returned when another object of the same type already has the given lookup key.
{ "active": true, "created": "2025-01-01T00:00:00.000Z", "display_name": "Unit #1", "id": "cpu_61T4sQA90ELFdWUhl16Ss95I3tSQSib3S1PC0IDCSFCS", "lookup_key": "my-custom-pricing-unit-1", "metadata": { "key": "value" }, "object": "v2.billing.custom_pricing_unit", "livemode": true}
Update a Custom Pricing Unit object.
Learn more about calling API v2 endpoints.Parameters
- idstringRequired
The ID of the Custom Pricing Unit to update.
- activeboolean
Whether the Custom Pricing Unit is active.
- display_
namestring Description that customers will see in the invoice line item.
- lookup_
keystring An internal key you can use to search for a particular CustomPricingUnit item.
- metadatamap
Set of key-value pairs that you can attach to an object.
Returns
Response attributes
- idstring
Unique identifier for the object.
- objectstring, value is "v2.billing.custom_pricing_unit"
String representing the object’s type. Objects of the same type share the same value of the object field.
- activeboolean
Whether the custom pricing unit is active.
- createdtimestamp
Timestamp of when the object was created.
- display_
namestring Description that customers will see in the invoice line item. Maximum length of 10 characters.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - lookup_
keynullable string An internal key you can use to search for a particular Custom Pricing Unit. Maximum length of 200 characters.
- metadatanullable map
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Returned by CustomPricingUnit API when the custom pricing unit is not found.
{ "active": true, "created": "2025-01-01T00:00:00.000Z", "display_name": "Unit #1", "id": "cpu_61T4sQA90ELFdWUhl16Ss95I3tSQSib3S1PC0IDCSFCS", "lookup_key": "my-custom-pricing-unit-1", "metadata": {}, "object": "v2.billing.custom_pricing_unit", "livemode": true}
Retrieve a Custom Pricing Unit object.
Learn more about calling API v2 endpoints.Parameters
- idstringRequired
The ID of the Custom Pricing Unit to retrieve.
Returns
Response attributes
- idstring
Unique identifier for the object.
- objectstring, value is "v2.billing.custom_pricing_unit"
String representing the object’s type. Objects of the same type share the same value of the object field.
- activeboolean
Whether the custom pricing unit is active.
- createdtimestamp
Timestamp of when the object was created.
- display_
namestring Description that customers will see in the invoice line item. Maximum length of 10 characters.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - lookup_
keynullable string An internal key you can use to search for a particular Custom Pricing Unit. Maximum length of 200 characters.
- metadatanullable map
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Returned by CustomPricingUnit API when the custom pricing unit is not found.
{ "active": true, "created": "2025-01-01T00:00:00.000Z", "display_name": "Unit #1", "id": "cpu_61T4sQA90ELFdWUhl16Ss95I3tSQSib3S1PC0IDCSFCS", "lookup_key": "my-custom-pricing-unit-1", "metadata": {}, "object": "v2.billing.custom_pricing_unit", "livemode": true}