Scope requirements
Scope requirements
Create a payment link
To create a payment link, make aPOST request to /commerce/payment-links/2026-09-beta/payment-links.
The request body must include paymentLinkName and currencyCode. At least one line item is required, provided via lineItemObjectIds or the lineItems array.
The following example request body would create a simple payment link that accepts card payments in USD and includes a single line item:
- Example request
- Example response
Deal configurations
To create a deal in HubSpot when a buyer completes a purchase, include adealConfigurations object in the request body.
Additional form fields
To collect extra information from buyers at checkout, include anadditionalFormFields array. A buyer’s email is always collected by default and does not need to be specified.
Line item create modes
Instead of referencing existing line items vialineItemObjectIds, you can create line items inline by including a lineItems array. Each object in the array must include a mode field that determines how the line item is created. The supported modes are:
CUSTOM: creates a line item with fully custom values.FROM_PRODUCT: creates a line item based on a product in the HubSpot product library.CLONE: copies an existingLINE_ITEMCRM object, optionally overriding specific fields.
CUSTOM
UseCUSTOM to define a line item from scratch without referencing an existing product or line item.
FROM_PRODUCT
UseFROM_PRODUCT to create a line item based on a product in the HubSpot product library. The line item inherits the product’s name, price, and other properties, which can be overridden by including additional fields.
CLONE
UseCLONE to copy an existing LINE_ITEM CRM object. Any additional fields included alongside sourceLineItemId will override the corresponding values from the source line item.
Retrieve payment links
There are two ways to retrieve payment links via the API:- To retrieve all payment links, make a
GETrequest to/commerce/payment-links/2026-09-beta/payment-links - To retrieve a single payment link, make a
GETrequest to/commerce/payment-links/2026-09-beta/payment-links/{paymentLinkId}.
418872603783, your response would resemble the following:
Filtering
To filter results when retrieving all payment links, you can include the following query parameters to filter the results based on the date of creation or last update. All filter values are Unix timestamps in milliseconds.
For example, to retrieve payment links created between June 1 and July 1, 2026:
Sorting
By default, results are listed by create date in descending order. To sort results when retrieving all payment links, include thesort query parameter. This parameter accepts the following values:
createdAt-createdAt(descending)updatedAt-updatedAt(descending)
Update a payment link
To update a payment link, make aPATCH request to /commerce/payment-links/2026-09-beta/payment-links/{paymentLinkId}.
All fields are optional. Include only the fields you want to change. The response includes the full updated payment link object.
To explicitly clear a nullable field, set its value to null in the request body. The following fields support this: successUrl, descriptionHtml, dealConfigurations, domainId, and businessUnitId.
Delete a payment link
To delete a payment link, make aDELETE request to /commerce/payment-links/2026-09-beta/payment-links/{paymentLinkId}.
Deleting a payment link archives it permanently. Archived payment links are no longer accessible to buyers and are excluded from retrieve responses by default. A successful request returns 204 No Content.
You can retrieve deleted payment links by including the archived=true query parameter in the GET request.