Pay with paypal and recurring using billing agreement API - paypal-sandbox

I just want to understand that how can I redirect user to PayPal account ==> login ==> agreed to payment teand based on selection I can call my Billing Agreement Rest API.
Do I need to setUp My Own UI to process payment ?

The most important thing here is that you cannot sign a billing agreement without a billing plan
So the first thing you need to consider is how you could create a plan.
Its very simple just trigger this api: https://developer.paypal.com/docs/api/payments.billing-plans/v1/
Now you have your plan Id
now you can subscribe a user with this plan id
by triggering this API
https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_create

Related

PayPal Instant Payment Notification for Held Payments

So I'm using an API to receive payment notifications,
I don't really care what's in the notification I just want paypal to notify the API when a payment has been made and execute my own code.
So first off is this even going to work?
I put the URL for the API in the Instant Payment Notification under my account settings. My account is still new because I sent a test payment and it didn't work, do held payments not notify the IPN?
If the payment is held within PayPal it will notify via IPN, yes. You will be able to see such held payments by logging into www.paypal.com and viewing the activity. There will also be a "pendingreason" value in the IPN, to notify you of why it is held.
Note that if at transaction time a "notify_url" is set by the integration (many older shopping carts do this), that URL will be used in place of whatever is set at the account level in www.paypal.com. Whatever was set at transaction time has precedence.
--
If an order is "on hold" by your shopping cart (pending payment), PayPal will not send any notification as nothing has taken place within its system (except maybe a checkout attempt that was clicked on but not finished for whatever reason)

Subscriptions in PayPal

I am working on integrating Recurring Payments functionality in Asp.Net based application where people can subscribe to a Service where they will be paying a monthly amount. I am trying to achieve the same using PayPal's Subscription APIs. One another aspect is where people will be making payments using their Credit Card instead of PayPal's account. I have tried to search for a sample code where I can see that Credit Card information is passed to the Subscription API but unable to find the same. Can anyone points me to a sample code where this is implemented or guide me on how I can do this?
PayPal does provide a Subscription only API for PayPal payments or Guest Checkout where buyer's prompt to create PayPal personal account. To achieve a Credit card subscription I'd reckon to refer to Braintree Vaulting functionality wherein you can have both Credit Card & PayPal.
Braintree Vault Overview:
Our Braintree Vault securely stores customer information – including payment method information – so you can safely keep customers on file.
The Vault is used to process payments with our recurring billing feature, and can also be used for non-recurring transactions so your customers don't need to re-enter their information each time they make a purchase from you.
https://articles.braintreepayments.com/control-panel/vault/overview
Thanks.

Firebase or firebase+paypal paid only accounts

I'm trying to set up user accounts for my website which are paid only. I don't want a user to have an option to create an account without having already paid. How would I go about this?
Example:
google pay button with a click subscribe simultaneously adding them on a subscription and creating their account (not sure how I would do this integration)
Paypal subscribe button which then takes them to a page where they can sign up after they pay (not sure how I would get their paypal subscription information though on that response if they don't choose to sign up)
I did find paypal subscriptions that generate usernames and passwords (https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/user-names-passwords/), however I dont know how I would correlate this with my firebase users.
I'd prefer a solution where after they subscribe they are automatically added to google firebase with an email and password (or temp password) and their paypal ID.
Use firebase functions and require they initiate a subscription with paypal buttons and onApprove of the paypal buttons, send an API call to your google function to add them to the database and send the sign up email.

WooCommerce Paypal - Disallow Payment based on PayPal Billing Address (Country Restriction)

A client of mine has some legal provisions that only allow him to offer PayPal as a payment method if the buyer's billing address is located in a specific country.
Naturally you can disable payment methods based on the billing address the buyer provides via WooCommerce. However, that is quite easy to manipulate.
PayPal asked them to implement a query, AFTER the buyer chose PayPal, signed into his account and accepted the payment method, to check if the billing address the buyer provided in his actual PayPal account is also located in that specific country. If so, the buyer proceeds to the 3rd checkout step and can finish his order. IF NOT, the buyer will be redirected to the 2nd checkout step, sees a note "This payment method is not available for your country" or whatever and can choose another payment method. So basically, the query has to check if the billing address is in a specific country and then decline the "payment execute" command.
I'm using the standard PayPal gateway that comes with WooCommerce. Does anyone have any idea how to make this work?
PS: Yes, retrieving the billing address from PayPal is usually not possible. However, my client got a special permit from PayPal to do so. So that's not an issue.
Using the PayPal Checkout plugin for WooCommerce, validate whether the response of the METHOD=GetExpressCheckoutDetails API call to PayPal contains the country you want, and use this to decide whether to let the customer proceed or not.

How do I link PayPay Standard on Website to PayPal Account?

I have Cube Cart V5 installed and have activated PayPal Standard as payment method. On a test sale, the PayPal screen comes up and asks 1) Login to your PayPal Account, 2) Use your credit card. How do I link this to my PayPal account so that purchases are registered to my PayPal account?
I am not familiar with Cube Cart but in the most basic way as a paypal merchant you are issued a merchant username and password that represents you and in your management tools for your cart you can cut and paste those values in there that will take care of transactions.
When a payment is initialized it is normally passes values through a URL string. Your merchant information will be in that string so it can match up to an account to receive money.
Paypal has integration documentation, but the people that support the Cart should be able to help you more efficiently. See if they have a forum if you don't get direct support.
I'm not sure what you're asking. Paypal works this way, by connecting you directly to paypal and allowing you to sign in and make your payment on their website. When your customer makes a payment, the money goes into your paypal account which you entered into cube during the setup process.
If you prefer to use paypal's api key, you can learn more about it at this link: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECAPICredentials/

Resources