开发者

Implement a paid subscription service on a website

开发者 https://www.devze.com 2023-01-29 16:42 出处:网络
I have a website and I would like to implement a paid subscription service. Its a simple service with only 2 types of plans. For now, ill just use Paypal. But im a littl开发者_如何学JAVAe lost before

I have a website and I would like to implement a paid subscription service. Its a simple service with only 2 types of plans. For now, ill just use Paypal. But im a littl开发者_如何学JAVAe lost before start, mainly with the data model. My main question for now is, what information do I need to keep for each subscription? Do I need to implement a shopping cart for this (dont think so)? Im not asking for a detailed explanation, just a few lights or resources to find a way to start. Thanks.


Depends on what technology you're using. Basic payments work a bit like this

-> You send them to paypal with a plan (you define the plan on paypal) they know which amount to charge you can pass custom parameters which they will pass back

Customer fills in application

<- paypal tells you that your predefined plan got purchased in this same request, they send a lot of info about the payment including a GUID and your params

-> you ask paypal "hey, some one just told me this plan GUID got purchased, can you confirm"

<- paypal service returns 'yes'

-> you take the customer's ID from the params that you attached when you sent them to the paypal service and update them to "paid" in the database, or whatever

That's it in a nutshell...


Look at any subscription card mailer from any magazine and you can get an idea of what kind of data you will have to record. Start and end date for the subscription would be a good thing to keep, and what kind of plan the user is subscribed to. Once you have the end date, you just need to run a query to get the records of the users that have access. Something like Select * from users where subscription_end_date is >= today

I'm sure there will be a lot of other columns that will go into your final product, but that will be up to you to decide what data you want to keep. What are the different states that a subscription can be in? Can someone be subscribed to both services at the same time?


PayPal does a decent job if you want to charge the same amount every month. However, if you anticipate your users making changes to their subscription plans (upgrades/downgrades) or needing to provide credits to their account for customer support purposes, PayPal would require that you cancel the subscription...and then have the customer re-subscribe.

[Full disclosure - I am a co-founder of Recurly.com]

Recurly handles the upgrades and downgrades, and provides automated customer emails to be sent out to your customers (on your behalf) for every event confirmation, and invoice that occurs. You also have a full account management dashboard and reporting so that you don't need to build this yourself.

Best of all, if you ever decide to leave PayPal, and move your business to a standalone payment gateway, Recurly stores all of your credit cards in a PCI compliant vault so you don't need to ask you customers to come back and re-subscribe. (PayPal will not return your customer credit card information). You simply configure your new gateway in Recurly, and payments will be processed without any interruption to your business.

Here is a blog post we wrote on the topic: http://blog.recurly.com/2010/08/top-ten-reasons-to-use-recurly-vs-paypal-for-recurring-billing/

-Best of luck.

-Dan

0

精彩评论

暂无评论...
验证码 换一张
取 消