ehku
ehku

Reputation: 159

How to get Transaction ID for Paypal API V2

How to find the transaction ID from PayPal V2 API? I would like to give the transaction ID for buyer to track their transaction.

I can get the order ID and Capture ID but fail to find where to find the transaction ID. Only the deprecated V1 API can get the transaction ID. Is it not available anymore for V2?

FYI, the answer for V1 is here Paypal Transaction ID

Upvotes: 6

Views: 4883

Answers (3)

PayPal_Bala
PayPal_Bala

Reputation: 31

In the PayPal V2 API, there are three APIs are normally associated:

  1. Create authorization - https://developer.paypal.com/docs/api/overview/#authentication-and-authorization

  2. Create order - https://developer.paypal.com/docs/api/orders/v2/#orders_create

  3. Capture order - https://developer.paypal.com/docs/api/orders/v2/#orders_capture You can get the Transaction ID from this API response. It should be under
    "payments": { "captures": [ { "id": "3C679366HH908993F",

Upvotes: 3

Libby Lebyane
Libby Lebyane

Reputation: 175

Best way to do tracking on the transaction with your system and PayPal, use invoice_id in the purchase_units of the PayPal buttons. Checkout https://stackoverflow.com/a/66943880

Upvotes: 0

Rahul Dighe
Rahul Dighe

Reputation: 732

An API caller is never shared the transaction ID that is sent in the receipt to the buyer. Seller has their own capture/authorization id Buyer has their own capture/authorization id

if you want to use a common tracking identifier you can populate invoice_id ?

just curious how do intent to use >> I would like to give the transaction ID for buyer to track their transaction. >> can you elaborate it a little bit.

Upvotes: 1

Related Questions