Search code examples
pythonpaypalcredit-card

payment credit card or paypal using python?


I want to make a desktop application, but I have a problem. I can't find any code or tutorial for payment credit card or paypal for this.

Example: I make apps for monthly subscriptions, so I want a code or tutorial that uses a credit card or paypal for payment


Solution

  • For PayPal payments, you have to pop over to a web experience. It's not optional. For credit card payments it might be technically possible to take in numbers through your desktop application, but in practice this is more technically difficult to do in a secure way than also just popping over to a web payment interface. So you should do that.


    Recurring payments are where it gets complicated, they're not simple no matter what solution you choose -- especially if you have no business history to be approved for the more advanced reference transaction or tokenization features you might want. If you use PayPal for subscriptions, the payer will sign in to an existing account or enter their card details and create one. Here is the documentation: https://developer.paypal.com/docs/subscriptions/

    If you're looking for something simpler than implementing those API calls, at least to start, you can begin with their web interface to create a plan and generate a "Smart Payment Button" that uses it: https://www.paypal.com/billing/plans

    That will then need to go a website or .html file somewhere, and your python application can pop over to it or display an embedded browser when needed.