Konnektive CRM
Submit Ticket
  • Konnektive CRM
    • Getting Started!
    • CRM Dashboard
    • Customer Service
      • Customer Service Tutorial
      • Locate a Customer Record
      • Continuity Purchase Profile
      • Refund/Void a Transaction
      • Cancel an Order
      • Cancel or Pause a Subscription
      • Quality Assurance
      • C/S Fulfillment Actions
      • Resend emails to customers
      • Rerun a Declined New Sale
      • Merge Existing Customers
    • CRM Setup
      • Product Setup
        • Product Creation
        • Product Variations
          • Variant Bundles
      • Campaign Setup
        • Creating a Campaign
        • Campaign Categories
        • Campaign Types
        • Adding a Product to a Campaign
          • Common Offer Setups
          • Stagger Fulfillments
          • Stagger Payments
        • Landing Page Setup (Form-Code)
          • Adding Extra Products To Checkout Page (Upsells, Hidden Fees, Free Gifts, Order Bumps)
          • Additional Upsell Pages (Form-Code)
          • Configure Google Analytics
          • Form Code Integration
          • Multiple Product Lander
          • Performing Callbacks after Form Submits (For Dev)
          • Prepaid, Debit Card & Mastercard Redirect (For Devs)
          • Shopping Cart Lander
          • Single Product Lander
          • Upsell Selection on an Upsell Page (For Devs)
          • Wordpress Plugin Setup
            • Using WooCommerce Catalog with Konnektive Checkout Page
        • Auto-Responder Setup
          • Autoresponder Date Formats
        • Shipping Profiles
        • Campaign Coupons
        • Custom Fields
        • eSignature
          • Adding eSignature to Form-Code
        • Adding C.O.D. to Campaigns
        • Taxes
      • Call Center Setup
        • Adding and Editing Call Centers
        • Adding Call Center Agents
        • Setting Call Center Commissions
        • Batch Update Call Center Source Values
        • Cancellation Reasons, Refund Reasons, and Call Dispositions
      • Affiliate Setup
        • Adding and Editing Affiliates
        • Affiliate Tracking Link/String
        • Affiliate Pixels
          • Testing and Troubleshooting CPA Pixels
          • Testing CPC Pixels
        • Affiliate Commissions
        • Setting up an Affiliate User
        • Batch Update Affiliate Source Values
        • General External Affiliate Software/Network Setup
        • Facebook Pixel Setup
    • Fulfillment
      • Add and Editing Fulfillment House
      • Bundle Fulfillment
      • COD Fulfillment
      • Edit Fulfillment Items
      • Fulfillment Batch Update
      • Fulfillment Inventory
      • Fulfillment Status Types
      • Fulfillment Summary Report
      • Shipping Validation
      • Testing Fulfillment through Order Entry
      • Upload Returned Orders
      • Upload Tracking Numbers
      • Cash on Delivery setup
        • C.O.D. Order Entry Option
    • Gateway Setup
      • Gateway List
      • Adding a Gateway
        • Testing Your Gateway Through Order Entry
      • Gateway Integrations
        • accept.blue
        • Acquired
          • Acquired 3DS
          • Acquired V2
        • Adyen
        • Adyen V2
          • Klarna on Adyen V2
          • PayByBank on Adyen V2
          • Afterpay on Adyen V2
        • Affirm
        • Afterpay
        • Amazon Pay API Integration
          • Form Code: Login and Pay with Amazon
        • Apple Pay
        • Authorize.net
        • Bank of America
        • BitPay
        • Braintree
        • Cardinity
        • Cardstream
          • Cardstream - Alternate Payments
        • Celerispay
        • Checkout.com
          • Checkout.com - Alternate Payments
        • CentroBill
        • Corefy
        • Easytransac
        • eMerchantPay V3
          • eMerchantPay - Alternate Payments
        • Everyware
        • Fat Zebra
        • FibonatixV2
        • FlexFactor
        • Gala Technology
          • Gala Technology - Alternate Payments
        • Google Pay API Integration
        • HiPay 3DS
        • Innova
        • iyzico
        • Klarna
        • MARKETFLOW
        • Maverick
        • Merchant Warrior
        • MIDs
        • MojoPay
        • Mollie
        • Moonlight Payments
        • MuchBetter
        • MyCPO
        • NMI
          • NMI - useCustomerVault Configuration
        • NomuPay
          • NomuPay - Alternate Payments
          • Klarna on NomuPay
        • OpenPath
        • PagBrasil
        • Pathly
        • Pay.com
        • PAY.ON
        • Payex-GreenMoney
        • PayGate
        • Paynetworx
        • PayPal Commerce Checkout
          • PayPal Commerce Checkout (Direct API)
          • PayPal Commerce Checkout (Legacy)
          • PayPal Commerce Checkout (SDK)
          • PayPal Seamless Checkout (Form code)
          • PayPal Fastlane
        • Paysafe V2
        • Paystrax
        • PayXpert 3DS V2
        • Pixxles
        • Poynt
        • Priority Payments
        • Quaife
        • Quantum
        • QuickPay
        • Radom
        • RocketGate
        • SafeCharge
        • Sezzle
        • Skrill
        • Solid
        • Splitit
        • Square Payments
          • Square Payments V2
        • Stripe
          • Stripe - Alternate Payments
          • Klarna on Stripe
        • SurePay
        • TruCommerce
        • Trust Payments
        • TRX
        • UrPay
        • Vantiv
        • WAAVE
        • WEBPAY
        • WhiteLabel (WL) Payments
        • WithReach
        • WorldLine (Bambora)
        • Worldline V2
          • Worldline V2 - Alternate Payments
        • Worldnet
        • Worldpay
      • Advanced Transaction Routing Interface (ATRI)
        • Algorithms
        • Cascade Profiles
        • Settings and Notifications
      • Recycle Billing
      • Standard BIN Mapping
      • PrePaid BIN Mapping
      • Decline Message Mapping
      • Dynamic Descriptors
      • RDR
      • Ethoca Refunds
      • Staggered Rebills Feature
      • Basic 3DS Instructions
      • dLocal Properties
      • Zero dollar card verification
    • Reports
      • Affiliate Report
      • Cancellation Report
      • Chargeback Details Report
      • Continuity Report
      • Customer Service Report
      • Fulfillment Details
      • Key Performance Indicators - KPIs
      • Order Details
      • Order Summary
      • Projected Billing Report
      • Reserve Report
      • Retention Report
      • Transaction Details Report
      • Transaction Summary Report
      • UTM Filters
      • Customer Details Report
    • Admin Setup
      • Plugins
        • Accounting
          • QuickBooks Online Plugin
        • Affiliate Systems
          • Everflow Integration
            • Everflow
          • Trackfiliates
            • CheckoutChamp
        • Analytics and Reporting
          • Wicked Reports
        • Authentication
          • PAAY Plugin
            • Authenticating with PAAY 3DS on Landers
          • PAAY 3RI
        • Chargeback Management
          • ChargebackHelp
          • Fraud Deflect
          • Ethoca
          • Midigator
          • Optimal Alerts
        • Data Sources
          • ClickBank
          • FluidPay Account Updater
          • Gorgias
          • HubSpot
          • Re:amaze
          • ShipEngine
          • Smarty
          • Zapier
          • Zendesk
        • Debt Collection
        • Email Service Providers
          • Active Campaign Deep Integration
          • Constant Contact
          • ConvertKit
          • Email Service Provider General Set Up
          • Email Service Provider Plugins
          • InboxFirst
          • Infusionsoft/Keap
          • Klaviyo
          • Mailchimp
          • Maropost
          • Ontraport
          • Sendgrid
          • SendLane
          • TxtFlo
          • ClickSend (Data Shuttle)
        • Express Consent
          • Expressed Consent
          • Expressed Consent CRM Configuration
          • Expressed Consent Guidelines
        • FlexPay
          • FlexPay Plugin
        • Fraud Services
          • Fraud Manager
          • Kount Enterprise
          • Device Data Collector Pixel (DDC Pixel)
          • IPQS
          • Sift
          • NoFraud
        • Fulfillment Houses
          • General Fulfillment House Setup
          • AliExpress
          • CJ Dropshipping
          • ShipBob
          • Shiphero
          • ShipStation
          • mintsoft
          • Fulfillment by Amazon
          • FTP Fulfillment Option
          • Save Rack
          • DesktopShipper
          • Fulfillplex
          • Amware
          • Store Pickup
        • IVR Systems
        • List Management Services
          • Red Crane Media
          • Sociallity
        • Membership Services
          • General Membership Club Plugin Setup
          • CustomClub
          • MemberMouse
          • Circle.so Webhook Guide
          • Kajabi Webhook Guid
        • Phone Switches
          • Five9 Sales Agent Call Pop
          • ViciDial
          • Ytel
        • RMA Services
        • Sales Call Tracking Services
        • Shipping Services
          • InsureShip
          • Route
        • SMS
          • SendPlex SMS Plugin
          • Twilio SMS Setup
        • SMTP Maintenance
          • SMTP Maintenance Setup
          • Sendgrid SMTP Profile
          • Maropost SMTP Profile
          • Gmail SMTP Profile
        • Tax Services
          • Interpayments
          • Avalara Tax
            • Add Avalara Tax to a Campaign
            • Add Freight Tax to Shipping
            • Add Tax Code to Products
            • Enabling and Setting Up the Avalara Tax Plugin
            • Order Entry
          • Tax Jar
            • Add Freight Tax Code to Shipping
            • Add Tax Code to Products
            • Add TaxJar to Campaigns
            • Tax Jar Address Verification- Customer Service/ Order Entry
            • Tax Jar Support Page
        • Telehealth
          • Beluga EHR
        • Twilio SMS Setup
          • Sendgrid SMTP Profile
          • SMTP Setup
        • Upsell
          • Integrated Upsell Program
      • Create a User
      • Create an Affiliate User
      • Create An API User
      • Import
        • Import Coupons
      • Export Webhook Profiles
        • Export Webhook Field Mapping Options
        • FTP Export Profile
        • Postback Export Profiles
      • Zones
      • Blacklist
      • Whitelist
      • Event Logs
      • Test Cards
      • Horizontal Migrations
      • Enable Automatic Cancel on Refund and Void
      • Create a Sub Account
      • Fraud Protection
      • Legacy Data Import
        • Activating Sticky.io Plug In
        • PGP Encryption Procedures
      • Leads Agents
    • Frequently Asked Questions
      • Affiliate Tracking FAQs
      • Developer FAQs
      • Fulfillment FAQs
      • General CRM FAQs
      • Order Processing FAQs
      • Reporting FAQs
    • How-to articles
      • Force Bill a Purchase
      • Submit a CRM Support Ticket
    • Click-to-Cancel
  • API Documentation
    • API Documentation
      • Recommended API Flow
      • Performing API Calls
  • Policies
    • EULA
    • Privacy Policy
    • Acceptable Use Policy
    • Billing Policy
Powered by GitBook
LogoLogo

Konnektive Links

  • CRM
  • Need more help?

No Account?

  • Schedule Sales Demo
On this page
  1. Konnektive CRM
  2. Gateway Setup
  3. Gateway Integrations
  4. PayPal Commerce Checkout

PayPal Commerce Checkout (SDK)

PreviousPayPal Commerce Checkout (Legacy)NextPayPal Seamless Checkout (Form code)

Last updated 2 months ago

You may implement PayPal’s SDK to take advantage of Venmo and Pay Later payment options through PayPal. Other payment options are coming soon.

Full PayPal documentation on this approach is here:

PayPal SDK:

SDK Performance Optimization:

  1. The PayPal SDK supports PayPal, Venmo, and Pay Later only

  2. The PayPal option cannot be disabled (you cannot offer Venmo or Pay Later without a PayPal button on your page).

  3. The PayPal SDK is supported only when referenceTransactions is disabled OR referenceTransactions and vaultEnabled are both enabled.

  4. You cannot choose different payment types for checkout and upsells. For example, if a checkout is done on Venmo then the upsell must also be on Venmo.

  5. Rebills are supported on Venmo when referenceTransactions and vaultEnabled are both enabled. Rebills are never supported on Pay Later.


Checkout Page

The Checkout page contains the PayPal SDK. Call the Import Click API when the page loads to obtain a session.

  • Be sure to include pageType=checkoutPage and sessionId

If this is the first page of the funnel -

Send requestUri (include affiliate tracking string for reporting) instead of sessionId.

The response from this call will contain a sessionId which should be sent on all subsequent API calls for this session.

Step 2: PayPal SDK

Add this required script to the checkout page

<script src="https://www.paypal.com/sdk/js?client-id=CLIENT_ID&merchant-id=MERCHANT_ID&currency=CURRENCY&enable-funding =ENABLED_FUNDINGS&disable-funding=DISABLE_FUNDING data-partner-attribution-id=PARTNER_ID"></script>

Mandatory Parameters:

  • CLIENT_ID:

    • Live: AaazqkTAjaKPbvo0EmqjfYJuwpcE1IeU7DOt3WFGlkXn2Rrlj6fKGiMkaE4HUSWBp96a8mEM4uLBdS-6

    • Sandbox: AdATBZ6vUtyH5FQ3weG-63lWwkNioUYJ0b07KEdVwrw0z_DkctGqnz2Q7O-59Dh5nLAOo0LsQOw5GTqY

  • MERCHANT_ID: Your PayPal gateway "merchantId"

  • CURRENCY: Campaign Currency code (such as USD)

  • ENABLED_FUNDINGS: venmo, paylater. Only venmo and paylater are supported. You can remove venmo or paylater if you do not want to offer both types. For upsell pages this should include only the type chosen at checkout.

  • DISABLE_FUNDING: Not all PayPal payment sources are supported. You may need to explicitly disable some options. This should be a comma-separated list of: card bancontact blik eps giropay ideal mercadopago mybank p24 sepa sofort credit (do not include this if paylater is enabled) venmo (do not include this if venmo is enabled) paylater (do not include this if paylater is enabled)

  • PARTNER_ID:

    • Live: 2R5D2LWT3RHPN

    • Sandbox: T2PHJAU4MDP4J

Conditional Parameter:

  • If QA is enabled in the campaign then include intent=authorize

Step 3: PayPal button

Add a button to the body tag with an "id" attribute (example: id: paypal-button-container)

<div id="paypal-button-container"></div>

Step 4: Handle PayPal button functions

Functions required for the PayPal buttons are:

    1. It is important that you bind the Import Order call to the PayPal checkout button.

      • Be sure to include the sessionId and orderId from the previous steps, if known

    2. There are PayPal specific requirements that need to be passed to Import Order:

      1. paySource = 'PAYPAL'

      2. paypalBillerId is the value assigned to your PayPal Commerce gateway, found on your gateway list.

      3. prepaidType = PAYPAL_VENMO or PAYPAL_PAYLATER (if PayPal button is clicked then do not send this parameter)

  1. createOrder (Create a PayPal order using the parameters received from the “onClick” function)

  2. onCancel (PayPal users canceled the payment or closed the payment screen)

  3. onError (Error from PayPal)

Step 5: Upsell Pages

It is not necessary to render the PayPal SDK on upsell pages when checkout is done with PayPal or Venmo AND referenceTransactions is enabled AND vaultEnabled is enabled. In this situation the upsell will be processed with a one-click flow.

For all other situations the previous steps can be repeated on each upsell page. In these situations the PayPal SDK does not support a one-click upsell.

Checkout page example:

<!DOCTYPE html>
<html>
    <head>
        <title>PayPal SDk Integration</title>
        <script src="https://www.paypal.com/sdk/js?client-id=<CLIENT_ID>&merchant-id=<MERCHANT_ID>&currency=<CURRENCY>&enable-funding=<ENABLED_FUNDINGS>&disable-funding=card" data-partner-attribution-id="<PARTNER_ID>"></script> 
    </head>
    <body>
    
        <div id="paypal-button-container"></div>
        
        <script>
            var paypalSdkParams = null;
            var paypalPrePaidType = null;
            paypal.Buttons({
                style: {
                    layout: 'vertical',
                    label:  'paypal'
                },
                onClick: function(data, actions) {
                    try {
                        var fundingSource = data && data.fundingSource && data.fundingSource.toUpperCase(); 
                        if (["VENMO", "PAYLATER"].includes(fundingSource)) {
                            paypalPrePaidType = "PAYPAL_" + fundingSource;
                        }
                        // Call the import order API with the required parameters and additional pass "paypalSdk=1" and "prepaidType=paypalPrePaidType" in the request.
                        if (res && res.result === "SUCCESS" && res.message && res.message.paypalSdkParams) {
                            paypalSdkParams = res.message.paypalSdkParams;
                            return actions.resolve();
                        } else {
                            return actions.reject();
                        }
                    } catch(err) {
                        // Handle error 
                    }
                },
                createOrder: function(data, actions) {
                    try {
                        const orderId = paypalSdkParams && paypalSdkParams.id;
                        if (!orderId) throw new Error("Insufficient data to process PayPal checkout.");
                        return orderId;
                    } catch(err) {
                        // Handle error for missing order id
                    }
                },
                onApprove: function(data, actions) {
                    try {
                        // Call confirm PayPal API with the required parameters and additional pass following parameters
                        // 1. token: data.orderID
                        // 2. payerId: data.payerID
                        // 3. paypalSdk: 1
                        // 4. prepaidType: paypalPrePaidType;
                        // Note the prepaidType passed to import order API must match with the prepaid type passed on to confirm PayPal API. 
                    } catch (err) {
                        throw new Error("Error: Unable to confirm order.");
                    }
                },
                onCancel: function (data) {
                    // Payment cancelled by the customer. 
                },
                onError: function (err) {
                    // Error from PayaPal. 
                }
            }).render('#paypal-button-container');
        </script>
    </body>
</html>

Upsell page example:

<!DOCTYPE html>
<html>
    <head>
        <title>PayPal SDk Integration</title>
        <!-- Note: On the upsell page, only enable funding sources, which were used to complete transactions on the checkout page. Set other funding sources to disable-funding parameter. -->
        <!-- The checkout page funding source can be retrieved from prepaidType in the Import Order response -->
        <script src="https://www.paypal.com/sdk/js?client-id=<CLIENT_ID>&merchant-id=<MERCHANT_ID>&currency=<CURRENCY>&enable-funding=<ENABLED_FUNDINGS>&disable-funding=card" data-partner-attribution-id="<PARTNER_ID>"></script> 
    </head>
    <body>
    
        <div id="paypal-button-container"></div>
        
        <script>
            var paypalSdkParams = null;
            var paypalPrePaidType = null;
            paypal.Buttons({
                style: {
                    layout: 'vertical',
                    label:  'paypal'
                },
                onClick: function(data, actions) {
                    try {
                        var fundingSource = data && data.fundingSource && data.fundingSource.toUpperCase(); 
                        if (["VENMO", "PAYLATER"].includes(fundingSource)) {
                            paypalPrePaidType = "PAYPAL_" + fundingSource;
                        }
                        // On upsell page match checkout page prepaid type with funding source clicked on upsell page. If not reject payment process.
                        var orderData = sessionStorage.getItem("orderData") ? JSON.parse(sessionStorage.getItem("orderData")) : null
                        var orderPrepaidType = orderData && orderData.prepaidType;
                        if (orderPrepaidType !== paypalPrePaidType) {
                            return actions.reject();
                        }
                        // Call the import upsale API with the required parameters and additional pass "paypalSdk=1" in the request.
                        if (res && res.result === "SUCCESS" && res.message && res.message.paypalSdkParams) {
                            paypalSdkParams = res.message.paypalSdkParams;
                            return actions.resolve();
                        } else {
                            return actions.reject();
                        }
                    } catch(err) {
                        // Handle error 
                    }
                },
                createOrder: function(data, actions) {
                    try {
                        const orderId = paypalSdkParams && paypalSdkParams.id;
                        if (!orderId) throw new Error("Insufficient data to process PayPal checkout.");
                        return orderId;
                    } catch(err) {
                        // Handle error for missing order id
                    }
                },
                onApprove: function(data, actions) {
                    try {
                        // Note: Similar to the onclick method, re-check the checkout page prepaid type with the funding source after approval on the upsell page. If the funding source does match, do not call the confirm PayPal API and throw custom error as done in catch block.
                        // Call confirm PayPal API with the required parameters and additional pass following parameters
                        // 1. token: data.orderID
                        // 2. payerId: data.payerID
                        // 3. paypalSdk: 1
                        // 4. prepaidType: paypalPrePaidType; 
                    } catch (err) {
                        throw new Error("Error: Unable to confirm order.");
                    }
                },
                onCancel: function (data) {
                    // Payment cancelled by the customer. 
                },
                onError: function (err) {
                    // Error from PayaPal. 
                }
            }).render('#paypal-button-container');
        </script>
    </body>
</html>

If you are not implementing Venmo or Pay Later then do not use the SDK. Follow instead.

Step 1:

See this link for full details:

onClick (Call the to retrieve the create order parameters. It must include paypalSdk = 1 with other required parameters)

onApprove (PayPal approved the order. To process the order in Konnektive and complete it in PayPal pass the “orderID” and “payerID” to . It must include paypalSdk = 1)

See this link for more details:

these instructions
Import Click
JavaScript SDK script configuration
Import Order API
Confirm PayPal API
JavaScript SDK reference
https://developer.paypal.com/sdk/js/reference/
https://developer.paypal.com/sdk/js/performance/