Skip to main content
PUT
/
payment
/
{id}
Update Payment
curl --request PUT \
  --url https://api.royalti.io/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.

Description

Update Payment Description:
The /payment/{id} endpoint updates a specific payment.
Method:
PUT
Path Parameter:
ParameterTypeDescription
idstringThe unique identifier of the payment
Request Body:
FieldTypeRequiredDescription
user (Optional)stringNoTenantUserId associated with the payment
title (Optional)stringNoTitle/description of the payment
transactionDate (Optional)stringNoDate and time of the transaction
currency (Optional)stringNoCurrency code (e.g., USD, NGN)
amount (Optional)numberNoAmount in the specified currency
amountUSD (Optional)numberNoAmount converted to USD
conversionRate (Optional)numberNoExchange rate used for conversion
memo (Optional)stringNoAdditional notes about the payment
files (Optional)arrayNoArray of file names associated with the payment

Code Examples

const response = await fetch('https://api.royalti.io/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

TenantUserId 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