> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runpayments.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runpayments.io/_mcp/server.

# Edit Hosted Payment Page

PUT https://javelin.runpayments.io/api/v1/hpp/{hpp_client_id}
Content-Type: application/json

Allows for the editing of an existing hosted payment page. This will not remove existing components, but if something new is passed, it will override the existing field or add it to an existing payment page.

Reference: https://docs.runpayments.io/reference/payments-api/edit-hosted-payment-page

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `hpp_client_id` (string, required) — The client ID of the hosted payment page to edit

### Body (application/json)

This endpoint expects an object.

- `cc_mid` (string, required) — Merchant ID(s) associated with the hosted payment page. (Not editable after creation)
- `name` (string, optional) — Name of the Hosted Payment Page.
- `name_on_account` (string, optional) — Name of the Customer.
- `amount` (string, optional) — Amount associated with the payment link.
- `lock_amount` (string, optional) — (true/false) whether the amount should be locked to the end user. Amount must be set in order to have this locked.
- `disable_after_payment` (string, optional) — (true/false) whether the payment link should be disabled after 1 use.
- `min_amount` (string, optional) — Minimum amount, can only be present if "lock_amount" is "false", can be equal to the amount if present.
- `max_amount` (string, optional) — Maximum amount, can only be present if "lock_amount" is "false", can be equal to the amount if present.
- `hpp_options` (list of ApiV1HppHppClientIdPutRequestBodyContentApplicationJsonSchemaHppOptionsItems, optional) — An array containing the following parameters: Address (no optional pre-set value allowed), Phone, Email, Invoice ID, Custom Fields 01-05.

## Response

### 200

HPP updated successfully

- `success` (boolean, required) — Whether or not the edits were successfully made.
- `message` (string, required) — Status message.
- `url` (string, required) — The new url for the hosted payment page.

## Errors

### 400 Bad Request Error

Bad request

- `error` (string, optional) — Error code
- `error_description` (string, optional) — Detailed error description

### 401 Unauthorized Error

Unauthorized

- `error` (string, optional) — Error code
- `error_description` (string, optional) — Detailed error description

## Types

### ApiV1HppHppClientIdPutRequestBodyContentApplicationJsonSchemaHppOptionsItems

- `name` (string, optional) — Option name (e.g., email, phone, address, invoice_id, custom_01-custom_05).
- `value` (string, optional) — Pre-filled value for the option.
- `is_readonly` (string, optional) — (true/false) If the option is readonly.
- `is_required` (string, optional) — (true/false) If the option is required.

## Examples

**Request**

```json
{
  "cc_mid": "800000001780",
  "name": "GS2 Payment Link",
  "name_on_account": "Testing Payments",
  "amount": "99.99",
  "lock_amount": "false",
  "disable_after_payment": "false",
  "min_amount": "50.00",
  "max_amount": "200.00",
  "hpp_options": [
    {
      "name": "email",
      "value": "test@test.com",
      "is_readonly": "false",
      "is_required": "true"
    },
    {
      "name": "phone",
      "value": "2150462839",
      "is_readonly": "false",
      "is_required": "true"
    }
  ]
}
```

**Response**

```json
{
  "success": true,
  "message": "HPP created successfully",
  "url": "https://hpp.runpayments.io/payment?client_id=2DF1A41172BA157090D8E26EC83E0CE0"
}
```

**SDK Code**

```python
import requests

url = "https://javelin.runpayments.io/api/v1/hpp/hpp_client_id"

payload = {
    "cc_mid": "800000001780",
    "name": "GS2 Payment Link",
    "name_on_account": "Testing Payments",
    "amount": "99.99",
    "lock_amount": "false",
    "disable_after_payment": "false",
    "min_amount": "50.00",
    "max_amount": "200.00",
    "hpp_options": [
        {
            "name": "email",
            "value": "test@test.com",
            "is_readonly": "false",
            "is_required": "true"
        },
        {
            "name": "phone",
            "value": "2150462839",
            "is_readonly": "false",
            "is_required": "true"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://javelin.runpayments.io/api/v1/hpp/hpp_client_id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"cc_mid":"800000001780","name":"GS2 Payment Link","name_on_account":"Testing Payments","amount":"99.99","lock_amount":"false","disable_after_payment":"false","min_amount":"50.00","max_amount":"200.00","hpp_options":[{"name":"email","value":"test@test.com","is_readonly":"false","is_required":"true"},{"name":"phone","value":"2150462839","is_readonly":"false","is_required":"true"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://javelin.runpayments.io/api/v1/hpp/hpp_client_id"

	payload := strings.NewReader("{\n  \"cc_mid\": \"800000001780\",\n  \"name\": \"GS2 Payment Link\",\n  \"name_on_account\": \"Testing Payments\",\n  \"amount\": \"99.99\",\n  \"lock_amount\": \"false\",\n  \"disable_after_payment\": \"false\",\n  \"min_amount\": \"50.00\",\n  \"max_amount\": \"200.00\",\n  \"hpp_options\": [\n    {\n      \"name\": \"email\",\n      \"value\": \"test@test.com\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    },\n    {\n      \"name\": \"phone\",\n      \"value\": \"2150462839\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://javelin.runpayments.io/api/v1/hpp/hpp_client_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cc_mid\": \"800000001780\",\n  \"name\": \"GS2 Payment Link\",\n  \"name_on_account\": \"Testing Payments\",\n  \"amount\": \"99.99\",\n  \"lock_amount\": \"false\",\n  \"disable_after_payment\": \"false\",\n  \"min_amount\": \"50.00\",\n  \"max_amount\": \"200.00\",\n  \"hpp_options\": [\n    {\n      \"name\": \"email\",\n      \"value\": \"test@test.com\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    },\n    {\n      \"name\": \"phone\",\n      \"value\": \"2150462839\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://javelin.runpayments.io/api/v1/hpp/hpp_client_id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cc_mid\": \"800000001780\",\n  \"name\": \"GS2 Payment Link\",\n  \"name_on_account\": \"Testing Payments\",\n  \"amount\": \"99.99\",\n  \"lock_amount\": \"false\",\n  \"disable_after_payment\": \"false\",\n  \"min_amount\": \"50.00\",\n  \"max_amount\": \"200.00\",\n  \"hpp_options\": [\n    {\n      \"name\": \"email\",\n      \"value\": \"test@test.com\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    },\n    {\n      \"name\": \"phone\",\n      \"value\": \"2150462839\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://javelin.runpayments.io/api/v1/hpp/hpp_client_id', [
  'body' => '{
  "cc_mid": "800000001780",
  "name": "GS2 Payment Link",
  "name_on_account": "Testing Payments",
  "amount": "99.99",
  "lock_amount": "false",
  "disable_after_payment": "false",
  "min_amount": "50.00",
  "max_amount": "200.00",
  "hpp_options": [
    {
      "name": "email",
      "value": "test@test.com",
      "is_readonly": "false",
      "is_required": "true"
    },
    {
      "name": "phone",
      "value": "2150462839",
      "is_readonly": "false",
      "is_required": "true"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://javelin.runpayments.io/api/v1/hpp/hpp_client_id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cc_mid\": \"800000001780\",\n  \"name\": \"GS2 Payment Link\",\n  \"name_on_account\": \"Testing Payments\",\n  \"amount\": \"99.99\",\n  \"lock_amount\": \"false\",\n  \"disable_after_payment\": \"false\",\n  \"min_amount\": \"50.00\",\n  \"max_amount\": \"200.00\",\n  \"hpp_options\": [\n    {\n      \"name\": \"email\",\n      \"value\": \"test@test.com\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    },\n    {\n      \"name\": \"phone\",\n      \"value\": \"2150462839\",\n      \"is_readonly\": \"false\",\n      \"is_required\": \"true\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "cc_mid": "800000001780",
  "name": "GS2 Payment Link",
  "name_on_account": "Testing Payments",
  "amount": "99.99",
  "lock_amount": "false",
  "disable_after_payment": "false",
  "min_amount": "50.00",
  "max_amount": "200.00",
  "hpp_options": [
    [
      "name": "email",
      "value": "test@test.com",
      "is_readonly": "false",
      "is_required": "true"
    ],
    [
      "name": "phone",
      "value": "2150462839",
      "is_readonly": "false",
      "is_required": "true"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://javelin.runpayments.io/api/v1/hpp/hpp_client_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```