PayPal v2 introduces the PayPal Checkout, featuring a RESTful API solution that includes standard checkout, PayPal Express, and the innovative PayPal Vault functionality. These versatile and powerful payment solutions are designed to enhance the e-commerce experience for both merchants and their customers. By allowing customers to quickly complete transactions using their PayPal accounts, this integration helps reduce cart abandonment and speeds up the payment process.
PayPal v2 streamlines authentication and approval steps, ensuring a secure, efficient, and user-friendly checkout experience for your e-commerce platform. Beyond the standard checkout, the platform also offers the flexibility to use the JavaScript SDK to render PayPal buttons and respond to various PayPal events.
We offer the flexibility to implement payment options across multiple pages:
PayPal Checkout v2 manages the standard checkout process. For complete SDK implementation follow official PayPal information
PayPal allows the configuration of the initiation script via Query parameters to help define specific content or actions based on the data being passed. Each piece of data sent contains:
In this example, the script includes the following query parameters:
<script src="https://www.paypal.com/sdk/js?client-id=Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&merchant-id=LXXXXXXXXXXXXX¤cy=EUR&intent=authorize&locale=de_DE&commit=true&vault=false&disable-funding=card,sepa,bancontact&enable-funding=paylater"></script>
For debug purpose you can also add the parameter
debug: true/false
Merchants have two options for rendering the PayPal button: they can opt for a dynamic PayPal button or use the standard JavaScript SDK to create buttons and respond to key events (such as onApprove, onError, onCancel, and onShippingChange).
The JavaScript Button Renderer offers a simple and efficient way to integrate the PayPal button into your website, enhancing both functionality and user experience. To ensure the PayPal button operates smoothly and provides a seamless checkout process, you'll need to prepare the following components:
|
Information on Order Request implementation using our SDKs can be found here : Server SDK Documentation
Log in to your PayPal account and click on Account Settings under your profile.
Click on Business Information, and you will see your Merchant ID on the right-hand side.
Simple example flow for a PayPal SDK payment via Commerce Platform
paymentProductId |
840 |
requiresApproval |
boolean
|
redirectionData.returnUrl |
For SDK Flow , user will not be redirected to this URL but due to legacy and interoperability between flows, this URL still needs to be passed in the request. |
tokenize |
boolean
|
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/ |
paymentProduct840SpecificInput.javaScriptSdkFlow |
Required parameter which defines how PayPal is being integrated inside the checkout page. boolean true = the current integration uses PayPal SDK |
paymentProduct840SpecificInput.javaScriptSdkFlow |
Required parameter which defines how PayPal is being integrated inside the checkout page. boolean true = the current integration uses PayPal SDK |
paymentProduct840SpecificInput.action |
Required parameter which one value "CONFIRM_ORDER_STATUS" it signals process is finished on merchant side. |
Creating a Commerce Case with the initial Checkout including a reference, information about the customer and the items in the shopping cart.
POST Commerce Case
|
|
Creating an order for the entire Checkout with data for a PayPal payment. This will return the OrderId required by PayPal Javascrip SDK to initiate the order. You can find it in the response under payPalTransactionId
POST Order
|
|
After onEvent notification is received from PayPal with the status, a Complete request is needed to confirm the status also on commerce platform side.
POST Order
|
|
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.
|
Full Deliver to capture the complete order amount.
POST Deliver
|
|
The payment gateway informs you via webhook about the successful capture.
|