1
4 Comments

Question for Integrating with PayPal

Hi, I use PHP as my tech stack. But I'm not sure how to integrate with paypal.
Let's say the app want to sell a simple e-book pdf. When you pay, you will get an e-book pdf delivered to your email.
(But I also wonder on how to subscription model)

  1. Should we put credit card input field? If I see people use stripe, they have credit card fields.
  2. What API endpoints should I use to charge the customer?
  3. What should I use to know when customer has paid? A webhook?
on December 28, 2020
  1. 1

    For an e-book, Gumroad is simpler. It lets you charge for payments without coding. See here: https://gumroad.com/.

    You should use PayPal or Stripe if you have a more complex use case. For example, if you have a web app, and you need to unlock certain features for the user after the user has paid, PayPal and Stripe enable you to do this because they send an event to your API endpoint whenever a user pays.

  2. 1

    You 100% would NOT store the credit card info. Check out Paypal's API documents. They answer all of your questions you listed.

  3. 1

    Stripe takes care of all of this :) I would recommend using them.

    1. 1

      Hi @flurly, I would love too, but as of now, Stripe is not yet available to my country. That's why I still use PayPal.