I have a requirement. I have a website where student and teacher can login. There is a chat session between teacher and student for related cource. Now my requirement is Once any course completed it will directly pay the amount to the admin Paypal account , and if there is no dispute flagged from the user / student or admin end within 36 hours, then it will automatically payed to that teachers account.
Is this possible. How can I do this? Is this paypal pro which helps me.
Please help.
You can try processing transactions as an Order or Authorization. The money is reserved on the buyers funding source for three days. After the 36 hour period you can submit the capture API call to complete the payment.
If you're just going to use Authorization the teacher can complete the transaction themselves through their account. It may be safer to process Orders. It will take an extra step but the teacher can't claim the money manually.
When a transaction is processed as an Order you have to first submit a DoAuthorization API call and then later the DoCapture API call to complete. That is the only way to actually receive the money through an Order.
Related
We require reference transactions via PayPal to bill customers monthly with varying amounts.
e.g. first month is $30, second month may be $35, third month may be $25 etc
So far this seems to be the best approach: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/
I am using the PayPal recommended SDK from this page: https://developer.paypal.com/docs/classic/api/nvpsoap-sdks/
and using the ExpressCheckout Method. (paypal/merchant-sdk-php installed via composer)
We have a free PayPal business account.
Testing via Sandbox I am able to:
Get a token (SetExpressCheckout) - category->Digital, billingAgreement, Type=Sale
forward customer to sandbox paypal login
Confirm the payment
redirect back to our system (returnUrl)
Process the payment (GetExpressTocket + doExpressCheckout)
Questions:
Does the PayPal business account require any switch/status/upgrade to enable Reference transactions on the live environment?
How do you setup a $0 billing agreement to invoice an amount later in the month? When passing a 0 amount in step 1 above and error is displayed
Item name, amount and quantity are required if item category is
provided, ErrorCode 10003
This contradicts to documentation https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/#setting-up-a-billing-agreement-before-payment which states to set the amount to 0...?
UPDATE: Removing the setting $itemDetails->ItemCategory = 'Digital'; solved the $0 amount issue.
Billing ID is not returned even though I've passed the BillingAgreement data
// Billing agreement details
$billingAgreementDetails = new BillingAgreementDetailsType('MerchantInitiatedBillingSingleAgreement');
$billingAgreementDetails->BillingAgreementDescription = $billingAgreementTxt;
$setECReqDetails->BillingAgreementDetails = array($billingAgreementDetails);
I know there are a few questions within the post but I believe they are all related to the scope of 'Reference Transactions' within PayPal.
I'm looking for recommendations on approach and explanations to the contradictions in documentation. (or if I'm doing something wrong then happy to hear it)
To answer your question:
1) Does the PayPal business account require any switch/status/upgrade to enable Reference transactions on the live environment?
If you are receive an error when calling for Reference Transaction, probably that the setting is turned off in your account. You will need to contact PayPal Business Support team to enable it.
2) Billing ID is not returned.
To setup billing agreement, you will need to pass paymentaction=authorization in SetExpressCheckout request. You will not be able to setup billing agreement if you set the paymentaction as sale.
I am looking for alternatives to stripe's per-user pricing subscription : I need :
to charge my user a recurring payment which depends on the number of user accounts he has
to be able to change the number of users via an API, with customer validation is ok, but ideally without changing a plan nor creating a new type of plan. Check status, cancel, etc. via the API too.
Ideally with no up-front charge = fee + percentage of transaction
I found out that stripe might be a good option (see per-user pricing here https://stripe.com/docs/subscriptions) and unfortunately Paypal does not seem to offer this kind of feature (plans can only be increased by 20% each 180 days or you need to cancel previous profile and create a new one). Or am I mistaking about Paypal ?
What alternatives would exist for such needs?
What you want are Reference Transactions, in which case you run an original authorization or sale transaction, and then in the future you'd run DoReferenceTransaction with the original transaction ID and any new amount you need to process. It will process immediately without any redirection or additional authorization required at that point.
If you use reference transactions with Payments Pro (direct credit cards) then all you need to do is save the original auth or sale transaction ID to your database so that you can pull it out for the user when you need to process a future payment using DoReferenceTransaction.
For PayPal payments you'll use Express Checkout w/ Billing Agreements, which will give you back a billing agreement ID. In that case, the billing agreement ID is what you'd pass into future calls to DoReferenceTransaction.
In either case you'll need to build your own system to lookup payments that need to be processed each day and loop through them making a call to DoReferenceTransaction for each one.
I am trying to incorporate a member subscription on my website using the paypalrestsdk with python in a django application. I understand that I need to do the following:
Set up a BillingPlan for each type of subscription (ie. a monthly plan for $10 a month and a yearly plan for $100 a month)
Create a BillingAgreement, which (based on the user choice of billing plan) redirects the user to approve the agreement and which returns the agreement object which will give me the ability to access the plan information in order to update, suspend, reactivate the agreement.
Finally, in order to get started, I need to execute the BillingAgreement. This is the part that confuses me. Do I execute the agreement each month (for my users who have agreed to monthly subscription) or do I execute the agreement one time in order to tell PayPal to automatically process the monthly payment? If the latter case is the answer then how would I know if a payment failed for some reason? (Or do I need to check every time the user logs in by retrieving their BillingAgreement and searching for transactions within a particular date range for that agreement to make sure they are up to date and none of them failed?)
I have looked at the PayPal developer docs as well as GitHub samples. I have also successfully written code to create and execute one-time payments using the sandbox and all seems to be working just fine. I am just confused by how the recurring payments in the REST api work - specifically see #3 above.
You do not need to execute the billing agreement each month but only once to start the agreement i.e. tell PayPal to automatically process the monthly payment.
You can use the search for transactions feature to check that none of the payments of a user failed, but you might only need to do that at the start of every monthly payment cycle for a particular user. As opposed to everytime they log in. In the future, we will try to provide better notification mechanisms to inform the merchant that a payment on a billing agreement has failed/changed status.
I am using PayPal Payments Standard to upload contents from a custom shopping cart. i.e. The upload happens with a page redirect which posts the hidden vars to PayPal where the customer completes the transaction. When the transaction finishes, PayPal uses the "IPN" process to notify my the payment has been made.
In this case a reservation is made at the same time. The same as selling a limited stock item. As it wouldn't be good to have multiple PayPal transactions out there contending for the same slot, the reservation is made before the customer gets redirected to PayPal.
Once the Customer is at PayPal they might realize they don't have any money and close the window leading to an unpaid reservation that needs timed out and dropped.
Is there a guaranteed expiration time for the PayPal checkout page after which the reservation can be discarded without a risk of receiving a surprise payment for a deleted transaction? I realize IPN has it's own non-deterministic timing stuff, but without knowing there even is an expiration period, someone might sit on the website for a day and then pay.
Possibly too late to help you, but for the record: I asked PayPal tech support this question, as I couldn't find it in the docs either. They wrote:
Each transaction is associated with a token that expires after 3 hours
if the buyer didn't complete the checkout. This isn't usually
modifiable but can be extended by contacting a Business service
representative ( we don't recommend to extend it for security reasons
however. the token can't be less than 3H in any case)
So it's a MINIMUM of three hours.
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.