Paying automatically from PayPal - paypal

I need to know if the following scenario can be developed.
I have a website where the mode of payment is pay-by-usage. So when the customer exceeds a particular amount, I need to charge his PayPal account automatically. Is this possible in the PayPal API?

You can use PayPal Adaptive payment and there is an option to charge user account automatically. It is called PayPal Pre Approval payment.
In the first phase the user has to authorize your app to perform payment onbehalf of user. During this authorization step, you will get and authorize pre approval key. Later you could automatically charge user PayPal account using this key.

Related

Paypal integration in php by storing user credentials

I tried to integrate paypal in my website and I was able to implement it . I tested the transcations with sandbox account provided by paypal. For each transaction, buyer need to enter his credit card details or other paypal account informations. So I would like to store the user credentials in my database and then at the time of transaction, make the buyer proceed with transaction without entering details again. Can you please suggest if there is any possibility for implementing this or any suggestions to do so? All suggestions are welcome.
You wouldn't store the buyer's PayPal credentials (because that's about the worst crime you can commit in internet security), but you can create a billing agreement with the buyer. The billing agreement would allow you to charge the buyer, at a later date, without having to send the buyer to PayPal again to approve the payment. This page tells you how to do it: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Use PayPal From Website Form

Requirements state that I build a form that collects user's PayPal login info and charges the user's PayPal account a fixed price without having the user leave the website.
I am beginning to think this is not possible. Can someone kindly suggest a solution that comes close to meeting the requirements? I am not certain what's possible and what's not possible with PayPal.
There isn't a solution for what you are trying to do. In order for the buyer to login and pay with PayPal, they would have to leave your site and go to the PayPal login page. You could set up a billing agreement so that they only have to log into PayPal once. With a billing agreement, you would be able to charge the buyer's PayPal account when you are needing to. You would just need to have the buyer go through the flow initially and get sent over to PayPal to login and agreen to the billing agreement. Then when you want to charge them again in the future, you would just need to reference the billing agreement id.
The closest solution to having the user pay without leaving the website is PayPal digital goods express checkout.
Here is an example to show you how it works:
http://jmsliu.com/1307/integrate-paypal-digital-goods-express-checkout-into-website.html

Is it possible to unsubscribe an user via the Paypal Adaptive payment API?

My users subscribe to my project using the paypal button "Subscribe", and then I manage the monthly payments via the IPN, but if the user delete his account, I'd like to unsubscribe him automatically, without asking him to go to Paypal to cancel his subscription.
Is it possible to use the Paypal Adaptive Payment API to tell Paypal to unsubscribe this user ?
Bonus question : is it possible to use the Paypal Adaptive Payment API to know the status of the subscription, and eventually also to modify it (lower the amount for example) ?
You wouldn't use the Adaptive Payments API to unsubscribe a user from a subscription. If the buyer signed up for a subscription, you could ManageRecurringPaymentsProfileStatus API to cancel the profile. As for the status, you would not be able to use the "GetRecurringPaymentsProfileDetails" API call to get the status for subscriptions. This would only be supported for recurring payments, not subscriptions. However, you could use IPN which would send you the details when the profile gets created, when a new transaction is processed, and etc. Then you could just query your own database for the details.

paypal website standard for subscription, cancelling subscription

Please help me with my requirement to implement using paypal.
My requirement is this :
The user can subscribe to a service, using paypal account or credit card ( without paypal account ) . The user can unsubscribe later if he/she wishes to .
I implemented the first part using Subscription button of "website standard" where paypal gave me a button and upon clicking it will lead to paypal website.
I am getting the notifications using IPN
Now there are two problems:
How to test credit card, I could test paypal account payment using the sandbox test users, but for the credit card, I dont have dummy credit cards. If I use the credit cards of the paypal accounts, it says "paypal users should use paypal to pay "
I want to cancel the subscription. The paypal user can go to the paypal account and cancel the subscription. That works fine. But how can we cancel the subscription from my website, or how can we cancel the subscription of the creditcard payer. The paypal SDK says the subscription profile ID is invalid.
Did anyone tried this kind of implementation.
Any help would do, be it links or places to search .
Thanks a lot
First, Guest Checkout (paying with a credit card without signing into PayPal) is only available without recurring payments. When using recurring payments it will force the person to create a PayPal account. You would need to use Payments Pro in order to do recurring payments directly with credit cards, and then the person would never even be redirected over to PayPal at all.
For test cards, any old expired card you have would work, or what you can do is login to your PayPal sandbox account, go into the profile, and go through the process to add a new credit card to the account. It will actually fill in a card number for you, but DO NOT add this card to the account. Just copy that card number and then cancel out of this screen. Now you can use that card number for testing on the PayPal system.
In order to refund using the API you'll need to create the profiles using the CreateRecurringPaymentsProfile API. The profile ID that gives you will be compatible with all API calls to manage it in the future.

Paypay website payments standard API: pay without paypal account

we have set up Paypal as a hook into an e-commerce application, where users just enter their paypal account, and we link their clients through to their Paypal account when buying products.
This works great, and paypal asks you to login to pay for your purchases.
But we don't want clients to be forced to create a paypal account, just to make a purchase.
Does website payments standard API actually support paying without a paypal account?
At the moment this is a real showstopper for us.
Check out PayPal Adaptive Accounts. You can create PP accounts for your users. The only step they'll have to complete at PayPal is creating a password. Once the account is created you might need send the user back through a checkout flow.
Adaptive Accounts
Use the Adaptive Accounts API to build applications that create and manage PayPal accounts. Merchants and developers can use the API to create PayPal accounts, add payment methods to accounts, and verify a PayPal account status.
Paypal is a very useful payment service gateway, exactly because the customer does not need to enter a credit-card number.
What we do, is offer Paypal as an option. We allow credit-card entry as well. In order to evaluate the credit-card for validity etc., we interface with the bank that supports our account and let their system do the checks. Another option would be "Cash on Delivery".