Retrieve PayPal Transaction

This request gets details about a past PayPal transaction, such as the transaction ID, amount, currency, payer info or vaulted shopper, PayPal URL, order ID and so on.

Note: If you are using the API + Hosted Page Hybrid solution, this can also return transactions created in Hosted Payment Pages.

Try it in the API Explorer

Request Content

No content is required in the request body. Enter the relevant IDs in the request URL, as follows:

Retrieve based on Order ID
Enter the PayPal Order ID into the web service URL, in the format:
services/2/alt-transactions/resolve?orderId={order-id}

For example:
services/2/alt-transactions/resolve?orderId=5666625

Retrieve based on Transaction ID
Enter the transaction-id into the web service URL, in the format:
services/2/alt-transactions/{transaction-id}

For example:
services/2/transactions/38430646

📘

The transaction ID is created only after the PayPal transaction is complete. It is can then be found in the return-url as query parameter or under the alt-transaction resource.

Retrieve based on Merchant Transaction ID and Merchant ID
Enter the merchant-id and merchant-transaction-id into the web service URL, in the format:
services/2/alt-transactions/{merchant-transaction-id},{merchant-id}

For example:
services/2/alt-transactions/3,456

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved alt-transaction resource (see alt-transaction).

If you passed metadata in the original transaction request, this metadata will also be retrieved.

If the payment was for a subscription, the 'paypal-subscription-id' will also be included in the response. For more information, see the guide to processing merchant-managed PayPal subscriptions..


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/alt-transactions/resolve?orderId=3979639 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/alt-transactions/38501970 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/alt-transactions/12345,395608 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Examples

HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38501970</transaction-id>
  <soft-descriptor>ABC COMPANY</soft-descriptor>
  <amount>100</amount>
  <currency>USD</currency>
  <transaction-approval-date>10/01/2020</transaction-approval-date>
  <transaction-approval-time>10:19:21</transaction-approval-time>
  <vaulted-shopper-id>1234</vaulted-shopper-id>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
  </payer-info>
  <paypal-transaction>
    <paypal-url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-1H0778387R312591N</paypal-url>
    <order-id>3979639</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>
HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
    <soft-descriptor>ABC COMPANY</soft-descriptor>
    <amount>100</amount>
    <currency>USD</currency>
    <vaulted-shopper-id>1234</vaulted-shopper-id>
    <payer-info>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
    </payer-info>
    <paypal-transaction>
        <paypal-url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-5XL55248WK026621X</paypal-url>
        <order-id>3979303</order-id>
    </paypal-transaction>
    <processing-info>
        <processing-status>PENDING</processing-status>
    </processing-info>
</alt-transaction>
HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38501970</transaction-id>
  <soft-descriptor>ABC COMPANY</soft-descriptor>
  <amount>100</amount>
  <currency>USD</currency>
  <transaction-approval-date>10/01/2020</transaction-approval-date>
  <transaction-approval-time>10:19:21</transaction-approval-time>
  <vaulted-shopper-id>1234</vaulted-shopper-id>
  <payer-info>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
  </payer-info>
  <paypal-transaction>
    <paypal-url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-1H0778387R312591N</paypal-url>
    <order-id>3979639</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>
HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38500786</transaction-id>
  <soft-descriptor>ABC COMPANY</soft-descriptor>
  <amount>100</amount>
  <currency>USD</currency>
  <transaction-approval-date>10/01/2020</transaction-approval-date>
  <transaction-approval-time>10:19:21</transaction-approval-time>
  <vaulted-shopper-id>1234</vaulted-shopper-id>
  <paypal-transaction>
    <paypal-url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout</paypal-url>
    <paypal-subscription-id>1234567</paypal-subscription-id>
    <order-id>980111</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>
HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
    <merchant-transaction-id>12345</merchant-transaction-id>
    <soft-descriptor>ABC COMPANY</soft-descriptor>
    <amount>100</amount>
    <currency>USD</currency>
    <vaulted-shopper-id>1234</vaulted-shopper-id>
    <payer-info>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
    </payer-info>
    <paypal-transaction>
        <paypal-url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-2RK67425NC888032A</paypal-url>
        <order-id>3979665</order-id>
    </paypal-transaction>
    <transaction-meta-data>
        <meta-data>
            <meta-key>cityTaxAmount</meta-key>
            <meta-value>20.00</meta-value>
            <meta-description>City Tax Amount</meta-description>
        </meta-data>
        <meta-data>
            <meta-key>shippingAmount</meta-key>
            <meta-value>10.00</meta-value>
            <meta-description>Shipping Amount</meta-description>
        </meta-data>
        <meta-data>
            <meta-key>stateTaxAmount</meta-key>
            <meta-value>20.00</meta-value>
            <meta-description>State Tax Amount</meta-description>
        </meta-data>
    </transaction-meta-data>
    <processing-info>
        <processing-status>PENDING</processing-status>
    </processing-info>
</alt-transaction>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38417606</transaction-id>
  <soft-descriptor>ABC COMPANY</soft-descriptor>
  <amount>55</amount>
  <currency>USD</currency>
  <transaction-approval-date>10/01/2020</transaction-approval-date>
  <transaction-approval-time>10:19:21</transaction-approval-time>
  <vaulted-shopper-id>19490082</vaulted-shopper-id>
  <paypal-transaction>
    <paypal-url
      >https&#x3a;&#x2f;&#x2f;www.sandbox.paypal.com&#x2f;us&#x2f;cgi-bin&#x2f;webscr&#x3f;cmd&#x3d;_express-checkout&#x26;token&#x3d;EC-7YD07100DG923212M</paypal-url
    >
    <order-id>3906757</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>REFUNDED</processing-status>
  </processing-info>
  <refunds>
    <refund>
      <amount>1.00</amount>
      <currency>USD</currency>
      <date>2020-10-03</date>
    </refund>
    <refund>
      <amount>1.00</amount>
      <currency>USD</currency>
      <date>2020-10-03</date>
    </refund>
    <refund>
      <amount>48.05</amount>
      <currency>USD</currency>
      <date>2020-10-03</date>
    </refund>
  </refunds>
</alt-transaction>

Example Descriptions

Retrieve based on Order ID

This is a retrieval based on the order-id, which is provided by PayPal and appears in the response from the API for that transaction.

Retrieve based on Transaction ID

This is a retrieval based on the transaction-id. This ID is created after the PayPal transaction has been completed.

Retrieve based on Merchant Transaction ID and Merchant ID

This is a retrieval based on the merchant-transaction-id and merchant-id. It is applicable to merchants who pass their own Merchant Transaction IDs with each transaction.

Response for transaction with refunds

If one or more refunds (including partial refunds) have been applied to the transaction, the refund details appear in the refunds element.


Back to Top

API Explorer (for request based on Order ID)

To test out a call, enter an existing order ID (e.g 5666625) in the order-id field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.

Language
Credentials
:
Click Try It! to start a request and see the response here!