Update a payment link
Updates the specific payment link by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Some parameters which affect the total price or the mode of a payment link cannot be updated.
Parameters
- The seller facing title for the Payment Link. Will not be visible within checkout but will be used for the Open Graph title. By default, it will be derived from the name of the first product passed in the line items param (if present). It will also have the formatted sum total amount appended to it.
- The URL the customer will be directed to when payment or setup is complete. This url will automatically have the Checkoutsession_idappended to it. By default, this URL will be the standard PriceBlocs checkout complete success page. This value cannot be set dynamically via query string param.Learn more about default redirect urlshere.
- The URL the customer will be directed to if they decide to cancel the active Checkout Session. By default this will be the account profile url of the connected Stripe account, otherwise it will be the stanard PriceBlocs checkout error page. Can be set dynamically via query string param.Learn more about default redirect urlshere.
More parameters
Expand all
Returns
- Returns a payment link object if the update succeeded.
Have any questions or feedback?
or join us on Discord
PUT
/v1/payment-links/:id
1curl https://api.priceblocs.com/v1/payment-links/{{PAYMENT_LINK_ID}} \2-H "Authorization: Bearer {{API_KEY_SECRET_TEST}}" \3-H 'Content-Type: application/json' \4--data-raw '{"title":"Updated title"}' -X PUT
Response
1{2"url": "https://priceblocs.com/test/links/short_id",3"brand_url": "https://priceblocs.com/test/links/short_id",4"livemode": false,5"id": "00000000-0000-0000-0000-000000000000",6"object": "payment_link",7"short_id": "short_id",8"title": "My first payment link",9"description": "Each link will start a new checkout session when clicked",10"success_url": "https://priceblocs.com/checkout/success",11"cancel_url": "https://priceblocs.com/checkout/error",12"created": 1628234366,13"updated": 1628234366,14"payment_method_types": [15"card"16],17"currency": "usd",18"customer_email": "someone@gmail.com",19"customer": null,20"status": "active",21"discounts": [22{23"coupon": "coupon123"24}25],26"billing_address_collection": "auto",27"shipping_address_collection": {28"allowed_countries": [29"US"30]31},32"mode": "subscription",33"submit_type": "pay",34"allow_promotion_codes": false,35"adjustable_quantity": {36"enabled": true,37"maximum": 99,38"minimum": 139},40"shipping_worldwide": false,41"tax_rates": [42"txr_123"43],44"dynamic_tax_rates": [45"txr_456"46],47"automatic_tax": {48"enabled": true49},50"tax_id_collection": {51"enabled": false,52"type": "standard"53},54"consent_collection": {55"promotions": "auto"56},57"after_expiration": {58"recovery": {59"enabled": true,60"allow_promotion_codes": true61}62},63"expires_at": 1628234366,64"shipping_options": [65{66"shipping_rate": "shr_456"67}68],69"payment_intent_data": {70"capture_method": "automatic",71"transfer_data": {72"destination": "act_123"73}74},75"trial_period_days": null,76"trial_end": null,77"line_items": [78{79"price": "p_A_1",80"product": "p_A",81"currency": "usd",82"interval": "month",83"quantity": 1,84"dynamic_tax_rates": null,85"tax_rates": null86}87]88}