> For the complete documentation index, see [llms.txt](https://apis.seerbit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apis.seerbit.com/api-endpoints/payment-link/update-link.md).

# Update Link

## /payLinks/api/

<mark style="color:orange;">`PUT`</mark> `https://paymentlink.seerbitapi.com/paymentlink/v2/payLinks/api`

This enpoint allows you to update a created paymentlink

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                               | Type   | Description                                                                                               |
| -------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------- |
| Status<mark style="color:red;">\*</mark>           | String | link status - (ACTIVE, INACTIVE)                                                                          |
| paymentLinkName<mark style="color:red;">\*</mark>  | String | name of the link                                                                                          |
| description<mark style="color:red;">\*</mark>      | String | decription of this page                                                                                   |
| currency<mark style="color:red;">\*</mark>         | String | The transaction currency (NGN, GHS, KES,XOF or USD). Country Default currency must be passed              |
| successMessage                                     | String | Custom message to show customers after a successful payment                                               |
| publicKey<mark style="color:red;">\*</mark>        | String | merchant publickey                                                                                        |
| customisationName                                  | String | unique url extension for payment link                                                                     |
| paymentFrequency<mark style="color:red;">\*</mark> | String | ONE-TIME or RECURRENT                                                                                     |
| paymentReference                                   | String |                                                                                                           |
| email                                              | String |                                                                                                           |
| additionalData                                     | String | additional data for payments                                                                              |
| linkExpirable<mark style="color:red;">\*</mark>    | String | set true or false                                                                                         |
| expiryDate                                         | String | set date                                                                                                  |
| oneTime<mark style="color:red;">\*</mark>          | String | set true if you want the link to be used once or set false if you want the link to be used multiple times |
| amount<mark style="color:red;">\*</mark>           | String | true or false                                                                                             |
| customerName<mark style="color:red;">\*</mark>     | String | true                                                                                                      |
| mobileNumber<mark style="color:red;">\*</mark>     | String | true or false if you need to collect customer number                                                      |

{% tabs %}
{% tab title="cURL" %}

<pre class="language-javascript"><code class="lang-javascript">curl --location --request PUT 'https://paymentlink.seerbitapi.com/paymentlink/v2/payLinks/api' \
<strong>--header 'Content-Type: application/json' \
</strong>--header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
--data-raw '{
    "paymentLinkId":"0000000",
    "status":"INACTIVE",
    "description":"Test paymentLink",
    "successMessage":"Payment made successfully!",
    "businessName":"My Business",
    "publicKey":"publickKey",
      "customizationName":"my_link_3",
      "paymentFrequency":"RECURRENT",
      "email":"customer@seerbit.com",
      "requiredFields": {
          "address":true,
          "amount":true,
          "customerName":true,
          "mobileNumber":true,
          "invoiceNumber":false
      },
      "linkExpirable":false,
      "expiryDate":"",
      "oneTime":false
  
}'
</code></pre>

{% endtab %}

{% tab title="200: OK Sucessfull" %}

```javascript
{
  "data": {
      "paymentLinks": {
          "publicKey": "PublicKey",
          "status": "INACTIVE",
          "description": "Test paymentLink",
          "successMessage": "Payment made successfully!",
          "paymentLinkId": "0000000",
          "paymentFrequency": "RECURRENT",
          "paymentLinkUrl": "null/my_link_3",
          "customizationName": "my_link_3",
          "environment": "LIVE",
          "requiredFields": {
              "address": true,
              "amount": true,
              "customerName": true,
              "mobileNumber": true,
              "invoiceNumber": false
          },
          "expiryDuration": 0,
          "linkExpirable": false,
          "updatedAt": "2021-09-21T11:12:57.404",
          "oneTime": false,
          "splitPayment": false
      }
  }
}
```

{% endtab %}
{% endtabs %}
