POST /v1/accounts
Creates a customer account with a payment method, a bill-to contact, and an optional sold-to contact. 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 totrue
in the request, you must provide one of thepaymentMethod
,creditCard
, orhpmCreditCardPaymentMethodId
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 tofalse
, no matter whether theworkEmail
orpersonalEmail
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 |
Servers
- https://rest.test.zuora.com
- https://rest.sandbox.na.zuora.com
- https://rest.apisandbox.zuora.com
- https://rest.na.zuora.com
- https://rest.zuora.com
- https://rest.test.eu.zuora.com
- https://rest.sandbox.eu.zuora.com
- https://rest.eu.zuora.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Content-Encoding |
String | No |
Include the |
Zuora-Track-Id |
String | No |
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 ( |
zuora-version |
String | No |
The minor version of the Zuora REST API. You only need to set this parameter if you use the following fields:
|
Authorization |
String | No |
The value is in the |
Idempotency-Key |
String | No |
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. |
Zuora-Entity-Ids |
String | No |
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 do not need to set this header. |
Zuora-Org-Ids |
String | No |
Comma separated IDs. If you have Zuora Multi-Org 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. If the header is not set, the operation is performed in scope of the user's accessible orgs. |
Accept-Encoding |
String | No |
Include the If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
paymentMethod |
Object | No |
Payment method information associated with an account. |
creditMemoTemplateId |
String | No |
Note: This field is only available if you have Invoice Settlement enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information. The unique ID of the credit memo template, configured in Billing Settings > Manage Billing Document Configuration through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b. |
soldToSameAsBillTo |
Boolean | No |
Whether the sold-to contact and bill-to contact are the same entity. The created account has the same bill-to contact and sold-to contact entity only when all the following conditions are met in the request body:
|
billCycleDay |
Integer | No |
The account's bill cycle day (BCD), when bill runs generate invoices for the account. Specify any day of the month (1-31, where 31 = end-of-month), or 0 for auto-set. Required if no subscription will be created. Optional if a subscription is created and defaults to the day-of-the-month of the subscription's |
collect |
Boolean | No |
Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account. If the value is Prerequisite: The Note: This field is only available if you set the Default value: true |
sequenceSetId |
String | No |
The ID of the billing document sequence set to assign to the customer account. The billing documents to generate for this account will adopt the prefix and starting document number configured in the sequence set. If a customer account has no assigned billing document sequence set, billing documents generated for this account adopt the prefix and starting document number from the default sequence set. |
runBilling |
Boolean | No |
Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the invoice and credit memo generation rule. The billing documents generated in this operation is only for this subscription, not for the entire customer account. Possible values:
Note: This field is in Zuora REST API version control. Supported
minor versions are Possible values:
Default value: true |
currency |
String | Yes |
A currency as defined in Billing Settings in the Zuora UI. For payment method authorization, if the |
SynctoNetSuite__NS |
String | No |
Specifies whether the account should be synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. Possible values:
|
Class__NS |
String | No |
Value of the Class field for the corresponding customer account in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
parentId |
String | No |
Identifier of the parent customer account for this Account object. The length is 32 characters. Use this field if you have Customer Hierarchy enabled. |
SyncDate__NS |
String | No |
Date when the account was sychronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
salesRep |
String | No |
The name of the sales representative associated with this account, if applicable. Maximum of 50 characters. |
creditMemoReasonCode |
String | No |
A code identifying the reason for the credit memo transaction that is generated by the request. The value must be an existing reason code. If you do not pass the field or pass the field with empty value, Zuora uses the default reason code. |
invoiceDeliveryPrefsPrint |
Boolean | No |
Whether the customer wants to receive printed invoices, such as through postal mail. Default value: false |
autoPay |
Boolean | No |
Whether future payments are to be automatically billed when they are due.
|
additionalEmailAddresses[] |
Array | No |
A list of additional email addresses to receive email notifications. Use commas to separate email addresses. |
organizationLabel |
String | No |
Name of the organization that the account belongs to. This field is only required when you have already turned on Multi-Org feature. |
tagging |
String | No | |
IntegrationStatus__NS |
String | No |
Status of the account's synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
IntegrationId__NS |
String | No |
ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
invoiceDeliveryPrefsEmail |
Boolean | No |
Whether the customer wants to receive invoices through email. Default value: false |
crmId |
String | No |
CRM account ID for the account, up to 100 characters. |
Department__NS |
String | No |
Value of the Department field for the corresponding customer account in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
paymentTerm |
String | No |
Payment terms for this account. Possible values are: Note: If you want to specify a payment term when creating a new account, you must set a value in this field. If you do not set a value in this field, Zuora will use |
applyCredit |
Boolean | No |
Whether to automatically apply credit memos or unapplied payments, or both to an invoice. If the value is Note: This field is only available if you have Invoice Settlement enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information. |
invoiceTemplateId |
String | No |
Invoice template ID, configured in Billing Settings in the Zuora UI. |
hpmCreditCardPaymentMethodId |
String | No |
The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account. If the For the Credit Card Reference Transaction payment method, you can specify the payment method ID in this field or use the |
CustomerType__NS |
String | No |
Value of the Customer Type field for the corresponding customer account in NetSuite. The Customer Type field is used when the customer account is created in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. Possible values:
|
targetDate |
String | No |
Date through which to calculate charges if an invoice or a credit memo is generated, as yyyy-mm-dd. Default is current date. Note: The credit memo is only available only if you have the Invoice Settlement feature enabled. This field is in Zuora REST API version control. Supported minor versions are |
partnerAccount |
Boolean | No |
Whether the customer account is a partner, distributor, or reseller. You can set this field to Note: This field is available only if you have the Reseller Account feature enabled. Default value: false |
accountNumber |
String | No |
A unique account number, up to 50 characters that do not begin with the default account number prefix. If no account number is specified, one is generated. |
paymentGateway |
String | No |
The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway. |
applyCreditBalance |
Boolean | No |
Applies a credit balance to an invoice. If the value is Prerequisite: To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method. Note:
|
debitMemoTemplateId |
String | No |
Note: This field is only available if you have Invoice Settlement enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information. The unique ID of the debit memo template, configured in Billing Settings > Manage Billing Document Configuration through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2. |
name |
String | Yes |
Account name, up to 255 characters. |
communicationProfileId |
String | No |
The ID of the communication profile that this account is linked to. You can provide either or both of the If both are provided, the request will fail if they do not refer to the same communication profile. |
invoice |
Boolean | No |
Note: This field has been replaced by the Creates an invoice for a subscription. The invoice generated in this operation is only for this subscription, not for the entire customer account. If the value is Note: This field is only available if you set the Default value: true |
notes |
String | No |
A string of up to 65,535 characters. |
documentDate |
String | No |
The date of the billing document, in
|
taxInfo |
Object | No |
Container for tax exempt information, used to establish the tax exempt status of a customer account. |
taxInfo.exemptCertificateType |
String | No |
Type of tax exemption certificate that the customer holds. Requires Zuora Tax. |
taxInfo.VATId |
String | No |
EU Value Added Tax ID. Note: This feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. |
taxInfo.exemptCertificateId |
String | No |
ID of the customer tax exemption certificate. Requires Zuora Tax. |
taxInfo.companyCode |
String | No |
Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara. Note: This feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. |
taxInfo.exemptIssuingJurisdiction |
String | No |
Jurisdiction in which the customer tax exemption certificate was issued. |
taxInfo.exemptStatus |
String | No |
Status of the account tax exemption. Requires Zuora Tax. Required if you use Zuora Tax. This field is unavailable if Zuora Tax is not used. Values: |
taxInfo.exemptDescription |
String | No |
Description of the tax exemption certificate that the customer holds. Requires Zuora Tax. |
taxInfo.exemptEffectiveDate |
String | No |
Date when the customer tax exemption starts. Requires Zuora Tax. Format: |
taxInfo.exemptEntityUseCode |
String | No |
A unique entity use code to apply exemptions in Avalara AvaTax. This account-level field is required only when you choose Avalara as your tax engine. See Exempt Transactionsfor more details. |
taxInfo.exemptExpirationDate |
String | No |
Date when the customer tax exemption expires. Requires Zuora Tax. Format: |
profileNumber |
String | No |
The number of the communication profile that this account is linked to. You can provide either or both of the If both are provided, the request will fail if they do not refer to the same communication profile. |
Location__NS |
String | No |
Value of the Location field for the corresponding customer account in NetSuite. Only available if you have installed the Zuora Connector for NetSuite. |
applicationOrder[] |
Array | No |
The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: Note:
|
invoiceTargetDate |
String | No |
Note: This field has been replaced by the Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date. This field is in REST API minor version control. To use this field in
the method, you can set the |
batch |
String | No |
The alias name given to a batch. A string of 50 characters or less. Note: By default, you have 50 configurable account batches. To increase the limit to 200 batches, you must have the Performance Booster Elite package. |
invoiceCollect |
Boolean | No |
Note: This field has been replaced by the If this field is set to Note: This field is only available if you set the |
Subsidiary__NS |
String | No |
Value of the Subsidiary field for the corresponding customer account in NetSuite. The Subsidiary field is required if you use NetSuite OneWorld. Only available if you have installed the Zuora Connector for NetSuite. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.