{"_id":"59a45d467ee621000fc9d409","category":{"_id":"59a45d447ee621000fc9d3ba","version":"59a45d437ee621000fc9d3b7","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","project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"version":{"_id":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-08-28T18:13:23.840Z","releaseDate":"2017-08-28T18:13:23.840Z","categories":["59a45d447ee621000fc9d3b8","59a45d447ee621000fc9d3b9","59a45d447ee621000fc9d3ba","59a45d447ee621000fc9d3bb","59a45d447ee621000fc9d3bc","59a45d447ee621000fc9d3bd","59a45d447ee621000fc9d3be","59a45d447ee621000fc9d3bf","59a45d447ee621000fc9d3c0","59a45d447ee621000fc9d3c1","59a45d447ee621000fc9d3c2","59a45d447ee621000fc9d3c3","59a45d447ee621000fc9d3c4","59a45d447ee621000fc9d3c5","59a45d447ee621000fc9d3c6","59a45d447ee621000fc9d3c7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.22.1","version_clean":"8976.0.0-XML","version":"8976-XML"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-19T13:51:34.817Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"language":"text","code":""}]},"settings":"","auth":"optional","params":[],"url":"/alt-transactions"},"isReference":true,"order":7,"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[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`alt-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [alt-transaction](doc:alt-transaction)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchant-transaction-id` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`soft-descriptor` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`amount` *decimal* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payer-info` *container* &nbsp;&nbsp;&nbsp;optional (see [payer-info](doc:payer-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaulted-shopper-id` *integer* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypal-transaction` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [paypal-transaction](doc:paypal-transaction))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-description` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-meta-data` *container* &nbsp;&nbsp;&nbsp;optional (see [transaction-meta-data](doc:transaction-meta-data))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-fraud-info` *container* &nbsp;&nbsp;&nbsp;optional (see [transaction-fraud-info](doc:transaction-fraud-info))\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains an `alt-transaction` resource (see [alt-transaction](doc:alt-transaction)) with the request properties plus these additions:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaulted-shopper-id`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paypal-transaction` is returned with the `paypal-url` and `order-id` (see [paypal-transaction](doc:paypal-transaction))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processing-info`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraud-result-info`\n\n<hr>\n\n##Examples\n\n###Request Examples  \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <amount>105.00</amount>\\n   <currency>USD</currency>\\n   <paypal-transaction>\\n      <order-id>4006145</order-id>\\n      <transaction-type>CAPTURE</transaction-type>\\n   </paypal-transaction>\\n</alt-transaction>\",\n      \"language\": \"curl\",\n      \"name\": \"Update PayPal Transaction for two-step flow (Capture)\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <amount>105.00</amount>\\n   <currency>USD</currency>\\n   <paypal-transaction>\\n      <order-id>4006145</order-id>\\n      <transaction-type>DO_ORDER</transaction-type>\\n   </paypal-transaction>\\n</alt-transaction>\",\n      \"language\": \"curl\",\n      \"name\": \"Update PayPal Transaction for three-step flow (Pending Order)\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <amount>104.00</amount>\\n   <currency>USD</currency>\\n   <paypal-transaction>\\n      <order-id>4006145</order-id>\\n      <transaction-type>CAPTURE</transaction-type>\\n   </paypal-transaction>\\n</alt-transaction>\",\n      \"language\": \"curl\",\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\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <transaction-id>38526326</transaction-id>\\n  <amount>105.00</amount>\\n  <currency>USD</currency>\\n  <vaulted-shopper-id>19587618</vaulted-shopper-id>\\n  <paypal-transaction>\\n    <order-id>4006145</order-id>\\n  </paypal-transaction>\\n  <processing-info>\\n    <processing-status>SUCCESS</processing-status>\\n  </processing-info>\\n</alt-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - two-step flow (Capture)\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <transaction-id>38526326</transaction-id>\\n <amount>105.00</amount>\\n  <currency>USD</currency>\\n  <vaulted-shopper-id>19587618</vaulted-shopper-id>\\n  <paypal-transaction>\\n    <order-id>4006145</order-id>\\n  </paypal-transaction>\\n  <processing-info>\\n    <processing-status>SUCCESS</processing-status>\\n  </processing-info>\\n</alt-transaction>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - three-step flow (Pending Order)\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n  <transaction-id>38526326</transaction-id>\\n  <amount>104.00</amount>\\n  <currency>USD</currency>\\n  <vaulted-shopper-id>19587618</vaulted-shopper-id>\\n  <paypal-transaction>\\n    <order-id>4006145</order-id>\\n  </paypal-transaction>\\n  <processing-info>\\n    <processing-status>SUCCESS</processing-status>\\n  </processing-info>\\n</alt-transaction>\\n\",\n      \"language\": \"xml\",\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\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<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 XML portion of the request below and then click **Try it!**\n\n**Tip**: Copy the XML portion from one of the example requests above, or use the XML code below as a starting point. You can enter different parameters and values 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\": \"<alt-transaction xmlns=\\\"http://ws.plimus.com\\\">\\n   <soft-descriptor>ABC COMPANY</soft-descriptor>\\n   <amount>100.00</amount>\\n   <currency>USD</currency>\\n   <paypal-transaction>\\n      <order-id>7078045</order-id>\\n      <transaction-type>DO_ORDER</transaction-type>\\n   </paypal-transaction>\\n</alt-transaction>\",\n      \"language\": \"xml\"\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

alt-transaction container    required, contains the following properties (see alt-transaction):
      merchant-transaction-id string    optional
      soft-descriptor string    optional
      amount decimal    required
      currency string    required
      payer-info container    optional (see payer-info)
      vaulted-shopper-id integer    optional
      paypal-transaction container    required (see paypal-transaction)
      transaction-description string    optional
      transaction-meta-data container    optional (see transaction-meta-data)
      transaction-fraud-info container    optional (see transaction-fraud-info)

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains an alt-transaction resource (see alt-transaction) with the request properties plus these additions:
      vaulted-shopper-id
      paypal-transaction is returned with the paypal-url and order-id (see paypal-transaction)
      processing-info
      fraud-result-info


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
   <amount>105.00</amount>
   <currency>USD</currency>
   <paypal-transaction>
      <order-id>4006145</order-id>
      <transaction-type>CAPTURE</transaction-type>
   </paypal-transaction>
</alt-transaction>
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
   <amount>105.00</amount>
   <currency>USD</currency>
   <paypal-transaction>
      <order-id>4006145</order-id>
      <transaction-type>DO_ORDER</transaction-type>
   </paypal-transaction>
</alt-transaction>
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
   <amount>104.00</amount>
   <currency>USD</currency>
   <paypal-transaction>
      <order-id>4006145</order-id>
      <transaction-type>CAPTURE</transaction-type>
   </paypal-transaction>
</alt-transaction>

Response Examples

<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38526326</transaction-id>
  <amount>105.00</amount>
  <currency>USD</currency>
  <vaulted-shopper-id>19587618</vaulted-shopper-id>
  <paypal-transaction>
    <order-id>4006145</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>
<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38526326</transaction-id>
 <amount>105.00</amount>
  <currency>USD</currency>
  <vaulted-shopper-id>19587618</vaulted-shopper-id>
  <paypal-transaction>
    <order-id>4006145</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>
<?xml version="1.0" encoding="UTF-8"?>
<alt-transaction xmlns="http://ws.plimus.com">
  <transaction-id>38526326</transaction-id>
  <amount>104.00</amount>
  <currency>USD</currency>
  <vaulted-shopper-id>19587618</vaulted-shopper-id>
  <paypal-transaction>
    <order-id>4006145</order-id>
  </paypal-transaction>
  <processing-info>
    <processing-status>SUCCESS</processing-status>
  </processing-info>
</alt-transaction>

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 XML portion of the request below and then click Try it!

Tip: Copy the XML portion from one of the example requests above, or use the XML code below as a starting point. You can enter different parameters and values 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.

<alt-transaction xmlns="http://ws.plimus.com">
   <soft-descriptor>ABC COMPANY</soft-descriptor>
   <amount>100.00</amount>
   <currency>USD</currency>
   <paypal-transaction>
      <order-id>7078045</order-id>
      <transaction-type>DO_ORDER</transaction-type>
   </paypal-transaction>
</alt-transaction>

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