WP Simple Pay Integration
Redirect the visitor to a WP Simple Pay payment form after submission, with the email, amount, and any other values prefilled through the URL.
Action type: wp_simple_pay
Label: Handoff to WP Simple Pay
Dependency: WP Simple Pay (available when SIMPAY_VERSION is defined or the simple-pay post type exists)
Handler: Core_Forms\Integrations\IntegrationHandlers::wp_simple_pay
Source: src/integrations/class-integration-manager.php, src/integrations/class-integration-handlers.php
Unlike the other commerce actions, this one does not create users, customers, or orders. It only builds a handoff URL — payment itself happens on the WP Simple Pay form.
Setup
- Make sure WP Simple Pay is installed and active. The action does not appear in the Actions list otherwise.
- Publish the WP Simple Pay payment form you want to hand off to.
- In WordPress, edit your Core Forms form > Actions tab > Add Action > Handoff to WP Simple Pay.
- Select the payment form and map the email/amount fields.
Settings Reference
| Setting | Required | Default | Description |
|---|---|---|---|
| Payment form | Yes | -- | The WP Simple Pay form (simple-pay post) to redirect to |
| No | [email] |
Added to the handoff URL as email |
|
| Amount | No | [amount] |
Added as amount; non-numeric characters are stripped |
| Prefill map | No | -- | One query_key=value per line, appended as extra query arguments |
All text settings support Core Forms data variables, so any submitted field can be forwarded.
How It Works
- The action resolves the permalink of the selected payment form; if the post no longer exists it fails with "WP Simple Pay form not found."
- It builds a redirect URL with these query arguments:
-
email-- the resolved email value -amount-- the resolved amount with everything except digits and the decimal point removed -cf_submission-- the Core Forms submission ID, so you can correlate the payment back to the submission - one argument per prefill-map line (keys are sanitized; empty values are dropped) - The URL becomes the form's redirect, so the visitor lands on the payment form immediately after submitting.
Each run is idempotent: Core Forms builds a key from the submission ID, action type, and resolved settings, so re-processing the same submission is skipped.
Example
Prefill map for a donation form:
donor_name=[first_name] [last_name]
campaign=spring-drive
Resulting redirect:
https://example.com/donate/?email=jane%40example.com&amount=25.00&cf_submission=123&donor_name=Jane+Smith&campaign=spring-drive
Troubleshooting
- Action missing from the Actions list: WP Simple Pay must be active (
SIMPAY_VERSIONdefined or thesimple-paypost type registered). - "WP Simple Pay form not found": The selected payment form was deleted or unpublished so it has no permalink. Re-select a form.
- Fields not prefilled on the payment form: Core Forms only passes query parameters. Whether WP Simple Pay reads them depends on your WP Simple Pay version and form configuration; check its field prefill/URL parameter support.
- No redirect: The redirect only applies when the action succeeds; check the action log.