{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/alt-transactions","auth":"optional","examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","params":[]},"next":{"description":"","pages":[]},"title":"Update PayPal Transaction","type":"endpoint","slug":"update-paypal-transaction","excerpt":"","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 `amount` *decimal* <span style=\"color:#F37500\">**required**</span>\n `payerInfo` *object* optional (see [payerInfo](doc:payer-info))\n `vaultedShopperId` *integer* optional\n `merchantTransactionId` *string* optional\n `softDescriptor` *string* optional\n `transactionDescription` *string* optional\n `currency` *string* <span style=\"color:#F37500\">**required**</span>\n `transactionMetaData` *object* optional (see [transactionMetaData](doc:transaction-meta-data))\n `paypalTransaction` *object* <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 `vaultedShopperId`\n `paypalTransaction` is returned with the `paypalUrl` and `orderId` (see [paypalTransaction](doc:paypal-transaction))\n `processingInfo`\n `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,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"14:10:42\\\",\\n \\\"vaultedShopperId\\\": \\\"19587618\\\",\\n \\\"paypalTransaction\\\": { \\\"orderId\\\": \\\"4006145\\\" },\\n \\\"processingInfo\\\": { \\\"processingStatus\\\": \\\"SUCCESS\\\" }\\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,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"14:10:42\\\",\\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\\\": 105,\\n \\\"currency\\\": \\\"USD\\\",\\n \\\"transactionApprovalDate\\\": \\\"09/29/2020\\\",\\n \\\"transactionApprovalTime\\\": \\\"14:10:42\\\",\\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]","updates":[],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"628531cd1258c8003f6dd23a","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"PayPal Transactions","slug":"paypal-transaction-service","order":2,"from_sync":false,"reference":true,"_id":"628531cd1258c8003f6dd1c1","version":"628531cd1258c8003f6dd27d","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2016-01-13T18:31:11.123Z","__v":0},"user":"560d5913af97231900938124","parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.42 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["628531cd1258c8003f6dd1bf","628531cd1258c8003f6dd1c0","628531cd1258c8003f6dd1c1","628531cd1258c8003f6dd1c2","628531cd1258c8003f6dd1c3","628531cd1258c8003f6dd1c4","628531cd1258c8003f6dd1c5","628531cd1258c8003f6dd1c6","628531cd1258c8003f6dd1c7","628531cd1258c8003f6dd1c8","628531cd1258c8003f6dd1c9","628531cd1258c8003f6dd1ca","628531cd1258c8003f6dd1cb","628531cd1258c8003f6dd1cc","628531cd1258c8003f6dd1cd","628531cd1258c8003f6dd1ce","628531cd1258c8003f6dd1cf","628531cd1258c8003f6dd1d0","628531cd1258c8003f6dd1d1","628531cd1258c8003f6dd1d2"],"_id":"628531cd1258c8003f6dd27d","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"622783372cd60c003782d77e","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"createdAt":"2016-12-19T13:49:38.827Z","githubsync":"","__v":0}
putUpdate PayPal Transaction
Definition
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.
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"
}
}
{
"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" }
}
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.
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"
}
}