Integrating Stripe with TinyForm for Seamless Payment Processing
Transform your TinyForm into a powerful payment collection tool by integrating with Stripe. This guide will walk you through creating a payment form, obtaining API keys from Stripe, and setting up your payment forms.
Creating a Payment Form in TinyForm:
- Use the Form Builder in TinyForm to add the fields required for your form.
- Integrate the Stripe payment option by adding an HTML Snippet Field to your form. Use the following code for a basic integration:
- htmlCopy code
- {{STRIPE}}
- Or, to maintain design consistency, wrap it with a div tag:
- htmlCopy code
- <div class="form-group">
{{STRIPE}}
</div>
- Utilize the Stripe Add-On UI in TinyForm to select fields that will capture necessary payment information such as price and quantity.
Obtaining API Keys from Stripe:
- Log into your Stripe account.
- Navigate to the “API” section and copy your API Keys for later use.
Setting Up Payment Forms with Stripe in TinyForm:
- Access the Add-Ons Manager in TinyForm and select 'Stripe'.
- Click on 'Setup a Payment Form'.
- Configure the payment process in the form that appears:
- Form: Choose the form you're integrating with Stripe.
- Status: Toggle to enable or disable the Stripe configuration.
- Secret Key & Publishable Key: Enter the required API credentials from Stripe.
- Items: Define each product or service with a description, price field, and quantity field. The sub-total is calculated by multiplying the quantity by the price.
- Credit Card Field Settings: Customize the appearance and information of the credit card field. Options include:
- Label, Description, Statement Descriptor: Provide clear identifiers and descriptions for the credit card field.
- Currency: Set the transaction currency, recommended to be "United States Dollar".
- Hide Options: Choose to hide the postal code, icon, or custom styles if needed.
- Style: Customize the field's appearance using CSS properties in JSON format.
- Additional Fields: Optionally include additional fields like receipt email, cardholder name, address details, etc., for verifications and record-keeping.
- After accurately filling in all required fields, click 'Create'.
With these steps, your TinyForm is now equipped to handle secure, efficient payment processing via Stripe, offering a seamless transaction experience for your customers.