Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.paymentLinkIdstringRequired within parent
bodyModelRequired within parentExpand Update a payment link — request body — body

Referenced models: Update a payment link — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a payment link — response body

Referenced models: Create a payment link — response body

15 more schemas are linked from the tables above, on the schema pages.

Create a payment link — response body
FieldTypePresenceDescription and constraints
$objectRoot
acceptedPaymentMethodsarrayRequired within parentAn array of accepted payment methods for the payment link. Valid values include 'CREDIT_OR_DEBIT_CARD', 'ACH', 'SEPA', 'BACS', and 'PADS'.
acceptedPaymentMethods[]stringEach itemKnown values: CREDIT_OR_DEBIT_CARD, ACH, SEPA, BACS, PADS, AFFIRM, KLARNA
additionalFormFieldsarrayRequired within parentAn array of additional form fields included in the payment link.
additionalFormFields[]ModelEach itemExpand Create a payment link — response body — additional Form Fields item
archivedbooleanRequired within parentA boolean indicating whether the payment link is archived.
archivedAtstringOptionalThe date and time when the payment link was archived, in ISO 8601 format.
Format: date-time
automatedSalesTaxEnabledbooleanRequired within parentA boolean indicating whether automated sales tax is enabled for the payment link.
businessUnitIdstringOptionalThe business unit ID associated with the payment link, represented as a string.
checkoutFeeIdsarrayRequired within parentAn array of checkout fee IDs associated with the payment link.
checkoutFeeIds[]stringEach item
collectFullBillingAddressbooleanRequired within parentA boolean indicating whether to collect the full billing address during checkout.
collectShippingAddressbooleanRequired within parentA boolean indicating whether to collect the shipping address during checkout.
completedPurchaseCountJSONRequired within parent
completedPurchaseCount (anyOf 1)integerAlternativeThe number of completed purchases made through this payment link.
Format: int32
completedPurchaseCount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
createContractOnPurchasebooleanRequired within parentA boolean indicating whether a contract should be created upon purchase.
createdAtstringOptionalThe date and time when the payment link was created, in ISO 8601 format.
Format: date-time
currencyCodestringRequired within parentThe currency code for the payment link, represented as a string.
dealConfigurationsModelOptionalExpand Create a payment link — response body — deal Configurations
descriptionHtmlstringOptionalThe HTML description of the payment link, represented as a string.
discountCodeEnabledbooleanRequired within parentA boolean indicating whether discount codes are enabled for the payment link.
discountsarrayRequired within parentAn array of discount objects associated with the payment link.
discounts[]ModelEach itemExpand Create a payment link — response body — discounts item
domainIdstringOptionalThe domain ID associated with the payment link, represented as a string.
expirationSettingsModelOptionalExpand Create a payment link — response body — expiration Settings
feesarrayRequired within parentAn array of fee objects associated with the payment link.
fees[]ModelEach itemExpand Create a payment link — response body — fees item
formGuidstringRequired within parentThe form GUID associated with the payment link, represented as a string.
idstringRequired within parentThe unique identifier for the payment link, represented as a string.
includeEmailInSuccessRedirectbooleanRequired within parentA boolean indicating whether to include the email in the success redirect URL.
isOneTimeUseEnabledbooleanRequired within parentA boolean indicating whether the payment link is enabled for one-time use.
lineItemsarrayRequired within parentAn array of line items associated with the payment link.
lineItems[]ModelEach itemExpand Create a payment link — response body — line Items item
paymentLinkNamestringRequired within parentThe name of the payment link, represented as a string.
paymentLinkUrlstringRequired within parentThe URL of the payment link, represented as a string.
statestringRequired within parentThe current state of the payment link, represented as a string. Valid values include 'ON' and 'OFF'.
Known values: OFF, ON
storePaymentMethodAtCheckoutbooleanRequired within parentA boolean indicating whether to store the payment method at checkout.
successUrlstringOptionalThe URL to redirect to upon successful payment, represented as a string.
taxesarrayRequired within parentAn array of tax objects associated with the payment link.
taxes[]ModelEach itemExpand Create a payment link — response body — taxes item
updatedAtstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRoot
createNewDealOnPurchasebooleanRequired within parentA boolean indicating whether a new deal should be created in HubSpot upon a purchase. Required field.
pipelineStageIdstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanOptionalIndicates whether this discount has been archived. A boolean value.
archivedAtstringOptionalThe date and time when this discount was archived, in ISO 8601 format.
Format: date-time
createdAtstringOptionalThe date and time when this discount was created, in ISO 8601 format.
Format: date-time
idstringRequired within parentThe unique identifier for this discount.
labelstringOptionalA descriptive label for the discount.
updatedAtstringOptionalThe date and time when this discount was last updated, in ISO 8601 format.
Format: date-time
valueJSONOptional
value (anyOf 1)numberAlternativeThe numerical value of the discount.
value (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
valueTypestringOptionalThe type of discount value, which can be either 'FIXED' or 'PERCENT'.
Known values: FIXED, PERCENT
Create a payment link — response body — expiration Settings
FieldTypePresenceDescription and constraints
$objectRoot
expirationDatestringOptionalThe date and time when the payment link will expire, in ISO 8601 format.
Format: date-time
maxPurchasesJSONOptional
maxPurchases (anyOf 1)integerAlternativeThe maximum number of purchases allowed for this payment link. It is an integer value.
Format: int32
maxPurchases (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Create a payment link — response body — fees item
FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanOptionalIndicates whether this fee has been archived. A boolean value.
archivedAtstringOptionalThe date and time when this fee was archived, in ISO 8601 format.
Format: date-time
createdAtstringOptionalThe date and time when this fee was created, in ISO 8601 format.
Format: date-time
idstringRequired within parentThe unique identifier for this fee.
labelstringOptionalA descriptive label for the fee.
updatedAtstringOptionalThe date and time when this fee was last updated, in ISO 8601 format.
Format: date-time
valueJSONOptional
value (anyOf 1)numberAlternativeThe monetary value of the fee. A number representing the fee amount.
value (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
valueTypestringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRoot
labelstringRequired within parentA descriptive label for the discount. This is a string.
valuenumberRequired within parentThe numerical value of the discount to be applied. This is a number.
valueTypestringRequired within parentThe type of discount value, which can either be 'FIXED' or 'PERCENT'.
One of: FIXED, PERCENT

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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.