Paypal classic API : Get declined recurring payment details - paypal

Please help me, How can I get list of declined recurring payments/profiles using classic API.

Create a script that takes your payment profile IDs and runs GetRecurringPaymentsProfileDetails API call for each profile and you can see the status of each one, the date of the last payment made, any past due amounts from failed payments, and more. You can then use the BillOutstandingAmount API to attempt to capture the past due amount for that profile.

Related

Handle recurring payments with paypal

I'am having troubles about how to handle the paypal recurrent payment system.
I followed every instruction in the website, but once i create the profile, paypal puts it in pending, making me doubt about the reliability of the service itself.
I tried to look over the internet but i didn't really get how this should work...
i made the first call with SetExpressCheckout in order to create the request, when the token is returned, i send the token to the paypal page, the user confirms the payment, then i call the CreateRecurringPaymentsProfile method to confirm the operation (passing PAYERID and TOKEN and setting the AMT value for the first payment and the PROFILESTARTDATE as now +1 month for the future payments)
Now when i try to read the response from the last call (or if i go to the buyer/seller paypal account) i see that the payment is in pending and i have to wait an undefined amount of time before this payment is activated.
Now the real question is: can i trust the fact that even if the payment is in pending, i'll receive the payment and so i can set set the user as member or i have to check and wait until the status is 'active' with the GetRecurringPaymentsProfileDetails method?
PS: i'm doing this in the sandbox version, maybe the official version is a bit faster and more reliable?
Thank you!
In Sandbox as in Live when you call CreateRecurringPaymentsProfile you will also get the response in which it will give you the status of the profile (ActiveProfile or PendingProfile). When the status is in Penidng it means that the system is in process of creating the recurring payment profile. You can then check your IPN messages for an update. It is normal but obviously if you notice that all the profiles you create get into Pending and never activate then there could be a bug but should not be the case. In here is the PayPal technical guide for this API: https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/

Recurring in Authorization & Capture

I managed to make an authorized payment using Authorization & Capture API.
SetExpressCheckout with PAYMENTREQUEST_n_PAYMENTACTION=Authorization
GetExpressCheckoutDetails to get PAYERID and other information
DoExpressCheckoutPayment with PAYMENTREQUEST_n_PAYMENTACTION=Authorization
DoCapture with AUTHORIZATIONID={transactionID_from_step_3}
Everything works fine. But, I unable to perform doAuthorization and DoReauthorization for the next time. I wish to charge my subscribers recurring every month. A few attempts have been tried. Does anyone know how to perform Authorization & Capture recurring? Any suggestions are greatly appreciated.
PS: Sorry for my broken English.
An authorization is an agreement to pay for one bundle of goods. Once that authorized transaction is completed the authorization is consumed/used up. You cannot use it (alone) for multiple transaction payments.
You need to use the Reference Transaction product, which is how PayPal collects the user's agreement for you to make (current and) future transactions:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Charge Paypal users without letting them enter their password again

We want to offer payments using paypal within our web-app concept. A few days ago i took my first ride using uber in Germany. They provide to add paypal as payment method and after every ride i just can pay using paypal without entering my credentials again.
How to implement a payment process like this?
We want our users to add paypal as payment method and then - X days aftersignup (eg. when we found the right product for him) we want to start the subscription.
The thing is that these X days varies from user to user so we cant use a billing agreement with a fixed start date and due to the fact its a subscription model we cant use just a single payment authorization.
I found the solution: Paypal calls this feature "Adaptive Payments". You can read it here: Adaptive Payments API Reference

Paypal Recurring Payment API CALL when taking money

I am writing a subscription where I need to provide users a month trial and charge $5.00 after trial is finished. I just found an amazing code to do that for me.
I also have setup paypalpro plus recurring payments
This is the link
https://github.com/krio/paypal-recurring-subscriptions
Questions:
1- How to make first month Free Trial?
2- I need to update users billing and update their payment in my database so it can calculate their subscription, how would i get to call from paypal to my files to update?
If you are using subscriptions and you are wanting to make the first month a free trial, you would need to pass over the following variables and values.
a1=0
p1=1
t1=M
You can find a description of all of the variables for subscriptions here.
If you are wanting to get updates back to your system/database to update your profiles and etc, you can use IPN to do this. Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other information related to a transaction.

Get Transactions associated with a Recurring Payment Profile in Paypal

I have gone through nearly all the question related to Recurring Payment using Paypal and have not found a solution to my problem.
We are implementing a system that is subscription based on a monthly basis (fixed amount). We do not want to store CC details for security reasons, hence we are trying to use Website Payments Pro from Paypal.
Once a user agrees to recurring payments, we are creating a RecurringPaymentProfile for that user and are storing the returned Profile_Id for the user.
Now we need to get information about all the transactions related to this Recurring Profile_Id. This information is available when we login to the Paypal account but this needs to be automated so that the application is aware of all the payments and also of the current subscription of the user.
We have found two methods (possibly) to implement this.
1. IPN (Instant Payment Notification, for this we will have to create a service to listen to notifications, which seems to be cumbersome and is more informational than we require)
2. TransactionSearch (but this returns transactions for the Paypal account and not Profile_Id)
Since we just want to know the transaction history associated with the Recurring Profile and whether this months payment was successful (implying the user is active member), what is the best method to implement this ?
Thanks,
You're looking for the GetRecurringPaymentsProfileDetails API Operation. This operation will allow you to view a majority of the details associated with a recurring payment profile using a valid PROFILEID.
Relevant detail fields you may be interested in:
LASTPAYMENTDATE
The date of the last successful payment received for
this profile, in YYYY-MM-DD format.
LASTPAYMENTAMT
The amount of the last successful payment received for this profile.
FAILEDPAYMENTCOUNT
The total number of failed billing cycles for this profile.
NEXTBILLINGDATE
The next scheduled billing date, in YYYY-MM-DD format.
NUMCYCYLESCOMPLETED
The number of billing cycles completed in the
current active subscription period. A billing cycle is considered
completed when payment is collected or after retry attempts to collect
payment for the current billing cycle have failed.