Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size.
If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the Update Metafield endpoint.
Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The resource type to which the metafields belong.
Value in
The Advanced Billing id of the customer or the subscription for which the metadata applies
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/1/metadata.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "metadata": [ { "name": "Color", "value": "Blue" }, { "name": "Something", "value": "Useful" } ]}'