Bulk bonus payment API
Once you can authenticate and you know your study id works, you can then use the following API to
bulk pay bonuses. This process takes 2 steps, creating the bulk processing data and then paying it out.
1. Creating bulk payment data
https://www.prolific.co/docs/api-docs/public/#tag/Bonuses/paths/~1submissions~1bonus-payments/post
You need to use the following schema for your data in the --data-raw
, the following shows an example of this POST data. The csv_bonuses
contain the participant_ids that you should have from your survey tool.
{
"study_id": "61000180997ce18e0cd801b3", \\ taken from study url
"csv_bonuses": "60ffe5c8371090c7041d43f8,0.20\n60ff44a1d00991f1dfe405d9,0.20"
}
csv_bonuses
structure: String(participant_id
comma
amount
new_line
)
The line below shows an example of this CSV format.
60ffe5c8371090c7041d43f8,0.20\n60ff44a1d00991f1dfe405d9,0.20\n610001c69ef2254561beee980.30
Running that curl command should return similar data to this, the id
is important here and will be used in the next step.
> {
"id": "61015b057bd72ddc7244edb9", // <-- used in next step as bulk_payments_id
"study": "61000180997ce18e0cd801b3",
"amount": 40.0,
"fees": 0.0,
"total_amount": 40.0,
"vat": 0.0
}
2. Process payments
Now that everything is setup, copy the bulk_payments_id and replace it with the url below
https://www.prolific.co/docs/api-docs/public/#tag/Bonuses/paths/~1bulk-bonus-payments~1{id}~1pay~1/post
If this works it should return the following message, you can also see the amount shown on the study page.
> "Successfully processed bonus payments."