Custom Patreon button that updates an external db

Hi team,

I am working on integrating a custom Patreon button on our non-profit’s website where we could receive donations and display badges for donating users.

To implement that I am planning to create a custom button that links to the checkout page, or use the button script from the page.

On the other hand, I would setup a Patreon webhook to listen for new donations and update the user records based on the users’ email from the web-hook.

Is there a bitter way to implement this integration?

Thank you

If your site is WordPress, that sounds like a lot of hassle. You can just get the free Patreon plugins and get all the widgets and almost all Patreon related functionality you need.

Basically, for yor particular case: Patron Button, Widgets & Plugin would give you the widgets and call to action, Patreon WordPress would give you the Patreon related login and membership functionality.

Patron Pro would provide advanced locking options and enhanced widgets.

Patron Content Manager allows you to manage all your patron-only content at your website from a single page. It makes publishing and maintaining patron only content extremely easy.

1 Like

Unfortunately we don’t use Wordpress, and need to go down the custom integration route.
Not sure if it is the right place to ask but I was wondering if I could get quick answers to the following questions:

  1. Does the webhook payload include the email of the supporter?
    It seems from the docs that pledge:create webhook gives the user id which then I could call the User endpoint and get the email, but I am not sure.

  2. Is a redirect after pledge completion possible?
    Users are asked to make donations after their lessons, it would be great if I could find a way to send them back to where they left off.

  3. How buttons generated from dashboard/widgets are customizable (shape, text)?
    I have seen discussion around the WP plugin but was not sure how it is possible without the plugin.

  4. Are all of the above features available with the basic Patreon account?

  5. Is there a way to send metadata using the button and receive it using the webhook?

Thank you :pray:

1 - That is a good format of doing it.

2 - Yes, various integrations use that. Patreon WordPress - a WP plugin for Patreon uses that to redirect users back to the content they started from at the remote WP site. You can check out its code. It can be used as an example for a lot of things:

3 - They should be JS, and you should be able to do formatting at your site.

4 - Basic accounts are limited in some things, like being able to use tiers.

5 - You can do that in the state var. An example is in the above code.

PHP lib can be a codebase where you can start building your integration. If your stack is different, you can still use it as a base for integration logic by translating the code into your own stack.

@codebard thank you this is Gold.

I ended up using redirect_uri= initially to redirect to a donation success page. (It is probably used for auth or something)

There are a lot of parameters in the url such as '&scope=identity%20identity[email]', I wish there was a documentation for them.

1 Like

They are v2, and their documentation starts from this part on:

Mainly, scopes are for asking permissions for a resource. Then you use includes and fields to get those.

1 Like

Here I documented my process in an article:

1 Like

Thanks for documenting your steps and sharing the article.

1 Like