Post-Donation Redirect

How to redirect people to your website after they make a donation

You can create a custom URL to donate a specific amount (and frequency) by appending /donate, /pay or /contribute to your collective url: e.g.
1
https://opencollective.com/webpack/donate/100/month/bronze%20sponsorship
Copied!
1
https://opencollective.com/webpack/pay/1000/invoice%201234
Copied!
You can also append to that url a redirect parameter. That way, after the user donates money, they will be redirected to your URL and we will pass the transactionid.
E.g.
1
https://opencollective.com/octobox/pay/100/month/support%20the%20community?redirect=https://octobox.io/callback
Copied!
When you donate you will be redirected to:
1
https://octobox.io/callback?transactionid=117fe88f-3fc7-4634-b78c-05b0fd0cf7d8
Copied!
Then you can call our API to get all the details about that transaction:
1
https://api.opencollective.com/v1/collectives/octobox/transactions/117fe88f-3fc7-4634-b78c-05b0fd0cf7d8?apiKey=xxxxx
Copied!
You can get your API key in your "Applications" page that you can access from your logged in user dropdown menu.
Example of the data being returned:
1
{
2
"result": {
3
"id": 134368,
4
"uuid": null,
5
"type": "CREDIT",
6
"createdAt": "Wed Nov 07 2018 09:05:06 GMT+0000 (UTC)",
7
"description": "Monthly donation to Octobox",
8
"amount": 10000,
9
"currency": "USD",
10
"hostCurrency": "USD",
11
"hostCurrencyFxRate": 1,
12
"netAmountInCollectiveCurrency": 8680,
13
"hostFeeInHostCurrency": -500,
14
"platformFeeInHostCurrency": -500,
15
"paymentProcessorFeeInHostCurrency": -320,
16
"paymentMethod": {
17
"id": 34801,
18
"service": "stripe",
19
"name": "4242"
20
},
21
"fromCollective": {
22
"id": 23657,
23
"slug": "anonymous1338",
24
"name": "anonymous",
25
"image": null
26
},
27
"collective": {
28
"id": 413,
29
"slug": "octobox",
30
"name": "Octobox",
31
"image": "https://opencollective-production.s3-us-west-1.amazonaws.com/4e491a10-aae0-11e8-a91b-df5253215e9d.png"
32
},
33
"host": {
34
"id": 11004,
35
"slug": "opensourcecollective",
36
"name": "Open Source Collective 501c6 (Non Profit)",
37
"image": "https://opencollective-production.s3-us-west-1.amazonaws.com/5f4a3920-11b6-11e8-b28d-b359f3c5ca14.png"
38
},
39
"order": {
40
"id": 33193,
41
"status": "ACTIVE",
42
"subscription": {
43
"id": 26426,
44
"interval": "month"
45
}
46
}
47
}
48
}
Copied!
Last modified 2yr ago
Export as PDF
Copy link