NullaCode | Bubble Plugins and Templates
DemosContributor Profile
  • NullaCode
  • Support
  • Contact
  • Bubble Plugins
    • Square
      • Square Checkout
      • Square Card Form (Web Payments SDK)
      • Square Seller Authorization (OAuth)
      • Square Subscription Payments
      • Square Customers (Free)
      • Square POS (In-Person Payments)
Powered by GitBook
On this page
  • Forum: Help - Feedback - Feature Requests
  • Plugin Page: Purchase - Ratings
  • Useful Concepts
  • SCA / 3D Secure / Card Verification
  • Tokens
  • App Fee
  • Delayed Captures
  • Getting Set Up
  • To Create a Payment
  • To Save a Card on File
  • Elements
  • Square Card Form
  • Workflow Actions
  • Create Card Payment
  • Update Payment
  • Cancel Payment
  • Complete Payment
  • Save Card
  • List Cards
  • Retrieve Card
  • Additional Information
  • Possible Roadmap

Was this helpful?

  1. Bubble Plugins
  2. Square

Square Card Form (Web Payments SDK)

PreviousSquare CheckoutNextSquare Seller Authorization (OAuth)

Last updated 1 year ago

Was this helpful?

This Bubble.io plugin will allow you to embed the Square Web Payments SDK Card Payment Form anywhere in your app to enable you to capture and verify card details to take payments and save cards on file for your customers.

API Reference

Forum: Help - Feedback - Feature Requests

Plugin Page: Purchase - Ratings

Useful Concepts

SCA / 3D Secure / Card Verification

3D Secure (Strong Customer Authentication in the EEA) is used to verify the buyer and reduce the chance of fraudulent transactions. When a card is entered into the payment form and it requires verification, a pop-up is shown to allow additional authentication such as a 6-digit code. This step is required in the EU and UK or if using Square Risk Manager.

Tokens

When a card is captured using the Square Payment Form, it is tokenized and the card token is used once to create a payment or store a card on file in the next workflow action.

Once a card has been successfully tokenized after a user has pressed the Square Payment Form button, the Card Token (source Id) and Verification Token (if using SCA) are published as states attached to the payment form element.

App Fee

As a form of developer income, when your app is taking payments on another seller's behalf using a token from the Square Seller Authentication (OAuth) plugin, you can choose to take a fee from the Square seller's payment at the time it is processed, much like the percentage fee Square takes from all payments processed through their platform.

Delayed Captures

Payments can be processed but delayed and set to an APPROVED state, which gives you the opportunity to update or cancel them before they are captured and set to a COMPLETED or CANCELLED state.

Getting Set Up

  • Add the Square Payment Form element to a page in your app.

  • On the same page, create a workflow triggered by the event 'A Square Payment Form button clicked'.

  • Add the element workflow action 'Create Card Token (Source Id) From a Square Payment Form' as the first step of the workflow.

    • Note: Set the Intent field to CHARGE to take a payment and STORE if you are going to save the card on file for a customer to use later.

  • Create another event triggered by 'Do when condition is true' where the condition is the Square Payment Form's Token Id (Source Id) is not empty.

To Create a Payment

  • Add the Square Payments - Create Card Payment workflow action to your workflow and use the Card Token (Source Id) from the Square Payment Form element in the Source Id field.

  • (Optional) If using SCA verification, include the Verification Token within your Create Card Payment workflow action.

  • Note: If taking a payment with a saved card on file, use the customer's Card Id as the Source Id.

To Save a Card on File

  • Add the Square Cards - Save Card workflow action to your workflow and use the Card Token (Source Id) from the Square Payment Form element in the Source Id field.

  • Use the Square Customers plugin to create a customer and add their Square Customer Id into the Create Card workflow action.

  • (Optional) If using SCA verification, include the Verification Token within your Create Card Payment workflow action.

Elements

Square Card Form

A form that can be added to any page in your app, to accept card details, verify the owner and publish tokens to the exposed element states Token (Source Id) and Verification Token. The form button label can be changed dynamically.

Action: Create Card Token (Source Id) from a Square Payment Form

Tokenizes the card details and verifies the owner (If card verification is checked) and publishes the Token and Verification Token.

Action: Reset Card Token (Source Id) from a Square Payment Form

Clears the Card Token (source Id) state and sets the payment button to 'enabled' so that another payment can be made without refreshing the page.

Event: Button Clicked

Starts a workflow when the payment button is clicked.

Event: Error Occurred

Starts a workflow when an error occurs within the Square Card Form element.

State: Card Token (Source Id)

The ID for the source of funds for this payment. This is used as the Source Id in the Create Payment workflow action.

State: Verification Token

An identifying token generated by the 3-D secure challenge (SCA). This is used in the Create Payment workflow action.

State: Error Message

If an error occurs with the element, it will produce an error message.

Workflow Actions

Create Card Payment

Creates a new payment using the card token generated from the Square Payment Form.

Update Payment

Edit a pending payment that is in an APPROVED state.

Cancel Payment

Set a pending payment from an APPROVED to a CANCELLED state and void the transaction.

Complete Payment

Set a pending payment from an APPROVED to a COMPLETED state and complete the transaction.

Save Card

Saves a card on file for a customer using the Card Token or Payment Id as the Source Id and the customer's Id from the Square Customers plugin.

List Cards

List a customer's cards on file.

Retrieve Card

Retrieve card details using the Card Id.

Additional Information

  • There is a maximum amount that can be processed for each payment transaction set by Square, for example, $50,000, please check the Square documentation.

Possible Roadmap

  • Retrieve Payment.

  • Dark mode style.

  • CASH and EXTERNAL payment types.

  • Google Pay, Apple Pay and more payment methods.

  • Integrate with Square Orders.

  • Tips.

  • Disable card.

  • ACH Payments

Please see the

Square documentation
Square Web Payments SDK Overview
Square Payments API Reference
Square Cards API Reference
Logo[New Plugin] Square Web Payments SDK & CardsBubble Forum
LogoSquare Card Form (Web Payments SDK) Plugin for Bubble, by NullaCodeBubble