> ## Documentation Index
> Fetch the complete documentation index at: https://dev.chargily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Payment Link

> Updates the information of a payment link by defining the values for the passed parameters. Any parameters not supplied will remain unaltered.

## Path parameters

<ParamField path="id" type="string">
  The ID of the payment link.
</ParamField>

## Body parameters

<ParamField body="name" type="string">
  A String representing the name of the payment link, it will not be shown to
  customers, it helps you to organize payment links.
</ParamField>

<ParamField body="items" type="array" multiple>
  The items are the products that are being sold.

  <Expandable title="items">
    <ParamField body="price" type="string" required>
      The ID of the [Price](/v2/api-reference/prices/price-object "Price").
    </ParamField>

    <ParamField body="quantity" type="integer" required />

    <ParamField body="adjustable_quantity" type="boolean" default="false" />
  </Expandable>
</ParamField>

<ParamField body="after_completion_message" type="string">
  A message which will be displayed to the customer after a successful payment.
</ParamField>

<ParamField body="locale" type="string">
  The language of the checkout page, accepted values are: 'ar', 'en' or 'fr'.
</ParamField>

<ParamField body="pass_fees_to_customer" type="boolean">
  A Boolean value indicating whether the Chargily Pay fees will be paid by you,
  the merchant, or by your customers.
</ParamField>

<ParamField body="collect_shipping_address" type="boolean">
  A Boolean value indicates whether the shipping address should be collected
  from the customer.
</ParamField>

<ParamField body="metadata" type="key-value array">
  A Set of key-value pairs that can be used to store additional information
  about the payment link.
</ParamField>

## Returns

If the update is successful, it returns a payment link object with the updated information.

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "01hhhtvg4w7gk4mcaxmgzb2ynw",
    "entity": "payment_link",
    "livemode": false,
    "name": "Payment Link for Facebook page.",
    "active": 1,
    "after_completion_message": "The product will arrive in 03 days.",
    "locale": "ar",
    "pass_fees_to_customer": false,
    "metadata": [],
    "created_at": 1702479380,
    "updated_at": 1702479380,
    "collect_shipping_address": 0,
    "url": "https://pay.chargily.dz/test/payment-links/01hhhtvg4w7gk4mcaxmgzb2ynw"
  }
  ```
</ResponseExample>
