curl --request POST \
--url https://api.royalti.io/payment-request/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PaymentSettingId": "24d2c371-4a7a-4acd-b4aa-d3eb3bebd8fa",
"currency": "USD",
"amountUSD": 500,
"amount": 130,
"memo": "Payment for services rendered"
}
'{
"status": "success",
"message": "Payment Request created successfully",
"newpayment": {
"id": "0654cd19-cea3-4fad-b92e-4033c4252c79",
"status": "pending",
"TenantId": 2,
"TenantUserId": "f4b4e2f8-fe5e-4076-9e09-3424ff7f185f",
"transactionDate": "2023-04-21",
"currency": "USD",
"amountUSD": 100,
"amount": 74000,
"memo": "Sale of album",
"updatedAt": "2023-11-22T20:48:36.034Z",
"createdAt": "2023-11-22T20:48:36.034Z"
}
}curl --request POST \
--url https://api.royalti.io/payment-request/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PaymentSettingId": "24d2c371-4a7a-4acd-b4aa-d3eb3bebd8fa",
"currency": "USD",
"amountUSD": 500,
"amount": 130,
"memo": "Payment for services rendered"
}
'{
"status": "success",
"message": "Payment Request created successfully",
"newpayment": {
"id": "0654cd19-cea3-4fad-b92e-4033c4252c79",
"status": "pending",
"TenantId": 2,
"TenantUserId": "f4b4e2f8-fe5e-4076-9e09-3424ff7f185f",
"transactionDate": "2023-04-21",
"currency": "USD",
"amountUSD": 100,
"amount": 74000,
"memo": "Sale of album",
"updatedAt": "2023-11-22T20:48:36.034Z",
"createdAt": "2023-11-22T20:48:36.034Z"
}
}/payment-request/
Method: POST
| Field | Type | Required | Description |
|---|---|---|---|
PaymentSettingId | string | Yes | ID of the payment setting being used. |
currency | string | Yes | Currency code for the payment. |
amountUSD | number | Yes | Amount in USD. |
amount | number | No | Amount in the specified currency (optional). |
memo | string | No | Optional memo describing the purpose of payment. |
const response = await fetch('https://api.royalti.io/payment-request/', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"user": "sample-user",
"PaymentSettingId": "sample-PaymentSettingId",
"currency": "sample-currency",
"amountUSD": 1,
"amount": 1,
"memo": "sample-memo"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Currency code for the payment
Amount in USD
ID of the user to create the payment request for. Admin/API key only. If not provided, creates for authenticated user.
ID of the payment setting being used. Optional during creation but required for approval and payment processing.
Amount in the specified currency
Optional memo describing the purpose of payment