PayPal Redirect PreAuthorisation

🚧

This page is about the PayPal V2 integration

For information on PayPalExpressCheckoutDeposit see here.


Introduction

PayPal Pre-Authorisations may be useful in the following scenarios:

  • The authorisation amount could differ from the final transaction amount.
  • The payment may still be cancelled after the authorisation approval.
  • Ordered goods may be shipped at different times (Split Shipment).

If a merchant does not need one of the above scenarios, then the PayPal Deposit methods are applicable.

To support PayPal Pre-Authorisation functionality, PXP Financial offers the following two payment methods:

IDNameCredit State
395PayPal Redirect PreAuthorisation

PayPal Redirect PreAuthorisation (395)

Used to initiate a payment by redirecting the customer to PayPal.

Multiple full or partial captures (e.g. for split shipment) can be done.

This payment method should be used if there is no existing billing agreement with a customer or the merchant does not use the billing agreement functionality.

This method is available via Backend2Backend and via PXP Checkout integration.

Redirect Integration (PXP Financial Checkout)

The following chapter is relevant only for merchants that are using the PXP Financial Redirect integration (Checkout).

Redirection to PXP Selection or Detail Page

Depending on the Checkout integration model of the merchant, there are two options how to redirect the customer to the PXP Financial checkout:

  • Selection page: customer selects the payment method in the PXP Financial Checkout selection page
  • Detail page: merchant redirects the customer directly to the PayPal Detail page of the PXP Financial Checkout (customer has preselected the PayPal payment method on the merchant checkout page). PXP Checkout will immediately forward the customer to Paypal where he needs to approve the payment.

To initiate a PayPal Redirect PreAuthorisation (395), the following parameters must be provided additionally in the getRedirectDataRequest:

FieldValue
ShippingPreference (string, required)The allowed values are "Custom", "NoShipping" or "Provider". The field is mandatory.

When the merchant already has the shipping details of the customer, he should set ShippingPreference to Custom and pass the shipping data in the getRedirectDataRequest. After the user authorizes the payment on the PayPal site, no shipping data will be returned / notified to the merchant.

When the merchant does not yet have the shipping details of the customer and he wishes to fetch those from PayPal, he should set ShippingPreference to Provider. The merchant should not pass any shipping data in the getRedirectDataRequest. If shipping data are passed by error, they will be ignored.
After the user authorizes the payment on the PayPal site, shipping data will be returned from PayPal and this data will be passed to the merchant.

📘

Returned data from PayPal

Shipping data that is returned from PayPal will be stored in the new payment details, such as ProviderShippingName, ProviderShippingStreet, ProviderShippingCity, ProviderShippingState, ProviderShippingPostalCode, ProviderShippingCountryCode2.

Billing data will still be stored on the payment account and notified to the merchant on the payment account.

When the merchant sells good that are not shipped, such as gift vouchers or downloads, he should set ShippingPreference to NoShipping. No shipping data should be passed in the getRedirectDataRequest. PayPal will not include any shipping data when the payment is authorized by the user on the PayPal site.

The following parameters can be provided optionally:

FieldValue
Description (string)description of the payment
PaymentCountryCode (string)CountryCode of the payment
ImmediateExecution (boolean)true indicates a PAY_NOW flow,
false indicates a CONTINUE flow.

A PAY_NOW signals an immediate payment to the customer. PayPal will display a button PAY_NOW after the user logged in to the PayPal portal.

A CONTINUE flow signals a redirection back to the merchant. PayPal will display a button CONTINUE after the user logged in to the PayPal portal.

Example getRedirectData request for a PayPal Redirect PreAuthorisation (395), redirection to the Detail page (=directly to Provider PayPal), with ImmediateExecution set to "false" and ShippingPreference set to "Custom":

<getRedirectDataRequest xmlns=http://www.cqrpayments.com/PaymentProcessing
                        xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
                        xmlns:xsd=http://www.w3.org/2001/XMLSchema>
    <merchantID>{{merchant}}</merchantID>
    <redirectParameters xsi:type="paymentMethodDetailsRedirectParameters">
        <shopID>SkipDetailPageShop</shopID>
        <httpMethod>GET</httpMethod>
        <returnUrl>http://return</returnUrl>
        <languageCode>en</languageCode>
        <currencyCode>eur</currencyCode>
        <countryCode>at</countryCode>
        <additionalDetails>
            <detail xsi:type="keyStringValuePair">
                <key>Description</key>
                <value>merchant_reference1</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>PaymentCountryCode</key>
                <value>at</value>
            </detail>
            <detail xsi:type="keyBooleanValuePair">
                <key>ImmediateExecution</key>
                <value>false</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ShippingPreference</key>
                <value>Custom</value>
            </detail>
            <!--required-->
        
            <!-- Shipping address begins -->
             <detail xsi:type="keyStringValuePair">
                <key>shippingName</key>
                <value>John Watson</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingFirstName</key>
                <value>John</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingLastName</key>
                <value>Watson</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingStreet</key>
                <value>Linzerstrasse</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingHouseNumber</key>
                <value>5</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingHouseName</key>
                <value>JohnHouseName</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingHouseNumberExtension</key>
                <value>JohnHouseNumberExtension</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingCity</key>
                <value>Vienna</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingPostalCode</key>
                <value>1140</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingCountryCode2</key>
                <value>at</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingTelephoneNumber</key>
                <value>00436667788999</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>shippingEmail</key>
                <value>[email protected]</value>
            </detail>
            <!-- Shipping address ends -->

        </additionalDetails>
        <shoppingCart>
            <items>
                <item>
                    <product>
                        <id>123456</id>
                        <name>Jeans</name>
                        <description>stonewashed</description>
                        <unitPrice>
                            <grossAmount>30</grossAmount>
                            <taxAmount rate="20" name="VAT">5.00</taxAmount>
                        </unitPrice>
                        <type>Physical</type>
                    </product>
                    <quantity>1</quantity>
                    <totalPrice>
                        <grossAmount>15</grossAmount>
                        <taxAmount rate="20" name="VAT">2.5</taxAmount>
                    </totalPrice>
                    <discount>
                        <name>Jeans-Promotion</name>
                        <grossAmount>-15</grossAmount>
                        <taxAmount rate="20" name="VAT">-2.50</taxAmount>
                    </discount>
                </item>
                <item>
                    <product>
                        <id>456</id>
                        <name>Skirt</name>
                        <description>Flowers Design</description>
                        <unitPrice>
                            <grossAmount>40</grossAmount>
                            <taxAmount rate="10" name="VAT">3.64</taxAmount>
                        </unitPrice>
                        <type>Physical</type>
                    </product>
                    <quantity>2</quantity>
                    <totalPrice>
                        <grossAmount>75</grossAmount>
                        <taxAmount rate="10" name="VAT">6.82</taxAmount>
                    </totalPrice>
                    <discount>
                        <name>Spring-Promotion</name>
                        <grossAmount>-5</grossAmount>
                        <taxAmount rate="10" name="VAT">-0.45</taxAmount>
                    </discount>
                </item>
                <item>
                    <product>
                        <id>12458945</id>
                        <name>Gift Card</name>
                        <description>Birthday Gift Card</description>
                        <unitPrice>
                            <grossAmount>100</grossAmount>
                            <taxAmount rate="20" name="VAT">16.67</taxAmount>
                        </unitPrice>
                        <type>GiftCard</type>
                    </product>
                    <quantity>1</quantity>
                    <totalPrice>
                        <grossAmount>100</grossAmount>
                        <taxAmount rate="20" name="VAT">16.67</taxAmount>
                    </totalPrice>
                </item>
            </items>
            <subTotalAmount>190</subTotalAmount>
            <shippingCost>
                <name>Express</name>
                <grossAmount>30</grossAmount>
                <taxAmount rate="20" name="VAT">5</taxAmount>
            </shippingCost>
            <discounts>
                <discount>
                    <name>Sommer Sales-Discount</name>
                    <grossAmount>-10</grossAmount>
                    <taxAmount rate="20" name="VAT">-1.67</taxAmount>
                </discount>
            </discounts>
            <amountsByTax>
                <amountByTax taxName="VAT" taxRate="10">
                    <grossAmount>75</grossAmount>
                    <taxAmount>6.82</taxAmount>
                </amountByTax>
                <amountByTax taxName="VAT" taxRate="20">
                    <grossAmount>35</grossAmount>
                    <taxAmount>5.83</taxAmount>
                </amountByTax>
            </amountsByTax>
            <totalAmount>210</totalAmount>
            <totalTaxAmount>29.32</totalTaxAmount>
        </shoppingCart>
        <user>
            <id>{{newUserID}}</id>
            <username>{{newUserName}}</username>
            <firstname>Ho Chunka</firstname>
            <lastname>Ko</lastname>
            <currencyCode>eur</currencyCode>
            <languageCode>de</languageCode>
            <email>{{newUserEmail}}</email>
            <address>
                <street>Mariahilferstrasse</street>
                <houseNumber>221B</houseNumber>
                <postalCode>1140</postalCode>
                <city>Vienna</city>
                <countryCode2>at</countryCode2>
                <telephoneNumber>00437778889999</telephoneNumber>
            </address>
            <dateOfBirth>1985-10-10T00:00:00</dateOfBirth>
            <gender>Female</gender>
        </user>
        <merchantTransactionID>{{checkoutMerchantTransactionID}}</merchantTransactionID>
        <grossAmount>210.00</grossAmount>
        <!--<minPaymentLimitAmount>10</minPaymentLimitAmount>
        <maxPaymentLimitAmount>3000</maxPaymentLimitAmount>-->
        <successUrl>http://success</successUrl>
        <pendingUrl>http://pending</pendingUrl>
        <errorUrl>http://error</errorUrl>
        <cancelUrl>http://cancel</cancelUrl>
        <refusedUrl>http://refused</refusedUrl>
        <paymentMethodID>395</paymentMethodID>
        <isPaymentMethodChangeAllowed>false</isPaymentMethodChangeAllowed>
    </redirectParameters>
</getRedirectDataRequest>

Example getRedirectData request for a PayPal Redirect PreAuthorisation (395), redirection to the Detail page (=directly to Provider PayPal), with ImmediateExecution set to "false" and ShippingPreference set to "Provider":

📘

Optional shipping data

For ShippingPreference "Provider" shipping data does not need to be sent. If shippingData is provided by error, it will be ignored.

<getRedirectDataRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<merchantID>{{merchant}}</merchantID>
	<redirectParameters xsi:type="paymentMethodDetailsRedirectParameters">
		<shopID>SkipDetailPageShop</shopID>
		<httpMethod>GET</httpMethod>
		<returnUrl>http://return</returnUrl>
		<languageCode>en</languageCode>
		<currencyCode>eur</currencyCode>
		<countryCode>at</countryCode>
		<additionalDetails>
			<detail xsi:type="keyStringValuePair">
				<key>Description</key>
				<value>merchant_reference1</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>PaymentCountryCode</key>
				<value>at</value>
			</detail>
			<detail xsi:type="keyBooleanValuePair">
				<key>ImmediateExecution</key>
				<value>false</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ShippingPreference</key>
				<value>Provider</value>
			</detail>
		</additionalDetails>
		<shoppingCart>
			<items>
				<item>
					<product>
						<id>123456</id>
						<name>Jeans</name>
						<description>stonewashed</description>
						<unitPrice>
							<grossAmount>30</grossAmount>
							<taxAmount rate="20"
							           name="VAT">5.00</taxAmount>
						</unitPrice>
						<type>Physical</type>
					</product>
					<quantity>1</quantity>
					<totalPrice>
						<grossAmount>15</grossAmount>
						<taxAmount rate="20"
						           name="VAT">2.5</taxAmount>
					</totalPrice>
					<discount>
						<name>Jeans-Promotion</name>
						<grossAmount>-15</grossAmount>
						<taxAmount rate="20"
						           name="VAT">-2.50</taxAmount>
					</discount>
				</item>
				<item>
					<product>
						<id>456</id>
						<name>Skirt</name>
						<description>Flowers Design</description>
						<unitPrice>
							<grossAmount>40</grossAmount>
							<taxAmount rate="10"
							           name="VAT">3.64</taxAmount>
						</unitPrice>
						<type>Physical</type>
					</product>
					<quantity>2</quantity>
					<totalPrice>
						<grossAmount>75</grossAmount>
						<taxAmount rate="10"
						           name="VAT">6.82</taxAmount>
					</totalPrice>
					<discount>
						<name>Spring-Promotion</name>
						<grossAmount>-5</grossAmount>
						<taxAmount rate="10"
						           name="VAT">-0.45</taxAmount>
					</discount>
				</item>
				<item>
					<product>
						<id>12458945</id>
						<name>Gift Card</name>
						<description>Birthday Gift Card</description>
						<unitPrice>
							<grossAmount>100</grossAmount>
							<taxAmount rate="20"
							           name="VAT">16.67</taxAmount>
						</unitPrice>
						<type>GiftCard</type>
					</product>
					<quantity>1</quantity>
					<totalPrice>
						<grossAmount>100</grossAmount>
						<taxAmount rate="20"
						           name="VAT">16.67</taxAmount>
					</totalPrice>
					<!-- <discount><name>Spring-Promotion</name><grossAmount>-5</grossAmount><taxAmount rate="10" name="VAT">-0.45</taxAmount><type>discount</type></discount>-->
				</item>
			</items>
			<subTotalAmount>190</subTotalAmount>
			<shippingCost>
				<name>Express</name>
				<grossAmount>30</grossAmount>
				<taxAmount rate="20"
				           name="VAT">5</taxAmount>
			</shippingCost>
			<discounts>
				<discount>
					<name>Sommer Sales-Discount</name>
					<grossAmount>-10</grossAmount>
					<taxAmount rate="20"
					           name="VAT">-1.67</taxAmount>
				</discount>
			</discounts>
			<amountsByTax>
				<amountByTax taxName="VAT"
				             taxRate="10">
					<grossAmount>75</grossAmount>
					<taxAmount>6.82</taxAmount>
				</amountByTax>
				<amountByTax taxName="VAT"
				             taxRate="20">
					<grossAmount>35</grossAmount>
					<taxAmount>5.83</taxAmount>
				</amountByTax>
			</amountsByTax>
			<totalAmount>210</totalAmount>
			<totalTaxAmount>29.32</totalTaxAmount>
		</shoppingCart>
		<user>
			<id>{{newUserID}}</id>
			<username>{{newUserName}}</username>
			<firstname>Ho Chunka</firstname>
			<lastname>Ko</lastname>
			<currencyCode>eur</currencyCode>
			<languageCode>de</languageCode>
			<email>{{newUserEmail}}</email>
			<address>
				<street>Mariahilferstrasse</street>
				<houseNumber>221B</houseNumber>
				<postalCode>1140</postalCode>
				<city>Vienna</city>
				<countryCode2>at</countryCode2>
				<telephoneNumber>00437778889999</telephoneNumber>
			</address>
			<dateOfBirth>1985-10-10T00:00:00</dateOfBirth>
			<gender>Female</gender>
			<!-- <identificationNumber>QQ123456C</identificationNumber><identificationNumberType>NationalIdentificationNumber</identificationNumberType>-->
		</user>
		<merchantTransactionID>{{checkoutMerchantTransactionID}}</merchantTransactionID>
		<grossAmount>210.00</grossAmount>
		<!--<minPaymentLimitAmount>10</minPaymentLimitAmount>
<maxPaymentLimitAmount>3000</maxPaymentLimitAmount>-->
		<successUrl>http://success</successUrl>
		<pendingUrl>http://pending</pendingUrl>
		<errorUrl>http://error</errorUrl>
		<cancelUrl>http://cancel</cancelUrl>
		<refusedUrl>http://refused</refusedUrl>
		<paymentMethodID>395</paymentMethodID>
		<isPaymentMethodChangeAllowed>false</isPaymentMethodChangeAllowed>
	</redirectParameters>
</getRedirectDataRequest>

Example getRedirectData request for a PayPal Redirect PreAuthorisation (395), redirection to the Detail page (=directly to Provider PayPal), with ImmediateExecution set to "false" and ShippingPreference set to "NoShipping":

🚧

No Shipping data to be included

When ShippingPreference is set to NoShipping, no shipping address data should be included in the request.

<getRedirectDataRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<merchantID>{{merchant}}</merchantID>
	<redirectParameters xsi:type="paymentMethodDetailsRedirectParameters">
		<shopID>SkipDetailPageShop</shopID>
		<httpMethod>GET</httpMethod>
		<returnUrl>http://return</returnUrl>
		<languageCode>en</languageCode>
		<currencyCode>eur</currencyCode>
		<countryCode>at</countryCode>
		<additionalDetails>
			<detail xsi:type="keyStringValuePair">
				<key>Description</key>
				<value>merchant_reference1</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>PaymentCountryCode</key>
				<value>at</value>
			</detail>
			<detail xsi:type="keyBooleanValuePair">
				<key>ImmediateExecution</key>
				<value>false</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ShippingPreference</key>
				<value>NoShipping</value>
			</detail>
		</additionalDetails>
		<shoppingCart>
			<items>
				<item>
					<product>
						<id>123456</id>
						<name>Jeans</name>
						<description>stonewashed</description>
						<unitPrice>
							<grossAmount>30</grossAmount>
							<taxAmount rate="20"
							           name="VAT">5.00</taxAmount>
						</unitPrice>
						<type>Physical</type>
					</product>
					<quantity>1</quantity>
					<totalPrice>
						<grossAmount>15</grossAmount>
						<taxAmount rate="20"
						           name="VAT">2.5</taxAmount>
					</totalPrice>
					<discount>
						<name>Jeans-Promotion</name>
						<grossAmount>-15</grossAmount>
						<taxAmount rate="20"
						           name="VAT">-2.50</taxAmount>
					</discount>
				</item>
				<item>
					<product>
						<id>456</id>
						<name>Skirt</name>
						<description>Flowers Design</description>
						<unitPrice>
							<grossAmount>40</grossAmount>
							<taxAmount rate="10"
							           name="VAT">3.64</taxAmount>
						</unitPrice>
						<type>Physical</type>
					</product>
					<quantity>2</quantity>
					<totalPrice>
						<grossAmount>75</grossAmount>
						<taxAmount rate="10"
						           name="VAT">6.82</taxAmount>
					</totalPrice>
					<discount>
						<name>Spring-Promotion</name>
						<grossAmount>-5</grossAmount>
						<taxAmount rate="10"
						           name="VAT">-0.45</taxAmount>
					</discount>
				</item>
				<item>
					<product>
						<id>12458945</id>
						<name>Gift Card</name>
						<description>Birthday Gift Card</description>
						<unitPrice>
							<grossAmount>100</grossAmount>
							<taxAmount rate="20"
							           name="VAT">16.67</taxAmount>
						</unitPrice>
						<type>GiftCard</type>
					</product>
					<quantity>1</quantity>
					<totalPrice>
						<grossAmount>100</grossAmount>
						<taxAmount rate="20"
						           name="VAT">16.67</taxAmount>
					</totalPrice>
					<!-- <discount><name>Spring-Promotion</name><grossAmount>-5</grossAmount><taxAmount rate="10" name="VAT">-0.45</taxAmount><type>discount</type></discount>-->
				</item>
			</items>
			<subTotalAmount>190</subTotalAmount>
			<shippingCost>
				<name>Express</name>
				<grossAmount>30</grossAmount>
				<taxAmount rate="20"
				           name="VAT">5</taxAmount>
			</shippingCost>
			<discounts>
				<discount>
					<name>Sommer Sales-Discount</name>
					<grossAmount>-10</grossAmount>
					<taxAmount rate="20"
					           name="VAT">-1.67</taxAmount>
				</discount>
			</discounts>
			<amountsByTax>
				<amountByTax taxName="VAT"
				             taxRate="10">
					<grossAmount>75</grossAmount>
					<taxAmount>6.82</taxAmount>
				</amountByTax>
				<amountByTax taxName="VAT"
				             taxRate="20">
					<grossAmount>35</grossAmount>
					<taxAmount>5.83</taxAmount>
				</amountByTax>
			</amountsByTax>
			<totalAmount>210</totalAmount>
			<totalTaxAmount>29.32</totalTaxAmount>
		</shoppingCart>
		<user>
			<id>{{newUserID}}</id>
			<username>{{newUserName}}</username>
			<firstname>Ho Chunka</firstname>
			<lastname>Ko</lastname>
			<currencyCode>eur</currencyCode>
			<languageCode>de</languageCode>
			<email>{{newUserEmail}}</email>
			<address>
				<street>Mariahilferstrasse</street>
				<houseNumber>221B</houseNumber>
				<postalCode>1140</postalCode>
				<city>Vienna</city>
				<countryCode2>at</countryCode2>
				<telephoneNumber>00437778889999</telephoneNumber>
			</address>
			<dateOfBirth>1985-10-10T00:00:00</dateOfBirth>
			<gender>Female</gender>
			<!-- <identificationNumber>QQ123456C</identificationNumber><identificationNumberType>NationalIdentificationNumber</identificationNumberType>-->
		</user>
		<merchantTransactionID>{{checkoutMerchantTransactionID}}</merchantTransactionID>
		<grossAmount>210.00</grossAmount>
		<!--<minPaymentLimitAmount>10</minPaymentLimitAmount>
        <maxPaymentLimitAmount>3000</maxPaymentLimitAmount>-->
		<successUrl>http://success</successUrl>
		<pendingUrl>http://pending</pendingUrl>
		<errorUrl>http://error</errorUrl>
		<cancelUrl>http://cancel</cancelUrl>
		<refusedUrl>http://refused</refusedUrl>
		<paymentMethodID>395</paymentMethodID>
		<isPaymentMethodChangeAllowed>false</isPaymentMethodChangeAllowed>
	</redirectParameters>
</getRedirectDataRequest>

Example getRedirectData response for a PayPal Redirect PreAuthorisation (395):

<getRedirectDataResponse xmlns=http://www.cqrpayments.com/PaymentProcessing xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>
    <redirectData>
        <redirectUrl>https://payments.test2.kalixa.com/Checkout/PaymentMethods/395?requestData=pzc3vjdcvan5zoxj4xx0gihz_9941b564-87a5-4f20-8a4e-47e5fb42c600</redirectUrl>
    </redirectData>
</getRedirectDataResponse>

After the customer has selected the PayPalpayment option on the PXP Financial checkout page, the customer will be redirected to the PayPal checkout where he logs in to his PayPal account and confirms the payment.


PayPal account

The customer needs to decide if to approve the payment or to cancel the payment.

  • If approved, the customer is redirected to the merchants successURL. On the continue flow the merchant will display the customer shopping basket and the shipping address, asking the customer to approved the payment once more.
  • If aborted the customer is redirected back the the merchants error page.

Case #1 - Immediate Execution


In the case of Immediate Execution set to true (PAY_NOW), the user the following states apply and are also being notified to the merchant through a backend notification.

FieldValue
paymentMethod
paymentIDThe ID of the payment in PXP Financial Payment Service. Needs to be stored in the merchant system and used for follow up payments like Captures and Refunds.
state.definitionSuccessful State: ExecutedByProvider (142)
Refused/Unsuccessful State: RefusedByProvider (100)

Other possible Error States which can happen. If a merchant wants those to be notified, this has to be requested via the Account Manager:
DuplicatePaymentValidationFailed - 369
RefusedByPaymentScoring - 121
InitiateRequestProviderCommunicationErrorOccurred - 325
InitiateErrorReportedByProvider - 4
ProviderResponseValidationFailed - 409
ExecuteErrorReportedByProvider - 143
ExecuteRequestSentToProviderCommunicationErrorOccured - 339

The PayPal Pre-Authorisation payment is now successfully authorised by PayPal and has to be captured (or cancelled) by the merchant later.

Case 2 - Continue flow##

In the case of Immediate Execution set to false (CONTINUE flow), the payment is moved to state ApprovedByProvider.
PXP payment service stores the following data on the payment about the user account and optionally any returned shipping data. The data can be notified to the merchant with a notification for the state ApprovedByProvider, alternatively the merchant may query the payment to get the following details.

The following payment account details are stored on the payment:

ValueDescription
AcccountOwnerBillingCityNamePayPal customer´s billing records city name
AccountOwnerBillingCountryPayPal customer´s billing country
AccountOwnerBillingNamePayPal customer´s billing name
AccountOwnerBillingPhonePayPal customer´s billing phone number
AccountOwnerBillingPostalCodePayPal customer´s billing postal code
AccountOwnerBillingStreet1PayPal customer´s billing street address
will be extended further

After the data were consumed by the merchant and the data was shown to the customer, the merchant should send an executePaymentAction request with either action 95030 (continue) or action ... (abort).


Example executePaymentAction request:

<?xml version="1.0" encoding="utf-8"?>
 <executePaymentActionRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<merchantID>PayPalRestAPIProviderTesting</merchantID>
	<shopID>PayPalRestAPIPTShop1</shopID>
	<paymentID>2efe2d60-66d6-44ae-ae52-26320d4a0984</paymentID>
	<actionID>95030</actionID>
	<actionData>
		<data xsi:type="keyStringValuePair">
			<key>PaymentID</key>
			<value>2efe2d60-66d6-44ae-ae52-26320d4a0984</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingFirstName</key>
			<value>John H.</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingLastName</key>
			<value>Watson</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingPostalCode</key>
			<value>SW1A 2AA</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingCountryCode2</key>
			<value>US</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingCity</key>
			<value>San Jose</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingState</key>
			<value>CA</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingStreet</key>
			<value>Downing Street</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingHouseNumber</key>
			<value>123</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingHouseName</key>
			<value>JohnHouseName</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ShippingHouseNumberExtension</key>
			<value>extension123</value>
		</data>
	</actionData>
</executePaymentActionRequest>

Example executePaymentAction response:

<executePaymentActionResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <statusCode>0</statusCode>
    <actionResults>
        <result xsi:type="keyStringValuePair">
            <key>lastStateDefinition</key>
            <value>142</value>
        </result>
        <result xsi:type="keyBooleanValuePair">
            <key>ImmediateExecution</key>
            <value>false</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderTransactionID</key>
            <value>47T86433LV010763U</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingName</key>
            <value>HochunDE KoDE</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingStreet</key>
            <value>ESpachstr. 1 </value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingCity</key>
            <value>Freiburg</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingState</key>
            <value>Baden-Württemberg</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingPostalCode</key>
            <value>79111</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderShippingCountryCode2</key>
            <value>DE</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderAuthorizationID</key>
            <value>0BB49035NL483401P</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderResponseCode</key>
            <value>0</value>
        </result>
    </actionResults>
</executePaymentActionResponse>

Example executePaymentAction response with error state:

" <?xml version=""1.0"" encoding=""utf-8""?>
<executePaymentActionResponse xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns=""http://www.cqrpayments.com/PaymentProcessing"">
	<statusCode>0</statusCode>
	<actionResults>
		<result xsi:type=""keyStringValuePair"">
			<key>lastStateDefinition</key>
			<value>143</value>
		</result>
		<result xsi:type=""keyBooleanValuePair"">
			<key>ImmediateExecution</key>
			<value>false</value>
		</result>
		<result xsi:type=""keyStringValuePair"">
			<key>ProviderTransactionID</key>
			<value>694fbf8a-803d-4932-b524-c54696b995a3</value>
		</result>
		<result xsi:type=""keyStringValuePair"">
			<key>ProviderErrorResponseCode</key>
			<value>ERROR_NAME</value>
		</result>
		<result xsi:type=""keyStringValuePair"">
			<key>ProviderErrorResponseMessage</key>
			<value>ERROR_DESCRIPTION</value>
		</result>
		<result xsi:type=""keyStringValuePair"">
			<key>PaymentStateReasonID</key>
			<value>1</value>
		</result>
	</actionResults>
</executePaymentActionResponse>"

Further chapters of interest:

Backend2Backend Integration

The following chapter is relevant only for merchants that are using the backend2backend integration (direct integration).

To initiate a PayPal Reference PreAuthorisation (396), the following parameters must be provided additionally in the initiatePaymentRequest:

FieldValue
paymentAccountID
(string, required)
The payment account ID of the user/customer in the PXP System which contains the PayPal Billing Agreement ID which should be used for this payment.

To initiate a PayPal Redirect PreAuthorisation (395), the following parameters must be provided additionally in the initiatePaymentRequest:

FieldValue
tbd

The following parameters can be provided optionally in the initiatePaymentRequest, this applies to both methods (PayPal Reference PreAuthorisation (396) or PayPal Redirect PreAuthorisation (395)):

FieldValue
specificPaymentData.PaymentDescription
(string)
Optional.
Will be shown in the Transaction Details within the merchant and buyer’s PayPal account. In the PayPal Transaction Details, it will be labeled as a “Memo”.
specificPaymentData.UserStatementText
(string)
Optional.
Used by PayPal as the dynamic text to construct the statement descriptor that appears on a payer's card statement.

If no value provided, then PXP will send the configured Shop Name/Location.
Maximum length: 22
tbd more???

Shopping Cart???

Example initiatePayment request for a PayPal Reference PreAuthorisation (396):

tbd

Example initiatePayment response for a PayPal Reference PreAuthorisation (396):

tbd

Example initiatePayment request for a PayPal Redirect PreAuthorisation (395):

tbd

Example initiatePayment response for a PayPal Redirect PreAuthorisation (395):

tbd