Update Payment Link

View as Markdown
Update a payment link. Works for both User and API Key authentication. Account access is automatically validated via endpoint dependency.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

external_idstringRequired
account_idstringRequired

Request

This endpoint expects an object.
namestring or nullOptional<=255 characters
Internal name for the payment link
is_activeboolean or nullOptional
Whether the payment link is active
coupon_idstring or nullOptional
ID of coupon to apply to this payment link
free_trial_daysinteger or nullOptional1-730

Free trial period in days (subscription mode only)

success_urlstring or nullOptional
HTTPS URL to redirect to on successful payment
return_urlstring or nullOptional
HTTPS URL to redirect to on cancellation
allow_cart_editboolean or nullOptional
Allow customers to edit cart items during checkout
accepted_payment_methodslist of strings or nullOptional
List of accepted payment method types. Null means all methods accepted.
is_pinnedboolean or nullOptional
Pin this payment link to the top of the list
metadatamap from strings to any or nullOptional
Custom metadata for the payment link

Response

Successful Response
idstring
Unique payment link identifier
secure_tokenstring
Secure token for the public URL
urlstring
Public shareable URL
modestring

Payment mode: ‘payment’, ‘subscription’, or ‘setup’

success_urlstring
URL to redirect to on successful payment
expires_in_hoursinteger
Hours until checkout session expires
allow_cart_editboolean
Whether customers can edit cart items during checkout
is_activeboolean
Whether the payment link is active
is_pinnedboolean
Whether the payment link is pinned to the top of the list
created_atdatetime
When the payment link was created
updated_atdatetime
When the payment link was last updated
namestring or nullOptional
Internal name for the payment link
customer_idstring or nullOptional

Pre-assigned customer Identifier

customer_emailstring or nullOptional
Customer email address for display
coupon_idstring or nullOptional
ID of coupon applied to this payment link
promotion_codestring or nullOptional

Promotion code string associated with the coupon (e.g., ‘HALOWEEN20’)

discountobject or nullOptional

Structured discount details when a coupon is applied. Prefer this over the bare coupon_id/promotion_code for display.

free_trial_daysinteger or nullOptional

Free trial period in days (subscription mode only)

return_urlstring or nullOptional
URL to redirect to on cancellation
accepted_payment_methodslist of strings or nullOptional
List of accepted payment method types. Null means all methods accepted.
content_typestring or nullOptional

Content type: ‘products’, ‘package’, or null (setup mode)

package_idslist of strings or nullOptional

Package Identifiers (for package-based links)

package_nameslist of strings or nullOptional

Package names for display (for package-based links)

packageslist of objects or nullOptional
Inline package details with contained products and prices
line_itemslist of objectsOptional
List of line items in the payment link
total_amount_atominteger or nullOptional
Total amount of all line items in smallest currency unit
currencyenum or nullOptional

Currency of the payment link (from line items)

metadatamap from strings to any or nullOptional
Custom metadata for the payment link

Errors

422
Unprocessable Entity Error