Skip to main content
POST
/
v1
/
customers
Create a customer
curl --request POST \
  --url https://api.metronome.com/v1/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ingest_aliases": [
    "team@example.com"
  ],
  "name": "Example, Inc.",
  "customer_billing_provider_configurations": [
    {
      "billing_provider": "stripe",
      "delivery_method": "direct_to_billing_provider",
      "configuration": {
        "stripe_customer_id": "cus_123",
        "stripe_collection_method": "charge_automatically"
      }
    }
  ]
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
    "external_id": "team@example.com",
    "ingest_aliases": [
      "team@example.com"
    ],
    "name": "Aperture, Inc."
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The customer to create

name
string
required

This will be truncated to 160 characters if the provided name is longer.

ingest_aliases
string[]

Aliases that can be used to refer to this customer in usage events

Maximum length: 2000
external_id
string

(deprecated, use ingest_aliases instead) an alias that can be used to refer to this customer in usage events

Required string length: 1 - 128
customer_billing_provider_configurations
object[]
custom_fields
object

Custom fields to be added eg. { "key1": "value1", "key2": "value2" }

Response

Success

data
object
required