Prerequisites
- Feathery form integrated with Morf. Follow Morf’s Feathery Setup Instructions.
- Stripe Publishable Key. The publishable key is safe to use in the browser — do not use your secret key in the form.
- Morf Org ID. Log into the Morf dashboard, select your staging or production organization, and copy the alphanumeric UUID from
https://dashboard.morf.health/<organization-id>.
1. Add hidden fields in Feathery
In the form, go to Settings > Data Tracking > Edit Hidden Fields and add:morf_org_idstripe_publishable_keystripe_token_id
Conditionally set hidden field values
morf_org_id→ Populate as described in the Feathery Setup Instructions.stripe_publishable_key→ Set conditionally based on whether the form is in test or live mode. Add this to your existing Set Environment Variables custom logic rule.stripe_token_id→ Leave blank. This will be populated automatically after the card is tokenized.
2. Add the Credit Card Iframe
- Add a Container → Embed iframe component on the step where you want to collect the card.
- Set the Field ID to:
stripe_token - Set the iframe URL to:
{{morf_org_id}} and {{stripe_publishable_key}} placeholders are dynamically pulled from your hidden fields.
Recommended sizing
To ensure the card UI displays fully:3. Add a Custom Logic Rule
This rule listens for a message from the iframe and stores the Stripe token instripe_token_id.
- Go to Logic → Create Rule.
- Name the rule
Initialize credit card capture. - Configure the trigger:
- Event trigger: Form Step is Loaded
- Step trigger: your credit card step
- Go to Advanced Logic > Edit Code and add the following:
View code
View code
4. Test the Flow
- Publish your changes.
- Open the test form.
- Enter a Stripe test card.
- In Morf staging, confirm the Feathery form step submission event includes
stripe_token_idon the payload.
Security Notes
- Only your publishable key is used in the browser. Morf handles all secret key operations server-side.
- Tokens are short-lived and safe to store temporarily in Feathery — raw card data is never exposed.
- If you rotate your Stripe publishable key, update the
stripe_publishable_keyhidden field value.
