HubSpot: Update a payment link
HubSpot paymentLinks.updatePaymentLink: arguments, response, policy and SDK examples.
← Payment links operations · Get started
Operation hubspot.payment_links_update_payment_link
Provider route: PATCH /commerce/payment-links/2026-09/payment-links/{paymentLinkId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["paymentLinks"]["updatePaymentLink"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.paymentLinks.updatePaymentLink(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.payment_links.update_payment_link(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.paymentLinkId | string | Required within parent | |
body | Model | Required within parent | Expand Update a payment link — request body — body |
Referenced models: Update a payment link — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create a payment link — response body |
Referenced models: Create a payment link — response body
Schemas
Section titled “Schemas”15 more schemas are linked from the tables above, on the schema pages.
Create a payment link — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
acceptedPaymentMethods | array | Required within parent | An array of accepted payment methods for the payment link. Valid values include 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', and 'PADS'. |
acceptedPaymentMethods[] | string | Each item | Known values: CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS, AFFIRM, KLARNA |
additionalFormFields | array | Required within parent | An array of additional form fields included in the payment link. |
additionalFormFields[] | Model | Each item | Expand Create a payment link — response body — additional Form Fields item |
archived | boolean | Required within parent | A boolean indicating whether the payment link is archived. |
archivedAt | string | Optional | The date and time when the payment link was archived, in ISO 8601 format. Format: date-time |
automatedSalesTaxEnabled | boolean | Required within parent | A boolean indicating whether automated sales tax is enabled for the payment link. |
businessUnitId | string | Optional | The business unit ID associated with the payment link, represented as a string. |
checkoutFeeIds | array | Required within parent | An array of checkout fee IDs associated with the payment link. |
checkoutFeeIds[] | string | Each item | |
collectFullBillingAddress | boolean | Required within parent | A boolean indicating whether to collect the full billing address during checkout. |
collectShippingAddress | boolean | Required within parent | A boolean indicating whether to collect the shipping address during checkout. |
completedPurchaseCount | JSON | Required within parent | |
completedPurchaseCount (anyOf 1) | integer | Alternative | The number of completed purchases made through this payment link. Format: int32 |
completedPurchaseCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
createContractOnPurchase | boolean | Required within parent | A boolean indicating whether a contract should be created upon purchase. |
createdAt | string | Optional | The date and time when the payment link was created, in ISO 8601 format. Format: date-time |
currencyCode | string | Required within parent | The currency code for the payment link, represented as a string. |
dealConfigurations | Model | Optional | Expand Create a payment link — response body — deal Configurations |
descriptionHtml | string | Optional | The HTML description of the payment link, represented as a string. |
discountCodeEnabled | boolean | Required within parent | A boolean indicating whether discount codes are enabled for the payment link. |
discounts | array | Required within parent | An array of discount objects associated with the payment link. |
discounts[] | Model | Each item | Expand Create a payment link — response body — discounts item |
domainId | string | Optional | The domain ID associated with the payment link, represented as a string. |
expirationSettings | Model | Optional | Expand Create a payment link — response body — expiration Settings |
fees | array | Required within parent | An array of fee objects associated with the payment link. |
fees[] | Model | Each item | Expand Create a payment link — response body — fees item |
formGuid | string | Required within parent | The form GUID associated with the payment link, represented as a string. |
id | string | Required within parent | The unique identifier for the payment link, represented as a string. |
includeEmailInSuccessRedirect | boolean | Required within parent | A boolean indicating whether to include the email in the success redirect URL. |
isOneTimeUseEnabled | boolean | Required within parent | A boolean indicating whether the payment link is enabled for one-time use. |
lineItems | array | Required within parent | An array of line items associated with the payment link. |
lineItems[] | Model | Each item | Expand Create a payment link — response body — line Items item |
paymentLinkName | string | Required within parent | The name of the payment link, represented as a string. |
paymentLinkUrl | string | Required within parent | The URL of the payment link, represented as a string. |
state | string | Required within parent | The current state of the payment link, represented as a string. Valid values include 'ON' and 'OFF'. Known values: OFF, ON |
storePaymentMethodAtCheckout | boolean | Required within parent | A boolean indicating whether to store the payment method at checkout. |
successUrl | string | Optional | The URL to redirect to upon successful payment, represented as a string. |
taxes | array | Required within parent | An array of tax objects associated with the payment link. |
taxes[] | Model | Each item | Expand Create a payment link — response body — taxes item |
updatedAt | string | Optional | The date and time when the payment link was last updated, in ISO 8601 format. Format: date-time |
Referenced models: Create a payment link — response body — deal Configurations, Create a payment link — response body — discounts item, Create a payment link — response body — expiration Settings, Create a payment link — response body — fees item, Create a payment link — response body — line Items item, Create a payment link — response body — additional Form Fields item, Create a payment link — response body — taxes item
Create a payment link — response body — deal Configurations
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
createNewDealOnPurchase | boolean | Required within parent | A boolean indicating whether a new deal should be created in HubSpot upon a purchase. Required field. |
pipelineStageId | string | Optional | The identifier for the pipeline stage where the new deal will be placed. This is a string value. |
Create a payment link — response body — discounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived | boolean | Optional | Indicates whether this discount has been archived. A boolean value. |
archivedAt | string | Optional | The date and time when this discount was archived, in ISO 8601 format. Format: date-time |
createdAt | string | Optional | The date and time when this discount was created, in ISO 8601 format. Format: date-time |
id | string | Required within parent | The unique identifier for this discount. |
label | string | Optional | A descriptive label for the discount. |
updatedAt | string | Optional | The date and time when this discount was last updated, in ISO 8601 format. Format: date-time |
value | JSON | Optional | |
value (anyOf 1) | number | Alternative | The numerical value of the discount. |
value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
valueType | string | Optional | The type of discount value, which can be either 'FIXED' or 'PERCENT'. Known values: FIXED, PERCENT |
Create a payment link — response body — expiration Settings
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
expirationDate | string | Optional | The date and time when the payment link will expire, in ISO 8601 format. Format: date-time |
maxPurchases | JSON | Optional | |
maxPurchases (anyOf 1) | integer | Alternative | The maximum number of purchases allowed for this payment link. It is an integer value. Format: int32 |
maxPurchases (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create a payment link — response body — fees item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived | boolean | Optional | Indicates whether this fee has been archived. A boolean value. |
archivedAt | string | Optional | The date and time when this fee was archived, in ISO 8601 format. Format: date-time |
createdAt | string | Optional | The date and time when this fee was created, in ISO 8601 format. Format: date-time |
id | string | Required within parent | The unique identifier for this fee. |
label | string | Optional | A descriptive label for the fee. |
updatedAt | string | Optional | The date and time when this fee was last updated, in ISO 8601 format. Format: date-time |
value | JSON | Optional | |
value (anyOf 1) | number | Alternative | The monetary value of the fee. A number representing the fee amount. |
value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
valueType | string | Optional | The type of value for the fee, which can be either 'FIXED' or 'PERCENT'. Known values: FIXED, PERCENT |
Create a payment link — request body — body discount
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
label | string | Required within parent | A descriptive label for the discount. This is a string. |
value | number | Required within parent | The numerical value of the discount to be applied. This is a number. |
valueType | string | Required within parent | The type of discount value, which can either be 'FIXED' or 'PERCENT'. One of: FIXED, PERCENT |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.payment_links_update_payment_link. Catalog operation: payment_links_update_payment_link. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["commerce.payment_links.write"]