v1

latestOpenAPI 3.1.02026-07-261444991.2 MB
Customer

Create customer

This operation is used to create an Orb customer, who is party to the core billing relationship. See Customer for an overview of the customer resource.

This endpoint is critical in the following Orb functionality:

  • Automated charges can be configured by setting payment_provider and payment_provider_id to automatically issue invoices
  • Customer ID Aliases can be configured by setting external_customer_id
  • Timezone localization can be configured on a per-customer basis by setting the timezone parameter
post/customers

Request body

metadataobject nullable

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

namestring required

The full name of the customer

emailstring email required

A valid customer email, to be used for notifications. When Orb triggers payment through a payment gateway, this email will be used for any automatically issued receipts.

timezonestring nullable

A timezone identifier from the IANA timezone database, such as "America/Los_Angeles". This defaults to your account's timezone if not set. This cannot be changed after customer creation.

external_customer_idstring nullable

An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer. Use this field to identify a customer by an existing identifier in your system.

payment_provider_idstring nullable

The ID of this customer in an external payments solution, such as Stripe. This is used for creating charges or invoices in the external system via Orb.

payment_provider'quickbooks' | 'bill.com' | 'stripe_charge' | 'stripe_invoice' | 'netsuite' | 'adyen' nullable

This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.

currencystring nullable

An ISO 4217 currency string used for the customer's invoices and balance. If not set at creation time, will be set at subscription creation time.

auto_collectionboolean nullable

Used to determine if invoices for this customer will automatically attempt to charge a saved payment method, if available. This parameter defaults to True when a payment provider is provided on customer creation.

auto_issuanceboolean nullable

Used to determine if invoices for this customer will be automatically issued. If true, invoices will be automatically issued. If false, invoices will require manual approval. If null is specified, the customer's auto issuance setting will be inherited from the account-level setting.

email_deliveryboolean nullable
additional_emailsstring[] nullable

Additional email addresses for this customer. If populated, these email addresses will be CC'd for customer communications. The total number of email addresses (including the primary email) cannot exceed 50.

Response

Created

metadataobject required

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

idstring required
external_customer_idstring nullable required

An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer. Use this field to identify a customer by an existing identifier in your system.

namestring required

The full name of the customer

emailstring required

A valid customer email, to be used for notifications. When Orb triggers payment through a payment gateway, this email will be used for any automatically issued receipts.

timezonestring required

A timezone identifier from the IANA timezone database, such as "America/Los_Angeles". This "defaults to your account's timezone if not set. This cannot be changed after customer creation.

payment_provider_idstring nullable required

The ID of this customer in an external payments solution, such as Stripe. This is used for creating charges or invoices in the external system via Orb.

payment_provider'quickbooks' | 'bill.com' | 'stripe_charge' | 'stripe_invoice' | 'netsuite' | 'adyen' nullable required

This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.

created_atstring date-time required
balancestring required

The customer's current balance in their currency.

currencystring nullable required
auto_collectionboolean required
exempt_from_automated_taxboolean nullable required
email_deliveryboolean required
auto_issuanceboolean nullable required

Whether invoices for this customer should be automatically issued. If true, invoices will be automatically issued. If false, invoices will require manual approval. If null, inherits the account-level setting.

additional_emailsstring[] required
portal_urlstring nullable required

Deprecated. Returns the URL of the most recent non-expired portal link, or null. When the account has opted into customer portal sessions, this field always returns null. Use POST /v1/customers/{id}/portal_sessions to mint short-lived portal session URLs.

automatic_tax_enabledboolean nullable

Whether automatic tax calculation is enabled for this customer. This field is nullable for backwards compatibility but will always return a boolean value.