How can I obtain a token to charge authorized PayPal accounts as needed? - paypal

I have a white labeling Shopify app that bills store owners who install my app whenever orders for my vendor are created in their store. Currently I use Authorize.net as a payment processor. Store owners perform an initial setup whereby they authorize their credit card using a web form I provide. This provides me with a customer profile ID and a customer payment profile ID for the store owner, and I use these two ids to charge their credit card via Authorize.Net for each and every order that is placed through their store for when the order contains one or more of my white label products.
So essentially I have Authorize.Net tokens for each store, and I use those tokens to charge store owners' credit cards as orders come in through their store, and each order has a different charge amount (this is not a recurring payment that is of the same amount each time). Here is some sample code.
I'd like to use PayPal as a backup payment processor and reproduce this same functionality. I'm looking through PayPal's API as well as the Node SDK, and I am not sure how to accomplish the same thing with PayPal. I essentially want to obtain a token tied to the store owner's account which I can use to charge the seller for each order, and each order can have a different charge amount.
Can someone point me in the right direction?

Turns out that what I wanted seems to be Reference Transactions.
For documentation see https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/.
For an example see this project which uses the paypal-ec2 Node package.
The flow for the example project mentioned above appears to be as follows:
Create Billing Agreement with seller
Visit Express Checkout page
http://localhost:3000/checkout/callback_success is called
Receive token
Redirect to payment URL (which uses token received)
Receive token
Create a billing agreement
(no redirection or confirmation happens)
Receive and store a billing agreement token in database
You now have the ability to process payments in the future for arbitrary transaction amounts using the Billing Agreement ID

Related

Saving a paypal account for a user to my web application

I have a web application that allows users to purchase products online. I would like a user to add a paypal account to his or her account such that the next time, he or she needs to checkout, the paypal on file shall be used.
I do not want to store the payal details on my server instead i am looking for a service like paypal credit card vault.
An advantage for saving the paypal on vault is a user shall not be needed to enter email and password all over again.
Does paypal have a service like the one i describe?.
Yes, you can do this. It's done by creating a Billing Agreement and then processing future Reference Transactions based on that billing agreement.
This gives you a lot of power to process any amount at any time without further approval from the buyer. As such, this requires heavy vetting from PayPal.
They will only approve you for it if you're doing very high volume (millions of dollars per year) in most cases. But yes, it can be done.
Keep in mind that PayPal itself provides a "One Touch" feature so people can quickly checkout without entering credentials in the future. So they've basically built what you're wanting to do directly into the Express Checkout experience.

Paypal integration back-end?

Is it possible to store the clients credit card information on our secure website database and automatically pass the values to paypal to process without even having to show paypal website?
I would like to do this so client does not have to enter paypal credit card information each time for payment, if they do not want to setup a paypal account.
So basically just use the paypal system in the back-end. After the information is passed to paypal, it processes it, and redirects user to another page.
Update: Paypal Introducing Direct Payment
Can I just pass credit card information from my secure web database to direct payment system, and have it be processed without manually entering data?
It is never recommended to store credit card details in your database for a number of reasons. You really don't need to, either.
Instead, you can use PayPal's DoReferenceTransaction API.
The DoReferenceTransaction API operation processes a payment from a
buyer's account, which is identified by a previous transaction.
Basically, you just pass in the transaction ID of a previous sale or authorization transaction along with a new amount to be charged. PayPal will charge the card using the details they have saved in their system, so you don't have to worry about the hassle of protecting sensitive data like that.

Retrieving a users credit card details via paypal

I’m building a site to be based in Australia and I have been researching into saving credit card numbers. Currently I have not had much luck with my questions. Paypal was of little help.
The site will run on many small transactions. I plan on using the paypal gateway to handle payment both via credit card and paypal accounts.
What I would like to do is retrieve user’s credit card details so they do not need to input them each time.
How I imagine this to work is that the first time a customer will input their credit card details to make the purchase. Once this purchase has been completed the site will receive a transaction ID from paypal. I then save this ID for future reference mapped to the users ID or email address.
So the next time the user wishes to make a purchase via their credit card I can forward this transaction ID to paypal and it can already have all the fields populated with their card details. Or display a screen with the last 4 digits or similar and ask the user if they wish to use this card again.
This is all assuming that the user does not have a paypal account.
Is this possible? Is there a better/more cost effective solution than this?
Your understanding isn't too far off. When you submit card details to PayPal (or any payment gateway) you should get back a token id. You would store that token id instead of the card details, then at any future point you wish to take payment you submit the token id (along with payment value etc)
By only storing the token value (and not the card details) you free yourself of most of the hassle with PCI compliance. PCI does allow you to store part of the card details in plain text (at most the first six and last four digits), so you could safely store these along with your token id. That would allow you to display these details and ask 'use this card again'
An example of this is documented at PayPal's site here:
https://developer.paypal.com/webapps/developer/docs/integration/direct/store-a-credit-card/

store users credit card information to paylater

my requirement is to store users credit card information to pay-later. whether there is any option in paypal to store users credit-card information and pay it later or is there any options for this in any payment methods
Auth.Net's CIM is a viable option, but it is not a standard feature of an Auth.Net account and requires an extra fee each month to use. Depending on the PayPal payment method you're using, you can get a similar feature for free through reference transactions or billing agreements.
For up to a year after processing a credit card payment at PayPal, you can generate a follow-up reference transaction that uses the same payment details previously used to capture new money. If your customer paid using a PayPal account balance, you can establish a billing agreement that lets you charge their card at an arbitrary time in the future as well.
As far as I know, neither one of these features requires additional payment on your behalf. You just have to have a PayPal account that supports the API you want to use and know how to integrate it.
Yes. You would need to the use Authorize.Net's Customer Information Manager (CIM) API which allows you to store payment information as a payment profile on their server. You can then charge against it at any point in the future.

Which Paypal API for preapproved payments?

I'm trying to implement PayPal on a completely custom shopping cart and have been unable to figure out which API for recurring payments we need.
We ship a physical product every 2, 3, 4, 6 months so shipment and payment have to both happen together. In addition it must be easy for the user to change their shipment date - or add or remove items to their regular shipments without too much stress (either on their part or mine).
I've generally looked at Paypal's recurring billing as more suited to software based subscriptions and I don't think this is the API I need. I'd like to just bill the customer via a billing agreement and then initiate the shipment.
The way Skype does it seems to be ideal - they establish a billing agreement (shown in my PayPal account under 'My account > Profile > Pay List'
but I cannot seem to find that in the SOAP API document.
What is the API I need to create a billing agreement that I can trigger whenever I want. Can this be done with Express Checkout API ?
The API you are looking for is called reference transactions. This allows you to set up a billing agreement with a customer, get back a token, and then use that token to issue charges in the future. It can be done via the Express Checkout API.
You have to contact PayPal customer support to get this activated for your account before you can use it.