I'm using new PayPal REST API to manage users recurring payments. When i create recurring profile i provide return_url and cancel_url. But how do i know if scheduled payment succeeded or failed so i can prolong or cancel user profile in my application? I know there is IPN but it should be used with old Classic API.
Take a look at Instant Payment Notification. It will allow you to automate tasks based on all sorts of transactions on your account, including new subscription profiles and payments related to them.
Related
I am creating recurring payment using paypal and want the status of the payment after few days.I mean i want to check user is still subscribe us or cancel the subscription. if he/she cancel the subscription or i want to update his status into my website.
Can you anyone help me out please.
Thank you.
If you are using Standard subscriptions or NVP/SOAP recurring payments APIs when you will get an IPN when the profile is canceled, so you can automate the processing of that. In the case of recurring payments APIs you could also use GetRecurringPaymentsProfileDetails any time you want to check the status.
If you are using REST API billing agreements / billing plans then you can use Webhooks, which are similar to IPN. You could also use GET to pull plan details.
I want to make monthly subscription payment with paypal php rest api. Is it possible with rest api. If yes then please describe how can I achieve that. Also after successful subscription how can I cancel the subscription via Api. Also how can update the DB if subscription payment is failed.
It's possible to create a subscription payment with the Paypal API.
First of all you need to create a product with the catalogue api:
https://developer.paypal.com/docs/api/catalog-products/v1/#products_create
You have to create a product regardless what you are selling (physical goods or services)
The you will use the subscriptions api to create plans that are linked to the created product:
https://developer.paypal.com/docs/api/subscriptions/v1/#plans_create
Obviously a product can have multiple plans with different pricing or billing cycle
Finally you can integrate the Smart Payment buttons to your checkout form to allow users to subscribe to a plan:
https://developer.paypal.com/docs/subscriptions/integrate/#4-create-a-subscription
You can read the currently complete guide of paypal subscription integration here:
https://developer.paypal.com/docs/subscriptions/integrate/
After a subscription is created it can be canceled via the subscription api:
https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_cancel
I don't remember how to create the recurring payment with Paypal, but as far as I know, canceling it is not possible via their api.
On our website, we have to tell the users to cancel their subscription on paypal's website.
we are trying to add a pre-approval paypal process to our website before a user can bid on any of our items for sale. We currently accomplished this using Authorize.net but want to now integrate paypal as well.
I have been doing some research and am trying to find out if paypal even offers such a solution. The main reason for adding this verification is of course to make sure an individual actually has the money to purchase the item, some items can range from $100-$100,000. Does paypal offer a pre approval process for those types of transactions?
https://developer.paypal.com/docs/classic/api/adaptive-payments/Preapproval_API_Operation/
The Preapproval API gives your application permissions to trigger payments on a user's behalf without further approval (no login required to submit payments with a preapproval ID). There is no guarantee funds will be available when you submit this payment. A transaction with a preapproval ID could simply fail like any other transaction.
It sounds like what you're looking is the Authorization and Capture process, which is probably what you're doing with Auth.net, too.
With PayPal you can run Authorizations from credit cards directly (exactly like you do with Auth.net) and you can also do it with Express Checkout, which would be PayPal login payments.
Does anyone know is there any way to check status of recurring (subscription) payment at PayPal.
I just want to submit transaction ID and to see is payment canceled (suspended) or it is still active.
If you're using the Recurring Payments API you can use GetRecurringPaymentsProfileDetails to obtain details including the current status of the profile.
If you're working with Standard Subscriptions, though, then there is no API to obtain the details, unfortunately.
In either case, I'd recommend looking into Instant Payment Notification (IPN). Using it you could automate the process of sending email notifications, updating your own database, etc. when new profiles are created, suspended, re-activated, etc.
I have integrated standard paypal with one of sites and it works as follows: user selects which subscription to buy, he is redirected to paypal, paypal sends IPN response, I process it and then every X days PayPal sends a new IPN notifying site that user has been successfully charged for new subscription iteration. Now the problem is that user needs to have paypal account to sign up for such subscription.
The customer contacted PayPal and found out that it is possible to avoid having user to use their PayPal account to buy subscription when seller uses paypal pro account. Is it really so? Will I be able to gather user's card info, then send some request to PayPal API and have the subscription created. If yes, what will happen next? PayPal will be sending me IPN requests every X days notifying site that the card has been successfully charged?
Also, what is the general flow? Do I always have to gather card info and send it to paypal api or can I redirect user to paypal in a similar way as standard paypal functions?
Yes, this is possible. You would need to sign up for PayPal Website Payments Pro and Direct Payment Recurring Payments. You can then use the CreateRecurringPaymentsProfile API and specify the card details directly in a single API call.
This will create a recurring profile, which is billed every X days / months, depending on what you specified as the billing period in CreateRecurringPaymentsProfile.
Alternatively, you can also sign up for PayPal Premium Services (for the UK) or PayPal Enhanced Recurring Payments (for the US). This allows you to accept subscription payments from guest users, using the exact same integration you have at the moment, except a 'guest payment' section will be added to the PayPal checkout screen, so buyers won't be forced to create a PayPal account to sign up for your subscriptions any longer.
(Note: Enhanced Recurring Payments / Premium Services has other benefits as well, such as Installment Plans, but guest subscription payments is definitely the biggest benefit).