API paypal transaction number

schuetti
New Member
1 0 0

Hi,

any idea of the API of the PayPal transaction number. I would like to pull this number with every payment together with the order number in my ERP system.

 

0 Likes
_JB
Shopify Staff
Shopify Staff
750 87 165

Hey @schuetti,

Transaction data can be retrieved by querying the transaction object on orders. 

This requires an extra call when using the REST API (look for field authorization in the response):

 

GET /admin/api/2021-01/orders/{order_id}/transactions.json

 

Or can be done in a single call when using GraphQL: 

 

{
  orders(first: 10) {
    edges {
      node {
        id
        name
        transactions(first: 5) {
          id
          gateway
          authorizationCode
        }
      }
    }
  }
}

 

 

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes