Update Payment Request
curl --request PUT \
--url https://api.royalti.io/payment-request/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PaymentSettingId": "<string>",
"currency": "<string>",
"amountUSD": 123,
"amount": 123,
"memo": "<string>"
}
'import requests
url = "https://api.royalti.io/payment-request/{id}"
payload = {
"PaymentSettingId": "<string>",
"currency": "<string>",
"amountUSD": 123,
"amount": 123,
"memo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PaymentSettingId: '<string>',
currency: '<string>',
amountUSD: 123,
amount: 123,
memo: '<string>'
})
};
fetch('https://api.royalti.io/payment-request/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/payment-request/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'PaymentSettingId' => '<string>',
'currency' => '<string>',
'amountUSD' => 123,
'amount' => 123,
'memo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/payment-request/{id}"
payload := strings.NewReader("{\n \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.royalti.io/payment-request/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/payment-request/{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 \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payment request updated successfully"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Payment Requests
Update Payment Request
Update Payment Request
PUT
/
payment-request
/
{id}
Update Payment Request
curl --request PUT \
--url https://api.royalti.io/payment-request/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PaymentSettingId": "<string>",
"currency": "<string>",
"amountUSD": 123,
"amount": 123,
"memo": "<string>"
}
'import requests
url = "https://api.royalti.io/payment-request/{id}"
payload = {
"PaymentSettingId": "<string>",
"currency": "<string>",
"amountUSD": 123,
"amount": 123,
"memo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PaymentSettingId: '<string>',
currency: '<string>',
amountUSD: 123,
amount: 123,
memo: '<string>'
})
};
fetch('https://api.royalti.io/payment-request/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/payment-request/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'PaymentSettingId' => '<string>',
'currency' => '<string>',
'amountUSD' => 123,
'amount' => 123,
'memo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/payment-request/{id}"
payload := strings.NewReader("{\n \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.royalti.io/payment-request/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/payment-request/{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 \"PaymentSettingId\": \"<string>\",\n \"currency\": \"<string>\",\n \"amountUSD\": 123,\n \"amount\": 123,\n \"memo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payment request updated successfully"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Update Payment Request Description:The
/payment-request/{id} endpoint updates a specific payment request.
Authorization:
- Required role:
adminor higher
PUT
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the payment request |
| Field | Type | Required | Description |
|---|---|---|---|
| PaymentSettingId | string | No | ID of the payment setting to update |
| currency | string | No | Currency code |
| amountUSD | number | No | Amount in USD |
| amount | number | No | Amount in the specified currency |
| memo | string | No | Optional memo |
Code Examples
const response = await fetch('https://api.royalti.io/payment-request/example-id', {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"PaymentSettingId": "sample-PaymentSettingId",
"currency": "sample-currency",
"amountUSD": 1,
"amount": 1,
"memo": "sample-memo"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
'https://api.royalti.io/payment-request/example-id',
headers={
'Authorization': f'Bearer {token}'
},
json={"PaymentSettingId":"sample-PaymentSettingId","currency":"sample-currency","amountUSD":1,"amount":1,"memo":"sample-memo"}
)
data = response.json()
print(data)
curl -X PUT https://api.royalti.io/payment-request/example-id \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"PaymentSettingId":"sample-PaymentSettingId","currency":"sample-currency","amountUSD":1,"amount":1,"memo":"sample-memo"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Payment Request ID
Body
application/json
⌘I