Skip to main content
Custom fields add your own questions to checkout. Use them for anything Kelviq doesn’t already collect, such as a company name for the invoice, a purchase order number, a team size, or agreement to your terms. You create a field once in Settings, then choose which checkout links or checkout sessions should ask it.

Create a field

  1. Open Settings → Custom fields and click Create custom field.
  2. Pick a Field type and decide whether the field is required.
  3. Enter the Field label, the question customers see above the input.
  4. Add optional Help text, shown below the input, and a Placeholder that shows the expected format.
  5. Set the validation for the type you picked, and the Validation error message customers see when their answer doesn’t pass.
  6. Click Create field.
The Create string field dialog with a required Company name field, help text, placeholder, and length limits

Field types

Use a required Boolean field for “I agree to the terms” style checkboxes.

Add a field to checkout

Checkout links: on the product page, click Get Link. Under Assign custom field, choose the field, then copy the checkout link. Customers who open that link see the question. Checkout sessions from the API: pass the field identifiers in customFields when you create a checkout session:
Fields appear in the order they’re sorted in Settings. Each answer is checked against the field’s type and validation before payment. Identifiers that don’t exist or belong to archived fields are ignored. Editing a field changes it on every checkout link that already uses it.

Where the answers go

Answers are saved with the checkout session and the order and subscription it creates. Through the API and webhooks they arrive keyed by field identifier:
  • customFieldsData on orders, checkout sessions, and invoices in the API.
  • custom_fields_data in the checkout.completed, order.created, order.updated, and order.refunded webhooks.