Skip to content

Payments

Pro feature

Payments are part of Formatrica Pro.

Collect payments on any form with Stripe or PayPal. The visitor fills the form, is redirected to the gateway's hosted checkout, and returns to your page with a confirmation. The submission is only finalized once the payment is confirmed by the gateway's webhook.

Overview

Setup has two parts:

  1. Gateway credentials — entered once, site-wide, under Formatrica → Settings → Payments.
  2. Per-form settings — enable payments and set the amount on each form's Settings → Payments tab.

1. Connect your gateway (site-wide)

Under Settings → Payments, enter your credentials for the provider(s) you use. Each provider has separate test and live credentials so you can sandbox safely.

Stripe

  • Publishable key + Secret key (test and live).
  • A webhook signing secret (test and live) — from the webhook you create in step 3.

PayPal

  • Client ID + Client Secret (test and live).
  • A Webhook ID (test and live) — from the webhook you create in step 3.

Secret keys are stored encrypted and are write-only: after saving, the field shows a masked placeholder, and re-saving without changing it keeps the stored value.

2. Enable payments on a form

On the form's Settings → Payments tab:

SettingOptions
ProviderStripe or PayPal
ModeTest or Live
CurrencyAny supported currency (24 two-decimal currencies plus zero-decimal JPY/KRW/CLP/VND and three-decimal KWD/BHD/OMR)
AmountFixed (a set price), From a Price field, or From a Calculation field
DescriptionShown on the gateway checkout (max 300 chars)
Cancel redirectWhere to send a visitor who cancels (must be a page on your site)

The amount is always computed on the server

Whichever amount mode you choose, the charge is recomputed server-side from your configuration — never taken from the browser. A tampered client value can't change what's charged.

3. Configure the gateway webhook

Payments are confirmed by a webhook from the gateway, so you must register Formatrica's webhook URL in your Stripe or PayPal dashboard. Each provider needs separate webhooks for test and live. The exact URLs to paste are shown on the Settings → Payments screen; they follow this pattern:

https://your-site.com/wp-json/formatrica/v1/payments/webhook/stripe/test
https://your-site.com/wp-json/formatrica/v1/payments/webhook/stripe/live
https://your-site.com/wp-json/formatrica/v1/payments/webhook/paypal/test
https://your-site.com/wp-json/formatrica/v1/payments/webhook/paypal/live

Stripe — create a webhook endpoint pointing at the URL above and subscribe to these events:

  • checkout.session.completed
  • checkout.session.async_payment_succeeded
  • checkout.session.async_payment_failed
  • checkout.session.expired
  • charge.refunded

Then copy the endpoint's Signing secret into the matching Stripe webhook-secret field in Formatrica.

PayPal — create a webhook in your PayPal app pointing at the URL above and subscribe to:

  • PAYMENT.CAPTURE.COMPLETED
  • PAYMENT.CAPTURE.DENIED
  • PAYMENT.CAPTURE.DECLINED
  • PAYMENT.CAPTURE.REFUNDED

Then copy the Webhook ID into the matching PayPal webhook-ID field in Formatrica (verification fails without it).

What the visitor sees

  1. Submits the form → redirected to the gateway's hosted checkout.
  2. Pays → returned to your form's page with a success confirmation.
  3. Cancels → returned with a "payment cancelled" notice (or to your cancel-redirect page).

The submission is stored, emailed, and dispatched to integrations only after the gateway confirms payment.

Licence behaviour

Payments are a licensed feature with no grandfathering: if your Pro licence lapses, payment forms show a neutral "temporarily unavailable" notice and refuse submissions rather than collecting money that can't be processed. Saving a form without an active licence reverts the payments toggle (the builder tells you when this happens). Re-activating the licence restores the form to working order.

Test it

  • Use test credentials and test mode, submit, and complete a sandbox payment.
  • Confirm you land back on the form with the success message and that the submission/notification only appears after payment.
  • Trigger a refund in the gateway dashboard and confirm the order status updates via the webhook.