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.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | yes | — | Set to payment. |
name | string | yes | — | At least 1 character. Use letters, digits and underscores, starting with a letter. This is the field’s key in submission data. |
label | string | no | Payment Amount | Text shown above the payment. |
subtext | string | no | none | Smaller text under the label. |
input_label | string | no | none | Text above the input. |
required | boolean | no | false | When true, the respondent must pay before submitting. This requirement does not apply while the field is hidden. |
visible_if | condition array | no | none (always shown) | Show the field only when the condition is true. An empty array hides it. |
hide_if | condition array | no | none (never hidden) | Hide the field when the condition is true. |
currency | string | no | USD | ISO currency code, such as USD, EUR or GBP. |
amount | integer | no | 0 | Amount in cents. Sets the fixed price or the base price in multiplier mode. |
amountType | string | no | fixed | fixed charges amount; dynamic gets the amount from another field. |
calculatedFrom | string | Only when amountType is dynamic | none | Name of a numeric field to use for the dynamic amount. |
dynamicMode | string | no | multiplier when calculatedFrom points to a number_input; otherwise field_value | field_value treats the referenced value as the amount in currency units. multiplier multiplies the referenced value by amount. |
minAmount | integer | no | none (no lower limit) | Minimum charge in cents. |
maxAmount | integer | no | none (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
}