API functions to use as replacement for subscription

I have a website coded in PHP that uses paypal buttons/IPN for subscriptions.

The method is limited and I need to replace it with the REST-API.

What the system needs to do:

  • Accept new user recurring-payment subscriptions
  • Be able to change plan pricing for new users
  • Be able to change plan pricing for existing users
  • Change subscription plans mid-subscription(If a user upgrades from pro to master the price goes up, and the opposite way it goes down). The price difference between packages is 5$
  • Give periodic discounts for a limited amount of months.
  • The questions:

    1.) What is the equivalent of recurring-payments in the PHP-API or REST-API? (I'd rather it auto-charges and notifies my IPN if possible)

    2.) How can I automatically refund/charge an additional amount when the user upgrades/downgrades in the middle of a month?

    3.) Is there a standalone PHP control-panel that can connect to the paypal API to manage the subscription packages + sales?

    Thanks in advance!


    If you are looking to use REST APIs, the best place to start is going to be at the REST API docs. For your situation, you can use the vault to set up a recurring payment system. You could also use the future payments API, but you will need to make sure you buy DPRP for your account. Contact PayPal Customer Support to enable DPRP.

    With the Vault API, you can just create one time payments over and over with the token you get when storing a credit card.

    There is an in-depth walkthrough using the SDK on the PayPal PHP SDK Wiki.

    To do refunds, you can use the Refund REST API. All this assuming that you would be writing scripts to detect your user downgrading/upgrading. You would just need to store the amount they are paying each month in your DB.

    There are some shopping carts out there that are implementing REST APIs. You might need to google search for something like that.

    Hope that helps and gets you started in the right direction!

    链接地址: http://www.djcxy.com/p/27874.html

    上一篇: PayPal订阅和IPN

    下一篇: API函数用作订阅的替代品