Paypal Payments Lite

Demo to preview the settings

Introduction

Introducing the Paypal Payments Lite Payment plugin. It is a purpose-built solution that enables payment processing and fund transfers through the renowned PayPal payment system.

Prerequisites

To interact with the plugin you'll need to get the API credentials PAYPAL_SECRET and PAYPAL_CLIENT.

How to setup

☝
For demo purposes, all screenshots below are from Sandbox, but in Live this is the same.
  1. Go to https://developer.paypal.com/dashboard page.
    1. Here you can toggle between Sandbox and Live environments.
      Image without caption
  1. Select Apps & Credentials.
    1. Image without caption
  1. If you have no app, create one.
    1. Image without caption
  1. If you have already an app, select one from the REST API apps list.
    1. Image without caption
  1. On the opened page, you have the API credentials section.
    1. Image without caption
  1. Open plugin settings on your Bubble app.
  1. Paste the Client ID and Secret key from step 5 in the PAYPAL_CLIENT and PAYPAL_SECRET fields.
    1. Image without caption
  1. For the PAYPAL_API field paste the following value:
    1. Sandbox environment: https://api-m.sandbox.paypal.com
      Live environment: https://api-m.paypal.com
      Image without caption

Plugin Elements Properties

The plugin has one visual element that can be used on the page: PayPalButon.

PayPalButon

Displays the PayPal button for payment.
Image without caption

Element Actions

  1. Initialize - This action is used to initialize the payment button for certain orders.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Order ID
      The ID of the order.
      text
      Intent
      The intent to either capture payment immediately or authorize a payment for an order after order creation. Accepted values: CAPTURE, AUTHORIZE.
      text
  1. Reset - This action is used to reset the payment button.
    1. Image without caption

Element Events

Title
Description
approved
This event is triggered when the order is paid successfully.

Element States

Title
Description
Type
payer
It contains the status of payment, the payer's email, his given name and surname.
text

Plugin actions

  1. Π‘reate Order - Create a new order.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Currency code
      TheΒ three-character ISO-4217 currency codeΒ that identifies the currency.
      text
      Amount
      The value, which might be: 1. An integer for currencies like JPY that are not typically fractional. 2. A decimal fraction for currencies like TND that are subdivided into thousandths. For the required number of decimal places for a currency code, see Currency Codes.
      number
      Intent
      The intent to either capture payment immediately or authorize a payment for an order after order creation. Accepted values: CAPTURE, AUTHORIZE. CAPTURE - The merchant intends to capture payment immediately after the customer makes a payment. AUTHORIZE - The merchant intends to authorize a payment and place funds on hold after the customer makes a payment. Authorized payments are best captured within three days of authorization but are available to capture for up to 29 days. After the three-day honor period, the original authorized payment expires and you must re-authorize the payment. You must make a separate request to capture payments on demand. This intent is not supported when you have more than oneΒ purchase_unitΒ within your order.
      Dropdown
      Description
      The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
      text
      Returns:
      Title
      Description
      Type
      order ID
      The created order ID.
      text
      response
      The raw body response.
      text
  1. Authorize Order - Authorize payment for an order.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      order ID
      The ID of the order.
      text
      Returns:
      Title
      Description
      Type
      authorization ID
      The authorization ID for the order.
      text
      response
      The raw body response.
      text
  1. Create Payout - Create batch payout.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Sender Batch ID
      A sender-specified ID number. Tracks the payout in an accounting system.
      text
      Email subject
      The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string of up to 255 single-byte characters.
      text
      Email message
      The email message that PayPal sends when the payout item completes. The message is the same for all recipients.
      text
      Recipient type
      The recipient type. Value is: 1. EMAIL - The unencrypted email. Value is a string of up to 127 single-byte characters. 2. PHONE - The unencrypted phone number. Note: The PayPal sandbox does not support the PHONE recipient type. 3. PAYPAL_ID - The encrypted PayPal account number. If the sender_bacher_header includes the recipient_type attribute, payout items use the recipient_type of the sender_batch_header, unless a payout item has its own recipient_type attribute. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.
      Dropdown
      Receiver
      The receiver of the payment. Corresponds to theΒ recipient_typeΒ value in the request. Max value of up to 127 single-byte characters.
      text
      Value
      The value, which might be: 1. An integer for currencies like JPY that are not typically fractional. 2. A decimal fraction for currencies like TND that are subdivided into thousandths. For the required number of decimal places for a currency code, see Currency Codes.
      number
      Currency
      TheΒ three-character ISO-4217 currency codeΒ that identifies the currency.
      text
      Returns:
      Title
      Description
      Type
      payout batch ID
      The ID of the payout.
      text
  1. Get Payout - Get payout batch details.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Payout Batch ID
      The ID of the payout.
      text
      Returns:
      Title
      Description
      Type
      batch status
      Refers to the current status of a payout batch. When you initiate a payout batch using the PayPal Payouts API, the batch goes through various states.
      text
      time created
      The created time of payout.
      date
  1. Capture Order - Capture authorized payment.
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Order ID
      The ID of the order.
      text
      Returns:
      Title
      Description
      Type
      response
      The raw body response.
      text
  1. Get Order -
    1. Image without caption
      Fields:
      Title
      Description
      Type
      Order ID
      The ID of the order.
      text
      Returns:
      Title
      Description
      Type
      status
      The status of the order.
      text
      intent
      The intent of the order.
      text
      create time
      The create time of order.
      text
      response
      The raw body response.
      text
      captured
      The captured status of the order.
      yes/no

Workflow example

Creating an order

This example represents creating a CAPTURE order for $100.
  1. On the page is placed the following Button.
    1. Image without caption
  1. In the workflow tab, when this Button is clicked it is called Π‘reate Order action.
    1. Image without caption
  1. The Create Order action has the following fields.
    1. Image without caption
  1. After the action, the obtained order ID is saved in the database.
    1. Image without caption

Initialize PayPal Button

This example represents the initialization of the PayPal Button for payment.
  1. On the page is placed a Repeating Group with order list and PayPal Button.
    1. Image without caption
  1. In the Repeating Group is used a Button for getting the details about the order.
    1. Image without caption
  1. In the workflow tab, when this Button is clicked then are called the following actions.
    1. Image without caption
  1. Firstly, the PayPal Button is reset.
    1. Image without caption
  1. The Get Order action is called to get details for the selected order.
    1. Image without caption
  1. Finally, the PayPal Button is initialized with the obtained details from Step 6.
    1. Image without caption

Changelogs

Update 07.05.20 - Version 1.0.0

  • Version1.

Update 07.07.23 - Version 1.1.0

  • Updated logo.

Update 12.07.23 - Version 1.2.0

  • Updated description.

Update 15.08.23 - Version 1.3.0

  • Upgrade to Node 18.

Update 04.09.23 - Version 1.4.0

  • Updated description.

Update 05.09.23 - Version 1.5.0

  • Updated description.

Update 06.09.23 - Version 1.6.0

  • Obfuscation.

Update 07.09.23 - Version 1.7.0

  • Updated description.

Update 12.09.23 - Version 1.8.0

  • Updated description.

Update 12.09.23 - Version 1.9.0

  • Minor updates.

Update 15.09.23 - Version 1.10.0

  • Updated description.

Update 19.10.23 - Version 1.11.0

  • Updated description.