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"
}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"
}/payment/{id} endpoint updates a specific payment.
Method:PUT
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the payment |
| Field | Type | Required | Description |
|---|---|---|---|
| user (Optional) | string | No | TenantUserId associated with the payment |
| title (Optional) | string | No | Title/description of the payment |
| transactionDate (Optional) | string | No | Date and time of the transaction |
| currency (Optional) | string | No | Currency code (e.g., USD, NGN) |
| amount (Optional) | number | No | Amount in the specified currency |
| amountUSD (Optional) | number | No | Amount converted to USD |
| conversionRate (Optional) | number | No | Exchange rate used for conversion |
| memo (Optional) | string | No | Additional notes about the payment |
| files (Optional) | array | No | Array of file names associated with the payment |
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);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Payment ID
TenantUserId associated with the payment
Title/description of the payment
Date and time of the transaction
Currency code
Amount in the specified currency
Amount converted to USD
Exchange rate used for conversion
Optional memo