Skip to main content
Bit Form – Payments

Square Payment Field

Estimated reading: 10 minutes 12 views

Summary: Take card, Google Pay and Apple Pay payments in WordPress forms with the Bit Form Square payment field: connect Square, set the amount and see each payment.

Bit Form – Square Payment Field

The Square field takes card payments in your form through your Square account. Visitors type their card into Square’s secure card form, or pay with Google Pay or Apple Pay, and the form is submitted as soon as the payment goes through. Use it to sell products, take bookings or collect fees when your business already runs on Square.

Availability: Bit Form Pro 3.6.0 or later.

Requirements

  • Bit Form Pro 3.6.0 or later.
  • A Square account with an application in the Square Developer Console. The application gives you the Application ID and the Access token.
  • A Square location that is active and can take card payments. The location also sets the currency of every payment.
  • A site that loads over https. Square’s card form does not run on a page without https.

Connect your Square account

Connect the account once, then use it in any number of forms.

  1. In the WordPress admin, go to Bit Form → App Settings → Payments and click Square under Available Payment Gateways.
  2. Enter an Account Name, for example the name of your shop, and choose the Mode: Sandbox for test payments or Live for real ones (1).
  3. In the Square Developer Console, open your application and its Credentials page. Copy the Application ID and the Access token into Bit Form (2). Use the sandbox token with Sandbox mode and the production token with Live.
  4. Click Test connection. Bit Form checks the keys and fills Location with your active locations that take card payments, shown as name and currency, for example Default Test Account (USD) (3). With one location, it is selected for you.
  5. Click Save (4). Bit Form checks the keys with Square again before it stores them.
Square settings in bit form app settings, payments, with account name, mode, application id, access token, the location list after a connection test, and the test connection and save buttons

The account now appears under Connected Accounts with a Sandbox or Live badge. The Access token is stored encrypted and never shown again: when you edit the account, the box reads Saved. Leave blank to keep it, and leaving it empty keeps the saved token.

Note: Connecting and editing payment accounts needs the permission to manage Bit Form settings. Other users who build forms can still pick a connected account in the field, but they never see its keys.

Add the Square payment field to a form

  1. Open the form in the form builder.
  2. In Add Fields, open Payment Fields and click Square, or drag it onto the form.
  3. If no Square account is connected yet, a Connect Square window opens with the same settings as App Settings. Save the account and the field is added. A user who cannot manage settings sees a message asking them to have someone who manages Bit Form settings connect an account.

The new field is labelled Card details. With one Square account, the field uses it automatically. A form can have one Square field, which can sit inside a Section but not inside a Repeater. The form does not need a separate Submit button: after a successful payment the Square field submits the form itself.

Example: a product order form

A shop sells three kits and charges the price of the kit the visitor picks. The form has a required Kit Radio Button field with these options, set in the options editor:

LabelValue
Starter Kit ($29)29
Pro Kit ($59)59
Studio Kit ($99)99

In the Square field, Amount is set to From a field with Amount field set to Kit. A visitor who picks Pro Kit ($59) sees a Pay $59.00 button and is charged 59.00 USD. The sections below use this form.

Square field settings

Square Accounts and Payment Methods

Square payment field basic tab with square accounts set to an account and payment methods showing the usd currency from the square location and card, google pay and apple pay ticked, next to the field on a product order form
  1. Square Accounts: the connected Square account that receives the payment.
  2. Payment Methods: the Currency and the ways the visitor can pay (Accept).
  3. The Square field on the form, with the wallet buttons above the card form.

Currency cannot be changed in the field. It is set by the connected Square location; to take another currency, connect a location that uses it. Until an account is chosen, Currency reads Not known yet.

Under Accept, Card is always on. You can add:

  • Google Pay: shown above the card form in browsers that support Google Pay. Turn Google Pay on in your Square Developer account.
  • Apple Pay: shown in Safari on Apple devices only. Register your site’s domain for Apple Pay in your Square Developer account first, or the button stays hidden. Apple Pay also needs https.

A wallet that cannot run in the visitor’s browser, on your domain or in your country is left out without an error, and the visitor pays by card. On a subscription the wallets are hidden, because Google Pay and Apple Pay pay once.

Payment Type and Amount

Square field payment type set to one-time and amount set to from a field with the kit field selected and minimum and maximum left at no limit
  1. Payment Type: One-time charges the visitor once. Subscription charges now and then on a schedule until it is cancelled or ends; see Subscription Payments.
  2. Amount: where the one-time amount comes from.

Fixed amount charges the same amount on every payment. Enter it in Amount (USD), for example 59.00, without a currency symbol; the label shows your currency. The default is 10.00.

From a field charges the value of another field in the form. Amount field lists the form’s Radio Button, Number and Currency fields. Minimum and Maximum limit the amount a visitor can pay; leave them at No limit when the field only offers fixed choices. Set them when the amount is typed by the visitor (a donation) or calculated in the browser with Form Calculations.

Advanced settings

Square field advanced tab with pay button text pay, card form language, font size and corner radius, and wallet buttons set to black
  1. Pay Button → Text: the text on the payment button; the default is Pay. The amount is added after this text on the published form, so Pay becomes Pay $59.00.
  2. Card Form: Language of Square’s card form (the default, Visitor’s browser language, or one of English, Spanish, French or Japanese variants), Font size (px) from 12 to 24 and Corner radius (px) from 0 to 24. Square draws the card form in its own frame, so only these can be changed; empty boxes keep Square’s look.
  3. Wallet Buttons: Black or White Google Pay and Apple Pay buttons. Shown when a wallet is on.

The Advanced tab also has the settings every field has, such as Helper Text, Hidden and Admin Label. The colors of the Pay button are set in the form’s Style tab, on the field’s Pay Button layer.

How the payment works on the form

Published product order form with jane cooper's details, pro kit selected, a google pay button, the square card form filled with a sandbox card and a pay 59. 00 dollar button
  1. The wallet button, shown only where the wallet is available. Apple Pay appears in Safari only.
  2. Square’s card form: card number, expiry date, CVV and, for some countries, the postal code.
  3. The Pay button with the amount to charge. With From a field, it updates as the visitor changes their answers.

When the visitor clicks Pay, Bit Form first checks the form for errors and saves the answers. Square then checks the card, including 3-D Secure where the bank asks for it, and Bit Form charges the card. After a successful payment the button changes to Submit form and the form is submitted automatically. If something stops the submission, the visitor sees Payment received. If the form does not finish submitting, click “Submit form”.

If the visitor closes the page after paying but before the form is submitted, Bit Form completes the entry about 30 minutes later and runs its emails and integrations. This uses WP-Cron, so it needs a site that runs scheduled tasks.

How Bit Form checks the amount

The amount charged never comes from the visitor’s browser. Bit Form works it out on the server from the saved form and the visitor’s answers, then charges it:

  • Fixed amount: the amount saved in the field.
  • Radio Button: the saved answer must be one of the field’s options. Otherwise the visitor sees This amount is not allowed. Please choose one of the listed options.
  • Number or Currency field: the amount must be within that field’s own minimum and maximum and within the payment field’s Minimum and Maximum. A Currency field is read in the format it shows to the visitor, so 12,50 € is read as 12.50.
  • Calculated totals: Bit Form runs the form’s calculation again on the server and compares the result. A formula the server cannot repeat is accepted only within Minimum and Maximum.
  • If the amount shown on the button no longer matches, for example because an answer changed, nothing is charged. The visitor sees The amount to pay has changed. Please check it and pay again. and the button shows the new amount.

After the payment, the form cannot be submitted with different answers that change the price: the visitor sees Your answers no longer match the amount you paid. Please change them back to submit the form. A payment field hidden by Conditional Logic does not need to be paid.

View the payment in an entry

Open the entry in Entries. The Payment section shows the Square payment, and the Timeline records when it was captured.

Entry details payment section for a square payment with status paid, amount 59. 00 usd, method card, card visa ending 1111, transaction id, date and view receipt, and the payment captured timeline event
  1. The Payment section: Status (Paid or Pending review), Amount, Method (Card, Google Pay or Apple Pay), the card brand and last four digits, Transaction ID, Date and a View receipt link to Square’s receipt.
  2. The Payment captured event in the entry Timeline.

A payment Square holds for review is saved as Pending review. Approve or decline it in your Square account. The Square field’s value in the entry, in emails and in integrations is the Square transaction ID.

Limitations

  • Bit Form Pro only. One Square field per form, not inside a Repeater.
  • The currency is the currency of the connected Square location.
  • Card, Google Pay and Apple Pay only. Square’s other methods, such as ACH bank transfer, Cash App Pay and Afterpay, are not supported.
  • Refunds are not made from Bit Form. Refund a payment in your Square Dashboard.
  • Square’s card form needs https; Apple Pay also needs your domain registered with Square.

Troubleshooting

Test connection says the account has no active location

The message This Square account has no active location that can take card payments. means none of the account’s locations is active with card processing. Activate a location in your Square Dashboard, or use the sandbox token of a sandbox application, then test again.

Square refused the access token

Square refused this access token. Check that it is a sandbox token. (or a production token) means the token and the Mode do not match. Use the sandbox token with Sandbox and the production token with Live.

Visitors see “Payments are not available on this form right now.”

The field’s account is not connected or has no currency. Open the account in App Settings, click Test connection, choose a location and save. If the account shows Needs reconnecting, enter the Access token again.

The Google Pay or Apple Pay button does not appear

Check that the wallet is ticked under Accept and turned on in your Square Developer account. Apple Pay shows in Safari on Apple devices only, after your domain is registered with Square, and both wallets need https. A wallet that is not available for the visitor is left out silently.

FAQ

Can I test the Square field without real payments?

Yes. Connect an account in Sandbox mode with your application’s sandbox Application ID and token, and pay with one of Square’s sandbox test cards. Switch the account to Live with the production keys before you publish the form.

Can the Square field charge a different amount for each choice?

Yes. Set Amount to From a field and choose a Radio Button field whose option values are the prices, as in the product order example.

Can a Square field take recurring payments?

Yes. Set Payment Type to Subscription. See Subscription Payments for the plan settings and the schedules Square can bill.

Can I use Square and another payment field on the same form?

A form can have one Square field. Other payment gateways can be added to the same form as separate fields.

Related documentation

Share this Doc

Square Payment Field

Or copy link

CONTENTS
Before you go
The #1 Affordable Form Plugin in the Industry

10,000+

Trusted Businesses

5 Star Rated

on WordPress.org
shield
No Risk: Get a “No-Questions-Asked” refund if Bit Form is not the right fit for your project.

Subscribe

×
Cancel