How to change PayPal subscription account? - paypal

I implemented PayPal subscription on my site, using PayPal smart button.
The generation of subscription plans implemented on the site via PayPal subscription API v1.
Is there a possibility to implement a "change PayPal account" button for our clients? So that a client could keep the subscription status but switch the account the payments are charged from?

The client id of the button and the client id + secret for which the product and billing plan are created must be the same.
You can reuse the API code but you must create the product and plan for each account.

Related

Create and approve PayPal subscription after invoice status is paid

I am generating one PayPal invoice through API and send it to user for payment. after the user pays that invoice the status of invoice is changed to paid. Now I need to start a subscription because the user paid the invoice.
When I create a subscription it always give me "approval-pending" status . I want to set subscription status as "Active" because the user already paid for it through the invoice.
Invoicing and Subscriptions are two separate things. There is no crossover between them. You use one, or you use the other, as their own ways of receiving a payment.
To send an invoice from a PayPal account, use:
live: https://www.paypal.com/invoice
sandbox: https://www.sandbox.paypal.com/invoice
...or the invoicing API as desired.
To create and manage subscription plans, use:
live: https://www.paypal.com/billing/plans
sandbox: https://www.sandbox.paypal.com/billing/plans
... or the Subscriptions API if desired. In the account interface after setting up a plan, use the three dots menu to copy button code or a link for it. Alternatively, follow the subscriptions integration guide to make a button. Any created subscription, be it via a button click or API call, starts in a created state and pending approval until some payer signs in and confirms their subscription (i.e. gives approval)
Paying for an invoice has nothing to do with subscriptions, and will not approve any subscription. There is no way for a subscription to be approved that does not involve the user signing in and approving it, via its own button or link (nothing to do with invoices).
If you want to solicit subscriptions via an "Invoice", send your own invoice message (not a PayPal invoice) and include the subscription link, or a link to your own page's invoice view with a subscription button.

Adaptive Payments

We allow our customers to create invoices using our app, and then send them to their clients to be paid.
The current payment options we offer are stripe and offline payment.
We want to add PayPal as a payment method too.
Adaptive payment seems like the only way to do this, but it is no longer available?
*I've had a business PayPal account for over 6 years.
* Our app is plutio.com
If you could apply for an APP ID from below page, you are still able to create invoice via PayPal Adaptive Payments.
https://www.paypal-apps.com/user/my-account/applications
https://developer.paypal.com/docs/classic/products/invoicing/?mark=invoicing
And besides, PayPal has provided new REST API for invoicing. Please check below page for its details.
https://developer.paypal.com/docs/integration/direct/invoicing/

Paying automatically from 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.

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.