{"_id":"59dfa5858b51880010b74aea","category":{"_id":"59dfa5828b51880010b74ab9","version":"59dfa5828b51880010b74ab6","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-13T18:31:11.123Z","from_sync":false,"order":2,"slug":"paypal-transaction-service","title":"PayPal Transactions"},"user":"560d5913af97231900938124","parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"59dfa5828b51880010b74ab6","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-10-12T17:25:22.850Z","releaseDate":"2017-10-12T17:25:22.850Z","categories":["59dfa5828b51880010b74ab7","59dfa5828b51880010b74ab8","59dfa5828b51880010b74ab9","59dfa5828b51880010b74aba","59dfa5828b51880010b74abb","59dfa5828b51880010b74abc","59dfa5828b51880010b74abd","59dfa5828b51880010b74abe","59dfa5828b51880010b74abf","59dfa5828b51880010b74ac0","59dfa5828b51880010b74ac1","59dfa5828b51880010b74ac2","59dfa5828b51880010b74ac3","59dfa5828b51880010b74ac4","59dfa5828b51880010b74ac5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.23 Release","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-19T13:49:38.827Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","auth":"optional","params":[],"url":"/alt-transactions"},"isReference":true,"order":1,"body":"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\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Getting started with PayPal in BlueSnap\",\n  \"body\": \"Go to the [PayPal Guide](doc:paypal) 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.\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend an **[altTransaction](doc:alt-transaction)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`amount` &nbsp;&nbsp;&nbsp; *decimal* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payerInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [payerInfo](doc:payer-info))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId` &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantTransactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`softDescriptor` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionDescription` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionMetaData` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionMetaData](doc:transaction-meta-data))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionFraudInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionFraudInfo](doc:transaction-fraud-info))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypalTransaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [paypalTransaction](doc:paypal-transaction))\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the request properties plus these additions:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId`\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypalTransaction` is returned with the `paypalUrl` and `orderId` (see [paypalTransaction](doc:paypal-transaction))\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processingInfo`\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraudResultInfo`\n\n<hr>\n\n##Examples \n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": \\\"105.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"orderId\\\": \\\"4006145\\\",\\n      \\\"transactionType\\\": \\\"CAPTURE\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Update PayPal Transaction for two-step flow (Capture)\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": \\\"105.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"orderId\\\": \\\"4006145\\\",\\n      \\\"transactionType\\\": \\\"DO_ORDER\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Update PayPal Transaction for three-step flow (Pending Order)\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"amount\\\": \\\"104.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"orderId\\\": \\\"4006145\\\",\\n      \\\"transactionType\\\": \\\"CAPTURE\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Update PayPal Transaction for three-step flow (Complete Order)\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"transactionId\\\": \\\"38526326\\\",\\n    \\\"amount\\\": \\\"105.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n    \\\"paypalTransaction\\\": { \\\"orderId\\\": \\\"4006145\\\" },\\n    \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"SUCCESS\\\" }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - two-step flow (Capture)\"\n    },\n    {\n      \"code\": \"{\\n    \\\"merchantTransactionId\\\": \\\"A3bn43\\\",\\n    \\\"transactionId\\\": \\\"38526326\\\",\\n    \\\"amount\\\": \\\"105.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n    \\\"paypalTransaction\\\": { \\\"orderId\\\": \\\"4006145\\\" },\\n    \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"SUCCESS\\\" }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - three-step flow (Pending Order)\"\n    },\n    {\n      \"code\": \"{\\n    \\\"merchantTransactionId\\\": \\\"A3bn43\\\",\\n    \\\"transactionId\\\": \\\"38526326\\\",\\n    \\\"amount\\\": \\\"104.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n    \\\"paypalTransaction\\\": { \\\"orderId\\\": \\\"4006145\\\" },\\n    \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"SUCCESS\\\" }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - three-step flow (Complete Order)\"\n    }\n  ]\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n##Example Descriptions\nFor details about the above examples, see:\n  * [Update PayPal Transaction two-step](#section-update-paypal-transaction-two-step)\n  * [Update PayPal Transaction three-step](#section-update-paypal-transaction-three-step)\n\n\n\n###Update PayPal Transaction two-step\nThis example shows an Update PayPal Transaction two-step request.\n\n###Update PayPal Transaction three-step\nThis example shows an Update PayPal Transaction two-step request.\n\n\n\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**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.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"amount\\\": \\\"105.00\\\",\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"paypalTransaction\\\": {\\n      \\\"orderId\\\": \\\"7078033\\\",\\n      \\\"transactionType\\\": \\\"DO_ORDER\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"update-paypal-transaction","type":"put","title":"Update PayPal Transaction"}

putUpdate PayPal Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

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)

      transactionFraudInfo     object    optional (see transactionFraudInfo)

      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.00",
    "currency": "USD",
    "vaultedShopperId": "19587618",
    "paypalTransaction": { "orderId": "4006145" },
    "processingInfo": { "processingStatus": "SUCCESS" }
  }
}
{
    "merchantTransactionId": "A3bn43",
    "transactionId": "38526326",
    "amount": "105.00",
    "currency": "USD",
    "vaultedShopperId": "19587618",
    "paypalTransaction": { "orderId": "4006145" },
    "processingInfo": { "processingStatus": "SUCCESS" }
}
{
    "merchantTransactionId": "A3bn43",
    "transactionId": "38526326",
    "amount": "104.00",
    "currency": "USD",
    "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

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"
    }
}

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}