true = the payment requires approval before the funds will be captured using the Deliver or Capture endpoint of the API
false = the payment does not require approval, and the funds will be captured automatically
redirectionData.returnUrl
The URL that the customer is redirected to after the payment flow has finished.
tokenize
boolean
true = the payment would tokenize / store PayPal account and a an id ( token ) will be received
false = the payment does not require tokenization / account storage
paymentProcessingToken
The unique Id which needed to facilitate payments against a stored account. Usable for speeding up checkout process by asking customer to complete transaction using his stored PayPal account or , when customer is not present, to complete a transaction. ( e,g. : Subscription charge ) .
Please notice that if tokenize = "true", the paymentProcessingToken will not be considered, and a new process to store consumer account will be initiated.
To initiate a payment against a stored account, paymentProcessingToken has to contain the Token ID and tokenize = "false".
paymentProduct840SpecificInput.fraudNetId
A unique ID determined by the merchant, to link a Paypal transaction to a FraudNet PayPal risk session. Only applicable to customer-initiated transactions, when the FraudNet SDK is used, and to be passed in the API request the same tracking ID value (FraudNet Session Identifier). This SDK is available here https://developer.paypal.com/docs/checkout/apm/pay-upon-invoice/fraudnet/
Example
Simple example for a PayPal payment via Commerce Platform
Creating a checkout (here in one step, creating in multiple steps possible)
Creating an order for the entire checkout (partial orders also possible), payment is initialized automatically
Initialization of deliver to capture the amount of the order (partial deliver also possible)
Create CommerceCase/Checkout
Creating a Commerce Case with the initial Checkout including a reference, information about the customer and the items in the shopping cart.
Webhook after successful confirmation on PayPal portal by end customer
You can identify the corresponding transaction by the field createPaymentResponse.payment.id in the order response. The status PENDING_CAPTURE shows that the amount is authorized and the payment gateway is waiting for a capture.