curl --request POST \
--url https://api.royalti.io/payment/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"firstName": "<string>",
"lastName": "<string>",
"user": "<string>",
"title": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"amount": 123,
"amountUSD": 123,
"conversionRate": 123,
"memo": "<string>"
}
]
}
'{
"message": "Bulk payment creation completed",
"createdPayments": [
"Payment One",
"Payment Two"
],
"errors": [
"Invalid currency for Payment Three"
]
}Create Bulk Payments
curl --request POST \
--url https://api.royalti.io/payment/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"firstName": "<string>",
"lastName": "<string>",
"user": "<string>",
"title": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"amount": 123,
"amountUSD": 123,
"conversionRate": 123,
"memo": "<string>"
}
]
}
'{
"message": "Bulk payment creation completed",
"createdPayments": [
"Payment One",
"Payment Two"
],
"errors": [
"Invalid currency for Payment Three"
]
}/payment/bulk endpoint allows creation of multiple payments simultaneously.
Method:POST
Request Payload:
| Parameter | Type | Description |
|---|---|---|
| payments | array | Array of payment objects |
const response = await fetch('https://api.royalti.io/payment/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"payments": [
{
"firstName": "sample-firstName",
"lastName": "sample-lastName",
"user": "sample-user",
"title": "sample-title",
"transactionDate": "2024-01-21T12:00:00Z",
"currency": "sample-currency",
"amount": 1,
"amountUSD": 1,
"conversionRate": 1,
"memo": "sample-memo"
}
]
})
});
const data = await response.json();
console.log(data);