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.
Send a test request
Go to API Explorer to send a test request to our sandbox environment and receive a response in real time.
Request Content
Send an altTransaction object, with the following:
Property | Type | Required |
---|---|---|
amount | decimal | required |
currency | string | required |
merchantTransactionId | string | optional |
payerInfo | object | optional (see payerInfo) |
paypalTransaction | object | required (see paypalTransaction) |
transactionDescription | string | optional |
transactionMetaData | object | optional (see transactionMetaData) |
softDescriptor | string | optional |
vaultedShopperId | integer | optional |
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:
Property | Notes |
---|---|
fraudResultInfo | |
processingInfo | |
vaultedShopperId | paypalTransaction is returned with the paypalUrl and orderId (see paypalTransaction) |
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
BlueSnap provides a sandbox environment so you can test basic requests with this endpoint. You can view the request in the API Explorer console and its response directly below the console.
The console includes a sample request with predefined parameter values. To send a request with custom values, edit the parameter fields below. As you edit the fields, your custom values display in the request in the console.
Click the Try it! button below the request example when you are ready to send your request.