Skip to main content
POST
/
payment
/
Create Payment
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/payment/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user": "8560f85a-2416-47d7-a908-5cd2a6c51659",
  "title": "Payment Receipt test",
  "transactionDate": "2023-04-21T12:00:00Z",
  "currency": "USD",
  "amount": 74000,
  "amountUSD": 100,
  "conversionRate": 740,
  "memo": "Sale of album",
  "files": [
    "file1.pdf",
    "file2.pdf"
  ]
}'
{
  "id": "a6afa463-1073-4e14-860e-f5bbd9da0f74",
  "TenantId": 1,
  "UserId": "8560f85a-2416-47d7-a908-5cd2a6c51659",
  "title": "Payment Receipt test",
  "transactionDate": "2023-04-21",
  "currency": "USD",
  "amount": 74000,
  "amountUSD": 100,
  "conversionRate": 740,
  "memo": "Sale of album",
  "updatedAt": "2023-06-14T08:04:36.374Z",
  "createdAt": "2023-06-14T08:04:36.374Z"
}
Create Payment Description:
The /payment/ endpoint allows creation of payment records with transaction details, currency information, and associated files.
Method:
POST
Request Payload:
ParameterTypeDescription
userstringUser ID associated with the payment
titlestringTitle/description of the payment
transactionDatestringDate and time of the transaction
currencystringCurrency code (e.g., USD, NGN)
amountnumberAmount in the specified currency
amountUSDnumberAmount converted to USD
conversionRatenumberExchange rate used for conversion
memostringAdditional notes about the payment
filesarrayArray of file names associated with the payment

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Example Request

{
  "user": "8560f85a-2416-47d7-a908-5cd2a6c51659",
  "title": "Payment Receipt test",
  "transactionDate": "2023-04-21T12:00:00Z",
  "currency": "USD",
  "amount": 74000,
  "amountUSD": 100,
  "conversionRate": 740,
  "memo": "Sale of album",
  "files": [
    "file1.pdf",
    "file2.pdf"
  ]
}

Request Schema

FieldTypeRequiredDescription
userstringUser ID associated with the payment
titlestringTitle/description of the payment
transactionDatestringDate and time of the transaction
currencystringCurrency code (e.g., USD, NGN)
amountnumberAmount in the specified currency
amountUSDnumberAmount converted to USD
conversionRatenumberExchange rate used for conversion
memostringAdditional notes about the payment
filesarrayArray of file names associated with the payment

Responses

✅ 201 - Success

⚠️ 400 - Bad Request

⚠️ 401 - Unauthorized

❌ 500 - Internal Server Error

Tags

Payment

Authorizations

Authorization
string
header
required

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

Body

application/json
user
string
required

User ID associated with the payment

title
string
required

Title/description of the payment

transactionDate
string<date-time>
required

Date and time of the transaction

currency
string
required

Currency code (e.g., USD, NGN)

amount
number
required

Amount in the specified currency

amountUSD
number
required

Amount converted to USD

conversionRate
number

Exchange rate used for conversion

memo
string

Additional notes about the payment

files
string[]

Array of file names associated with the payment

Response

Success

id
string
TenantId
integer
UserId
string
title
string
transactionDate
string<date>
currency
string
amount
number
amountUSD
number
conversionRate
number
memo
string
updatedAt
string<date-time>
createdAt
string<date-time>
I