Update PayPal Transaction

The Update PayPal Transaction is applicable for the Split-Step and Delayed Capture PayPal flows. After the Create PayPal Transaction, this step can be used to update the amount, create a pending order or complete the transaction and capture the funds

👍

Getting started with PayPal in BlueSnap

Go to the PayPal Guide for a walkthrough of implementing the PayPal payment method via the API. To use PayPal, you will need to first connect your PayPal and BlueSnap account, as described in the guide.

Try it in the API Explorer

Request Content

Send an altTransaction object, with the following:

      amount     decimal    required
     payerInfo     object    optional (see payerInfo)
     vaultedShopperId     integer    optional
     merchantTransactionId     string    optional
     softDescriptor     string    optional
     transactionDescription     string    optional
     currency     string    required
     transactionMetaData     object    optional (see transactionMetaData)
     paypalTransaction     object    required (see paypalTransaction)

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:

      vaultedShopperId
     paypalTransaction is returned with the paypalUrl and orderId (see paypalTransaction)
     processingInfo
     fraudResultInfo


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": "105.00",
    "currency": "USD",
    "paypalTransaction": {
      "orderId": "4006145",
      "transactionType": "CAPTURE"
    }
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": "105.00",
    "currency": "USD",
    "paypalTransaction": {
      "orderId": "4006145",
      "transactionType": "DO_ORDER"
    }
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "amount": "104.00",
    "currency": "USD",
    "paypalTransaction": {
      "orderId": "4006145",
      "transactionType": "CAPTURE"
    }
}

Response Examples

{
    "transactionId": "38526326",
    "amount": 105,
    "currency": "USD",
    "transactionApprovalDate": "09/29/2020",
    "transactionApprovalTime": "14:10:42",
    "vaultedShopperId": "19587618",
    "paypalTransaction": { "orderId": "4006145" },
    "processingInfo": { "processingStatus": "SUCCESS" }
}
{
    "merchantTransactionId": "A3bn43",
    "transactionId": "38526326",
    "amount": 105,
    "currency": "USD",
    "transactionApprovalDate": "09/29/2020",
    "transactionApprovalTime": "14:10:42",
    "vaultedShopperId": "19587618",
    "paypalTransaction": { "orderId": "4006145" },
    "processingInfo": { "processingStatus": "SUCCESS" }
}
{
    "merchantTransactionId": "A3bn43",
    "transactionId": "38526326",
    "amount": 105,
    "currency": "USD",
    "transactionApprovalDate": "09/29/2020",
    "transactionApprovalTime": "14:10:42",
    "vaultedShopperId": "19587618",
    "paypalTransaction": { "orderId": "4006145" },
    "processingInfo": { "processingStatus": "SUCCESS" }
}

Back to Top


##Example Descriptions For details about the above examples, see: * [Update PayPal Transaction two-step](#section-update-paypal-transaction-two-step) * [Update PayPal Transaction three-step](#section-update-paypal-transaction-three-step)

Update PayPal Transaction two-step

This example shows an Update PayPal Transaction two-step request.

Update PayPal Transaction three-step

This example shows an Update PayPal Transaction two-step request.


Back to Top

API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "amount": "105.00",
    "currency": "USD",
    "paypalTransaction": {
      "orderId": "7078033",
      "transactionType": "DO_ORDER"
    }
}
Language
Authorization
:
Click Try It! to start a request and see the response here!