Create contract
Create a new contract in your HubSpot account using the CommerceContractsPublicApiService. This endpoint allows you to specify various contract details such as billing information, line items, and payment methods. The contract’s effective date, currency, and other required fields must be provided in the request body. Successful creation returns the URL of the newly created resource.
Supported products
Supported products
Required Scopes
Required Scopes
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
An object indicating whether automated taxes are enabled for the contract.
An object representing the billing address for the contract.
An object representing the ID of the billing company.
A string representing the ID of the billing contact.
An object representing an override for the billing start date.
A string representing the effective date of the contract, in date format.
A string representing the currency code for the contract.
An object representing the ID of the associated deal.
An object representing an external reference ID for the payment method.
A boolean indicating whether HubSpot billing is enabled for the contract.
An array of line items included in the contract, which can be custom, from a product, or cloned.
- CUSTOM
- FROM_PRODUCT
- CLONE
An object representing the locale settings for the contract.
A string representing the name of the contract.
An object representing the net payment terms for the contract.
An object representing the ID of the contract owner.
A boolean indicating whether payment is enabled for the contract.
An object representing the purchase order number associated with the contract.
An object representing the address of the seller's company.
An object representing the domain of the seller's company.
An object representing the name of the seller's company.
An object representing the email address of the seller.
An object representing the first name of the seller.
An object representing the last name of the seller.
An object representing the phone number of the seller.
An array specifying the types of addresses to collect, with possible values including 'BILLING_ADDRESS' and 'SHIPPING_ADDRESS'.
BILLING_ADDRESS, SHIPPING_ADDRESS An array specifying the allowed payment methods, with possible values including 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', and 'PADS'.
CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS A string indicating the collection process for payments, with possible values including 'MANUAL_PAYMENTS' and 'AUTOMATIC_PAYMENTS'.
AUTOMATIC_PAYMENTS, MANUAL_PAYMENTS An object containing custom properties for the contract, with each property being a key-value pair.
Response
successful operation
An array indicating the types of addresses to collect. Valid values include 'BILLING_ADDRESS' and 'SHIPPING_ADDRESS'.
BILLING_ADDRESS, SHIPPING_ADDRESS An array of allowed payment methods for the contract. Valid values include 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', and 'PADS'.
CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS Indicates whether automated taxes are enabled for the contract.
A map of custom property names to their values for the contract.
Indicates whether HubSpot billing is enabled for the contract.
The unique identifier for the contract.
An array of line items included in the contract.
Indicates whether payment is enabled for the contract.
The current status of the contract. Valid values include 'DRAFT', 'ACTIVE', 'PAUSED', 'COMPLETED', and 'TERMINATED'.
ACTIVE, COMPLETED, DRAFT, PAUSED, TERMINATED Indicates whether the payment method should be stored at checkout.
The name of the fee applied to all transactions.
The percentage fee applied to all transactions.
The annual value of the contract, represented as a number.
The unique identifier for the billing company associated with the contract.
The unique identifier for the billing contact associated with the contract.
An override for the billing start date, in YYYY-MM-DD format.
The name of the fee applied to card transactions.
The percentage fee applied to card transactions.
The process for collecting payments. Valid values include 'MANUAL_PAYMENTS' and 'AUTOMATIC_PAYMENTS'.
AUTOMATIC_PAYMENTS, MANUAL_PAYMENTS The effective date of the contract, in YYYY-MM-DD format.
The unique identifier for the source of the contract.
The date and time when the contract was created, in ISO 8601 format.
The currency code used for the contract, represented as a string.
The current annual recurring revenue for the contract, represented as a number.
The current monthly recurring revenue for the contract, represented as a number.
The unique identifier for the deal associated with the contract.
The name of the fee applied to direct debit transactions.
The percentage fee applied to direct debit transactions.
The discount code applied to the contract.
The end date of the contract, in YYYY-MM-DD format.
The external reference ID for the payment method used in the contract.
The language used for the contract.
The locale setting for the contract.
The name of the contract.
The net payment terms for the contract, represented as an integer.
The payment method used for the contract.
The purchase order number associated with the contract.
The value of the contract before termination, represented as a number.
The unique identifier for the renewal contract.
The renewal date of the contract, in YYYY-MM-DD format.
The name of the seller's company.
The email address of the seller.
The first name of the seller.
The last name of the seller.
The phone number of the seller.
The start date of the contract, in YYYY-MM-DD format.
The termination date of the contract, in YYYY-MM-DD format.
The total amount billed under the contract, represented as a number.
The total amount billed under the contract before tax, represented as a number.
The total fees collected under the contract, represented as a number.
The total taxes collected under the contract, represented as a number.
The total value of the contract, represented as a number.
The total amount paid under the contract, represented as a number.
The date and time when the contract was last updated, in ISO 8601 format.