Create an account
Creates a customer account with a payment method, a bill-to contact, and optional sold-to and ship-to contacts. Request and response field descriptions and sample code are provided. Use this operation to optionally create a subscription, invoice for that subscription, and collect payment through the default payment method. The transaction is atomic; if any part fails for any reason, the entire transaction is rolled back.
This operation is CORS Enabled, so you can use client-side Javascript to invoke the call.
Notes
- The account is created in active status.
- If the autoPay field is set to true in the request, you must provide one of the paymentMethod, creditCard, or hpmCreditCardPaymentMethodId field, but not multiple. The one provided becomes the default payment method for this account. If the credit card information is declined or cannot be verified, no account is created.
- Customer accounts created with this call are automatically be set to Auto Pay.
- If the invoiceDeliveryPrefsEmail field is not specified in the request, the account's email delivery preference is always automatically set to false, no matter whether the workEmail or personalEmail field is specified.
Defaults for customerAcceptanceDate and serviceActivationDate
Default values for customerAcceptanceDate and serviceActivationDate are set as follows.
| serviceActivationDate(SA) specified | serviceActivationDate (SA) NOT specified | |
|---|---|---|
| customerAcceptanceDate (CA) specified | SA uses value in the request call; CA uses value in the request call | CA uses value in the request call;SA uses CE as default |
| customerAcceptanceDate (CA) NOT specified | SA uses value in the request call; CA uses SA as default | SA and CA use CE as default |
This call supports a subset of the functionality of our Create an order call. For use cases where you create a subscription and a billing account at the same time, we recommend using "Create an order" instead of this call. The Orders call has the following advantages:
- Provides options for managing the entire subscription lifecycle from creation through to cancellation using different order actions.
- Allows the creation or modifying of multiple subscriptions in a single order.
- Allows a single order to combine both recurring subscription digital goods or services with order line items for physical goods.
- Orders are treated as atomic transactions. If any part fails, the entire order, subscription, and billing account creation are rolled back.
You should use this call if you need to create a standalone billing account, and create orders, subscriptions, standalone invoices, or dynamic usage charges later. There are no deprecation plans for this call and we will continue to support this call for existing users.
Headers
Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.
With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.
If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.
Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.
The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').
An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
Comma separated IDs. If you have <a href="https://docs.zuora.com/en/zuora-platform/organization-and-entity-management/multi-org/overview-of-multi-org" target="_blank">Zuora Multi-Org</a> enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.
The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
The minor API version.
For a list of available minor versions, see API upgrades.
Request body
Example request
{
"name": "Amy Lawrence",
"billToContact": {
"firstName": "Amy",
"lastName": "Lawrence",
"country": "United States",
"state": "CA"
},
"autoPay": false,
"currency": "USD",
"billCycleDay": 1
}Response
OK
Changes
Changed in 1 of the 4 revisions of this API.2
- ●
removed the request property
allOf[subschema #1]/communicationProfileNamerequest-property-removed
- ●
removed the request property
allOf[subschema #1]/sequenceSetNamerequest-property-removed
- ●