Payment field

A payment field collects a Stripe payment. Use it when respondents need to pay as part of submitting a form.

Configuration

Payment fields also accept shared field properties. See shared field properties.

NameTypeRequiredDefaultDescription
typestringyes—Set to payment.
namestringyes—At least 1 character. Use letters, digits and underscores, starting with a letter. This is the field’s key in submission data.
labelstringnoPayment AmountText shown above the payment.
subtextstringnononeSmaller text under the label.
input_labelstringnononeText above the input.
requiredbooleannofalseWhen true, the respondent must pay before submitting. This requirement does not apply while the field is hidden.
visible_ifcondition arraynonone (always shown)Show the field only when the condition is true. An empty array hides it.
hide_ifcondition arraynonone (never hidden)Hide the field when the condition is true.
currencystringnoUSDISO currency code, such as USD, EUR or GBP.
amountintegerno0Amount in cents. Sets the fixed price or the base price in multiplier mode.
amountTypestringnofixedfixed charges amount; dynamic gets the amount from another field.
calculatedFromstringOnly when amountType is dynamicnoneName of a numeric field to use for the dynamic amount.
dynamicModestringnomultiplier when calculatedFrom points to a number_input; otherwise field_valuefield_value treats the referenced value as the amount in currency units. multiplier multiplies the referenced value by amount.
minAmountintegernonone (no lower limit)Minimum charge in cents.
maxAmountintegernonone (no upper limit)Maximum charge in cents.

Other payment options include allowedPaymentMethods (card, apple_pay, google_pay), description, and receiptEmail (the name of an email field).

Validation

A required payment field blocks submission until the respondent pays; the server checks this too. If the field is hidden, it skips validation even when required. If the amount is zero or less, or below 50 cents, payment does not start and a message appears. An amount outside minAmount or maxAmount also prevents payment from starting. If a card is declined or payment fails, the payment step shows a message and lets the respondent try again.

When the form’s CAPTCHA setting is enabled, the respondent must pass CAPTCHA before payment can start. For dynamic pricing based on calculations, the server recomputes calculations before payment and ignores changed client values. Duplicate-submission prevention is unavailable on forms containing a payment field.

Submission value

The field stores the Stripe PaymentIntent ID as a string starting with pi_.

Example

This field charges a fixed USD 25.00 and is required:

{ "type": "payment", "name": "ticket_payment", "label": "Ticket payment", "subtext": "Pay to reserve your place.", "currency": "USD", "amount": 2500, "amountType": "fixed", "required": true }