netsuite_customer_id
on the Metronome customer object. This field enables a user to query the customer object and determine the foreign key mapping between the two systems.
The next example walks through how to associate a line item to a product ID (or SKU) in Stripe by adding a custom field called stripe_product_id
to the Metronome product.
/customFields/addKey
. The endpoint takes three parameters, all required:
entity
key
enforce_uniqueness
/customFields/setValues
. The endpoint takes three parameters, all required:
entity
entity_id
custom_fields
custom_fields
parameter accepts an array of key-value pairs, allowing you to set multiple custom field values—on a single entity instance—in one API call.
This request updates a specific product, adding the corresponding stripe_product_id
value:
/createContract
endpoint.
stripe_product_id
custom field propagates to its associated line item. This mapping enables Metronome to link line items to Stripe products when creating invoices in Stripe. Here’s an example invoice payload: