Skip to main content
PUT
/
payment
/
{id}
Update Payment
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/payment/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user": "<string>",
  "title": "<string>",
  "transactionDate": "<string>",
  "currency": "<string>",
  "amount": 123,
  "amountUSD": 123,
  "conversionRate": 123,
  "memo": "<string>"
}'
{
  "message": "Payment updated successfully"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/payment/example-id', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "user": "sample-user",
    "title": "sample-title",
    "transactionDate": "sample-transactionDate",
    "currency": "sample-currency",
    "amount": 1,
    "amountUSD": 1,
    "conversionRate": 1,
    "memo": "sample-memo"
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

Payment ID

Body

application/json
user
string

User ID associated with the payment

title
string

Title/description of the payment

transactionDate
string

Date and time of the transaction

currency
string

Currency code

amount
number

Amount in the specified currency

amountUSD
number

Amount converted to USD

conversionRate
number

Exchange rate used for conversion

memo
string

Optional memo

Response

Success

message
string
payment
object