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.
Tip
You can test out a request that hits our sandbox in real-time. Follow the instructions here to use the "Try It!" feature on the right side.
Request Content
Send an altTransaction object, with the following:
Property | Type | Required |
---|---|---|
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:
Property | Notes |
---|---|
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" }
}
API Explorer
To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.