Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
So, I wanted to setup a membership program for one of the side projects i was building SuperDMs. I checked a lot payment providers/platforms but couldn’t find one which i can leverage for a side project as all of them required some kind of legal entity association.
Which is where i thought of giving Gumroad a shot. The pricing model i wanted to implemented was supposed to be tier wise distribution strategy. So different tiers with different pricing and related features will be offered.
Gumroad already allows you to have that pricing model. But the main concern was, if i can make it dynamic. What i mean by dynamic ?
[su_note note_color=”#fdf5c5″]Once a user purchases a product , app should get to know immediately and should be able to upgrade user’s tier without letting user do anything extra (no refresh, logout login hassles)[/su_note]
While i was researching it, one of my fellow dev pointed me to Gumroad ping API. And that is exactly what i wanted. What does Gumroad ping API enable for you ?
So this is what Gumroad gives you, but this has to be handled by some custom server that user should create to handle this incoming POST request.
Post request body will have these parameters
{ "seller_id": "2-X8GHFaL0qLyzuSriD%3D", "product_id": "r4qDRsQVn3U16i_2iNJcjA%3D%3D", "product_name": "SuperDMs%20Subscription", "permalink": "superdms", "product_permalink": "https%3A%2F%ms", "short_product_id": "EqHa", "email": "superdmsapp%40gmail.com", "price": "4900", "gumroad_fee": "471", "currency": "usd", "quantity": "1", "discover_fee_charged": "false", "can_contact": "true", "referrer": "https%3A%2F%2Fapp.gumroad.com%2F", "order_number": "124214", "sale_id": "asfas", "sale_timestamp": "2021-12-04T08%3A38%3A26Z", "purchaser_id": "3443251", "subscription_id": "sfasfasf%3D%3D", "variants": { "Tier": "Influencer" }, "test": "true", "ip_country": "India", "recurrence": "monthly", "is_gift_receiver_purchase": "false", "refunded": "false", "disputed": "false", "dispute_won": "" }
Once you expose an endpoint on your server, your handler can literally handle the data anyway you want to implement it.
In my case i just wanted to update or set user’s tier. But it can be leveraged for different use cases such as :
Let me briefly talk about how i did setup of things for SuperDMs:
Architecture diagram
You can also checkout blog by Faraz for code snippets