Create contract
Create a new contract in your HubSpot account using the Commerce Contracts API. This endpoint allows you to specify various contract details, including billing information, line items, and payment methods. The contract’s effective date and currency code are required, along with other essential details. This operation returns the URL of the newly created contract resource upon successful creation.
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 the external payment method reference ID.
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 for 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 of address types to collect, which can include 'BILLING_ADDRESS' and 'SHIPPING_ADDRESS'.
BILLING_ADDRESS, SHIPPING_ADDRESS An array of allowed payment methods for the contract, such as 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', 'PADS', 'AFFIRM', and 'KLARNA'.
CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS, AFFIRM, KLARNA A string representing the ID of the business unit associated with the contract.
A string indicating the collection process for the contract, which can be 'MANUAL_PAYMENTS' or 'AUTOMATIC_PAYMENTS'.
AUTOMATIC_PAYMENTS, MANUAL_PAYMENTS An object containing custom properties for the contract, with string values.
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. Valid values include 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', 'PADS', 'AFFIRM', and 'KLARNA'.
CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS, AFFIRM, KLARNA Indicates whether automated taxes are enabled for the contract.
A map of custom property names to their values.
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 of the fee applied to all transactions.
The annual value of the contract.
The unique identifier of the billing company associated with the contract.
The unique identifier of the billing contact associated with the contract.
The date to override the billing start date, in ISO 8601 format.
The unique identifier of the business unit associated with the contract.
The name of the fee applied to card transactions.
The percentage of the fee applied to card transactions.
The process for collecting payments. Valid values include 'MANUAL_PAYMENTS' and 'AUTOMATIC_PAYMENTS'.
AUTOMATIC_PAYMENTS, MANUAL_PAYMENTS The date when the contract becomes effective, in ISO 8601 format.
The unique identifier of the source of the contract.
The date and time when the contract was created, in ISO 8601 format.
The currency code associated with the contract, represented as a string.
The current annual recurring revenue for the contract.
The current monthly recurring revenue for the contract.
The unique identifier of the deal associated with the contract.
The name of the fee applied to direct debit transactions.
The percentage of the fee applied to direct debit transactions.
The discount code applied to the contract.
The end date of the contract, in ISO 8601 format.
The external reference ID for the payment method.
The language associated with the contract.
The locale associated with 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.
The unique identifier of the renewal contract.
The date when the contract is set to renew, in ISO 8601 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 ISO 8601 format.
The date when the contract is terminated, in ISO 8601 format.
The total amount billed under the contract.
The total amount billed under the contract before tax.
The total amount of fees collected under the contract.
The total amount of taxes collected under the contract.
The total value of the contract.
The total amount paid under the contract.
The date and time when the contract was last updated, in ISO 8601 format.