Would it be good practice to have paypal's transaction ID on a customers invoice?
I have a invoice with an order number from my own system and i was wondering if it is usefull to have paypal's transaction ID on the invoice as well?
ps: I realise i don't have code in my question but even paypal directs to stackoverflow, see footer https://developer.paypal.com/developer/applications/
PayPal uses a different transaction ID for each user, so your customer's transaction ID would be different.
Related
Is safe to give to client payment id and transaction id from Paypal?
For example:
Payment ID : PAY-4AB012345C901234DEFABCDE
Transaction ID: 12A34567BC8901234
Transaction ID is definitely safe. The user will even receive an email with the transaction ID as a reference.
Also, I'm pretty sure Payment ID is added to the redirect URL when the payment has been made. So they are both available for the user.
Both the Transaction ID and Payment ID are simply identifiers our system uses as part of the payment process. This information cannot really be used in any way that could cause harm.
Particularly the Payment ID is used to identify a session and has no meaning to your customers so there is no harm in displaying it, though there is also no point in displaying it at the same time.
My application uses PayPal java library to make payments. Everything works fine but I can't understand one thing. What exactly is transaction code? Let's say I make a payment and then approve it. As a result I receive the JSON object which has an ID (PAY-*) and transactions->related resources->sale->ID. Both of them I store in the DB in order to show later to user (in case he wants to refund the money). But if I see these payments from PayPal customer portal, in the descriptions of payment I see non of these ID's.. Transaction code is totally different! So which one of them should I store?
Thank you in advance
PayPal generally uses a transaction ID. It's a 16 character alphanumeric string. This will appear in both your API response and the PayPal site. Assuming REST is like Classic, the Transaction ID is how you will reference the payment for any future operations (capture, refund, etc).
Please note that if you're using Express Checkout (where the customer pays via PayPal account) they will have their own transaction ID for the exact same transaction.
I'm trying to determine a way to issue a refund for the user's order using the PayPal REST API. After taking a look at this section, I see that in the documentation on the left PayPal uses the terms "id" and "sale_id", while in the example on the right I see {transactionId}. The docs seem to be using the term "sale id" and "transaction id" interchangeably. Should I believe the example, and go ahead and use the transaction id I received via IPN earlier to issue a refund for the order?
Yes. sale_id is the same as transaction id in your PayPal account and IPN messages.
I'm using PayPal Express checkout and I'm trying to display to the customer their transaction id at the end of the checkout process on the thank you page.
I'm currently pulling back:
PAYMENTREQUEST_0_TRANSACTIONID
Which is the transaction id that is logged in my business account. However the transaction id on the email sent to the customer is different to this id that is being returned.
I'm using this API: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
The documentation states
"(Optional) Transaction identification number of the transaction that was created. You can specify up to 10 payments, where n is a digit between 0 and 9, inclusive.
Note This field is only returned after a successful transaction for DoExpressCheckout has occurred.
TRANSACTIONID is deprecated since version 63.0. Use PAYMENTREQUEST_0_TRANSACTIONID instead. "
I'm also using
PAYMENTREQUEST_0_INVNUM
Which is very helpful and lets me put my order reference number into the main body of the email that the customer receives, but I'd also like their transaction id, so that if they send a query through this can be logged in a field in the database and cross referenced against the order with just the transaction id.
Any help would be appreciated!
Thanks
PayPal assigns different transactions to the buyer and the seller. I'm not exactly sure why, but I know they do.
If a customer gives you their transaction ID, though, you CAN find it in your PayPal account by doing a search through paypal.com or via the TransactionSearch API.
Instant Payment Notification script receives among other parameters the following one:
payer_id = LPLWNMTBWMFAY
What is the meaning of that string?
It's an external unique identifier of a particular PayPal account. Since email addresses change over time. A PayerID is static.
As others have said, payer_id can be used to identify a Paypal account. HOWEVER! -- a single Paypal account can have several payer_ids associated with it, one for each credit card or funding source used by that account. Because of this, a given Paypal account does NOT map one-to-one to a single payer_id.
For example, if Bob buys from my website (through Paypal) using his Visa card, the transaction will include one payer_id. If Bob later buys using his Mastercard, the transaction will include a different payer_id.
I confirmed this in a phone call with Paypal Merchant Technical Solutions, in May of 2013, after running into problems with my order processing (due to an incorrect assumption I had made about payer_id being a reliable way to see if a customer already existed within my customer database).
NB: One ramification of this fact is that, when writing a Paypal IPN-processing script, payer_id should properly be stored only in the "orders" database table, and not stored in the "customers" table.
See also this answer: Is the paypal payer_id unique per credit card?
EDIT:
Apparently, each PayPal account does get just one payer_id. (That is not what I gleaned from my aforementioned phone call with Paypal Merchant Technical Solutions, but I can't find my notes on that call, so perhaps there was some confusion there.) Regardless, the payer_id does NOT uniquely identify a customer – as in a single, unique individual somewhere out there in the world. A customer could use multiple Paypal accounts, or could make some purchases as a "guest" using a different funding source than their primary Paypal account, and merchants would get different payer_ids for each one – even if the person's name, address, and all other identifying information were exact matches.
For these reasons, it is misleading for Paypal to call the payer_id variable a "Unique customer ID". Unfortunately, that description still persists in their documentation (scroll to the bottom of the "Buyer information variables" section):
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id091EB01I0Y4
It's just the id of the user who paid. You have to log it, to be able to give it to Paypal in case of conflict.
Payer_id is just paypal id of who pay the payment.
Email id is dynamic and always change, but payer_id is static.