Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Go to Haptik Website
  • Contact Us
  • Home
  • Developer Guides
  • PayPal Integration

How to Set Up PayPal Integration

Written by Soham Amburle

Updated on September 12th, 2022

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Build Deploy Analyse Manage Account Bot Deactivation
  • Bot Building
    Essentials Smart Skills Steps User Messages Bot Responses Entities Connections Customisations User feedback collection Testing Whatsapp Bots NLU Bot Maintenance
  • Smart Agent Chat
    Set up Admin Settings MyChats Section (Agent Inbox) Live Traffic Section Teams Section Archives Section Analytics Plans on Smart Agent Chat
  • Conversation Design
    Design Basics Design Guides Designing for Platforms Designing WhatsApp Bots
  • Developer Guides
    Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
  • Deployment
    Web SDK WhatsApp Facebook Instagram Sunshine Conversation LINE Google Business Messages Telegram MS Teams Bot as an API iOS SDK Android SDK
  • External Agent Tool Setup
    Zendesk Chat Salesforce Service Cloud Freshchat Zoho NICE CXOne Gorgias
  • Analytics & Reporting
    Intelligent Analytics
  • Notifications
    SMS Notifications Success Measurement
  • Commerce Plus
    Catalog Integration Bot Building Guide Channel Deployments Unified ML Pipeline Documentation
  • Troubleshooting Guides
    Error Messages FAQs
  • Release Notes
+ More

Table of Contents

What is PayPal? Prerequisites for using PayPal Integration How to set up? How to use the Skill How to make changes to the Skill

What is PayPal?

PayPal is a payment solution that allows businesses to accept, process, and disburse payments.

Haptik has come up with PayPal Integration using which you can add payment solutions to your bot. Once this integration is set up on your bot, you can collect payments from your users by providing them a PayPal Invoice over conversations, generated using PayPal Invoice APIs. It is a highly convenient way to accept payments from users.

Prerequisites for using PayPal Integration

  • A registered account on PayPal. You can read more about it here.
  • A bot on Haptik. You can read this article to build your own bot.
  • APIs for fetching necessary information from your CRM system. You can read more about PayPal APIs here.
  • Also Note: Eligibility - Invoicing is available in multiple countries.

How to set up?

We have packaged PayPal Integration in the form of a Smart Skill for faster deployment.

The available Smart Skill for PayPal is "paypal invoice". You can make use of this Smart Skill as per your requirement.

How to use the Skill

You can plug this Skill at a point of the bot flow where you would want to collect payments from the user.

For Example: During the cart checkout process. For testing purposes, you can type the intent “PayPal payment flow” for generating a payment link for a sample amount that has been preconfigured.

How to make changes to the Skill

Since this Smart Skill is for payment purposes specifically, which is why we focus on generating a payment link.

Step 1: We have tried to make the Smart Skill platform agnostic and have incorporated necessary variations for WebSDK and WhatsApp platforms. The flow starts with the user getting a prompt to enter their mobile number on WebSDK, whereas on WhatsApp this prompt gets skipped as we are using the completion_phone_number system entity (captures phone number automatically on WhatsApp).

Step 2: Once the phone number is captured, the flow reaches the ‘paypal invoice’ Code Step wherein we call a dummy API to create a draft invoice and further generate the invoice link

The following are the functions being used in this Code Step:

Sr. No.
Function
Description
1
get_auth_key():
This function generates the authentication key required to use in the generation of the access token. The authentication key is nothing but the base64 encoded value of 'username:password'. For the demo, we have used some credentials. The business can replace this with its own creds.
2
generate_token(conversation_details):
This function generates the access token required to call the PayPal payment link generation. The authentication key created in the above function is used here.
3
create_draft_invoice(conversation_details):
This function generates the draft invoice by using the access token that we generated from the earlier function.
You can read more about it here.
4
send_invoice(conversation_details):

This function sends the invoice and generates the payment link. we use the digit variable that we created from the earlier function.

Also, you can add an array of one or more CC: emails to which notifications are sent in "additional_recipients". If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.

You can read more about it here.

Step 3: Next, you need to add the 'Client ID' and 'Secret' from your Sandbox API Credentials as 'username' and 'password' variables in the get_auth_key(): function as shown in the image below.

You can read more about Sandbox API Credentials here.

Delete

The 'Client Id' and 'Secret' from your Sandbox API Credentials, can be found in your PayPal dashboard under the ‘My Apps and Credentials’ option, in the left-hand side navigation bar, as shown.

Finally, after you have made the necessary changes, you can test the flow end-to-end. 

Beyond this available predefined Skill, you can also build custom use cases by editing this Skill. Whatever changes and updations are required will be done to the Code Steps of this Smart Skill depending on your requirements.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Step 2 - How to check the feedback collected on my bot?
  • What is Words and Phrases Entity?
  • Which all languages are supported on Haptik bots?
  • What are Video HSLs?
  • What are WhatsApp Voice Notes?

Platform

  • Conversation Studio
  • Smart Skills
  • Advanced NLU
  • Intelligent Analytics
  • Omnichannel
  • Smart Agent Chat
  • Enterprise Security
  • Integrations

Solutions

  • Conversational Commerce
  • Lead Generation
  • Customer Care
  • WhatsApp
  • Conversational IVR
  • Google Business Messages

Industries

  • Retail/ E-Commerce
  • Financial Services
  • Travel & Hospitality
  • Telecom

Knowledge

  • ROI Calculator
  • Reports & Research
  • Case Studies
  • Webinars
  • ISAT
  • Tech Blog
  • Business Blog
  • Resources
  • Haptik v/s Yellow
  • Haptik v/s Liveperson
  • Haptik v/s IBM Watson
  • Haptik v/s Verloop
  • Conversations on AI

Company

  • Why Haptik
  • About Us
  • Careers
  • News & Media
  • Awards & Recognition
  • Contact Us
  • Partnerships
  • Investor Relations

Subscribe

Sign up to recieve the latest updates

Find us on

  • Twitter-footer
  • Linkedin-footer
  • YT-footer
  • Insta-footer
  • G2-footer
  • Facebook-footer

Knowledge Base Software powered by Helpjuice

Copyright © jio Haptik Technology Limited 2021 | Data Security & Privacy Policy | GDPR

North America | Asia Pacific | Africa | enterprise@haptik.ai

Definition by Author

0
0