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
alt-transaction
container required, contains the following properties (see alt-transaction):
Property | Type | Required |
---|---|---|
amount | decimal | required |
currency | string | required |
merchant-transaction-id | string | optional |
payer-info | container | optional (see payer-info) |
paypal-transaction | container | required (see paypal-transaction) |
soft-descriptor | string | optional |
transaction-description | string | optional |
transaction-meta-data | container | optional (see transaction-meta-data) |
vaulted-shopper-id | integer | optional |
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:
Property | Notes |
---|---|
fraud-result-info | |
paypal-transaction | is returned with the paypal-url and order-id (see paypal-transaction) |
processing-info | |
vaulted-shopper-id |
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>
<transaction-approval-date>10/01/2020</transaction-approval-date>
<transaction-approval-time>10:19:21</transaction-approval-time>
<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>
<transaction-approval-date>10/01/2020</transaction-approval-date>
<transaction-approval-time>10:19:21</transaction-approval-time>
<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>
<transaction-approval-date>10/01/2020</transaction-approval-date>
<transaction-approval-time>10:19:21</transaction-approval-time>
<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>