• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Update payment link

PUT /v2/online-checkout/payment-links/{id}

Updates a payment link.

You can update the payment_link fields such as description, checkout_options, and pre_populated_data. You cannot update other fields such as the order_id, version, URL, or timestamp field.


Permissions
PAYMENTS_WRITE
ORDERS_READ
ORDERS_WRITE
Guide
Update a payment link
Try in API Explorer
Name Description
id
string

Required

The ID of the payment link to update.

Name Description
payment_link
PaymentLink

Required

The payment_link object describing the updates to apply. For more information, see Update a payment link.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred when updating the payment link.

payment_link
PaymentLink

The updated payment link.

Examples

You are viewing an old version of the API
PUT /v2/online-checkout/payment-links/{id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/online-checkout/payment-links/TY4BWEDJ6AI5MBIV \
  -X PUT \
  -H 'Square-Version: 2022-11-16' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "payment_link": {
      "version": 1,
      "checkout_options": {
        "ask_for_shipping_address": true
      }
    }
  }'
Response JSON
{
  "payment_link": {
    "id": "TY4BWEDJ6AI5MBIV",
    "version": 2,
    "order_id": "Qqc8ypQGvxVwc46Cch4zHTaJqc4F",
    "checkout_options": {
      "ask_for_shipping_address": true
    },
    "url": "https://square.link/u/EXAMPLE",
    "created_at": "2022-04-26T00:15:15Z",
    "updated_at": "2022-04-26T00:18:24Z",
    "payment_note": "test"
  }
}