get paypal transaction ID from shopify Order API using ordertransaction object (graphql)

Shopify Partner
34 2 3

based on this reply from the shopify community, paypal transaction ID can be found in the "receiptJson" field data or the "receipt" field data (deprecated field) from ordertransaction object through the order "API".

Screenshot 2021-08-13 225106.png

if that was the case, i would be very thankful if someone could provide me this receipt data for an order, as long as the order was checked out through PayPal express checkout.

peace out

by the way i'm using "graphql" to query data from the API.

Replies 2 (2)

Shopify Partner
12 0 1

We're facing the same issue with one of our clients. Is there any way that we can get it? We're facing this issue with Klarna and Paypal

1 0 0

Better late than never.

The value of receiptJson is a string. After parsing, it looks like this (at least in my case):


"receiptJson": {
    "timestamp": "1970-01-01T00:00:00Z",
    "ack": "Success",
    "correlation_id": "xxxxxxxxxxxxx",
    "version": "XXX",
    "build": "XXXXXXXX",
    "transaction_id": "XXXXXXXXXXXXXXXXX",
    "parent_transaction_id": null,
    "receipt_id": null,
    "transaction_type": "cart",
    "payment_type": "instant",
    "payment_date": "1970-01-01T00:00:00Z",
    "gross_amount": "1.00",
    "gross_amount_currency_id": "EUR",
    "fee_amount": "1.00",
    "fee_amount_currency_id": "EUR",
    "tax_amount": "0.00",
    "tax_amount_currency_id": "EUR",
    "exchange_rate": null,
    "payment_status": "Completed",
    "pending_reason": "none",
    "reason_code": "none",
    "protection_eligibility": "Eligible",
    "protection_eligibility_type": "ItemNotReceivedEligible,UnauthorizedPaymentEligible",
    "pay_pal_account_id": "",
    "secure_merchant_account_id": "XXXXXXXXXXXXX",
    "success_page_redirect_requested": "false",
    "coupled_payment_info": null,
    "PaymentInfo": {
        "TransactionID": "XXXXXXXXXXXXXXXXX",
        "ParentTransactionID": null,
        "ReceiptID": null,
        "TransactionType": "cart",
        "PaymentType": "instant",
        "PaymentDate": "1970-01-01T00:00:00Z",
        "GrossAmount": "1.00",
        "FeeAmount": "1.00",
        "TaxAmount": "0.00",
        "ExchangeRate": null,
        "PaymentStatus": "Completed",
        "PendingReason": "none",
        "ReasonCode": "none",
        "ProtectionEligibility": "Eligible",
        "ProtectionEligibilityType": "ItemNotReceivedEligible,UnauthorizedPaymentEligible",
        "SellerDetails": {
            "PayPalAccountID": "",
            "SecureMerchantAccountID": "XXXXXXXXXXXXX"
    "SuccessPageRedirectRequested": "false",
    "CoupledPaymentInfo": null