[
{
"title":"Testing",
"link":"https://docs.solidgate.com/payments/testing/",
"text":"Simulate payments to test your integration before launching in production.",
"imgSrc":"https://solidgate.com/wp-content/uploads/2022/06/icon-customizable.svg"
}
,
{
"title":"Create your payment form",
"link":"https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form/",
"text":"Understand how to integrate the payment form into your product.",
"imgSrc":"https://solidgate.com/wp-content/uploads/2022/06/icon-payments.svg"
}
,
{
"title":"Subscriptions",
"link":"https://docs.solidgate.com/subscriptions/",
"text":"Create and maintain a stable and healthy business subscription model.",
"imgSrc":"https://solidgate.com/wp-content/uploads/2022/06/icon-global.svg"
}
]
Create a seamless experience for customers by styling your payment form
The Solidgate Payment Form offers exceptional adaptability and comprehensive customization options to meet diverse payment processing needs across regions. With its capability to integrate additional transaction-specific fields and control field visibility, it ensures a personalized and streamlined user experience.
A well-designed payment form not only captures customer attention but also significantly influences conversion rates and satisfaction by offering a simple, user-friendly interface.
Through the form, take the opportunity to:
use one of the payment form templates
define styles for the selected form template or retain the default option
restrict
Guide
After completing all the steps described above and modifying all required parameters, you need to initiate Solidgate SDK.
optional field
from display
Template
Solidgate offers several default form templates with pre-configured styles.
Using a template for a payment form from Solidgate simplifies the payment acceptance process on your website.
Templates offer a pre-designed and functional form, eliminating the need for customization. This ensures compliance with industry standards for both security and user experience.
This traditional design with clearly defined input fields provides a simple, straightforward user experience. It is ideal for businesses seeking a familiar, accessible interface without unnecessary features.
This template can easily adjust to different screen sizes, making it suitable for various devices.
With a clean, modern aesthetic, the flat template removes shadows and textures to emphasize simplicity and minimalism.
It is ideal for businesses looking for a contemporary look that aligns with a flat design digital branding strategy.
This template offers a bold, eye-catching design with depth and contrast, using shadows and highlights to create a sense of layering.
It is perfect for businesses that want to provide a dynamic and immersive user experience, possibly for younger demographics or tech-savvy users.
The inline template provides a condensed, efficient layout, ideal for quick interactions and minimal scrolling.
This could be a good fit for businesses looking to streamline the payment process, or for integrating the payment form within a section of a webpage without taking too much space.
Styles
Solidgate Payment Form offers a
styles
object, which contains nested CSS properties tailored to different form elements, allowing for straightforward and flexible customization of the form appearance to match the design of your website without the need to modify the underlying HTML or JavaScript.
Form styles properties
Expand all
This class targets all input fields within the form, enabling you to apply consistent styling.
To view changes, directly modify the input_group class in your CSS. Activation occurs automatically as the form renders.
Defines the style for the payment form’s header.
Adjustments to the header class become visible upon form load and are particularly useful for aligning with your brand identity.
Responsible for the overall container of the form, allowing for adjustments in font, color, or spacing.
The form_body becomes visible when the form is initialized and can be tailored to fit seamlessly within your site’s design.
Customize the subtitle of your payment form, enhancing readability and focus.
Changes are immediately visible, providing a quick way to align form instructions with user expectations.
Controls the styling of the form submit button.
To hide the button, set the display property to none in your styles. This class becomes crucial when you prefer a custom button or need to follow the specific design systems.
Wraps fields like CVV and Expiry Date in the default form template, enabling a two-column layout for a compact and organized look.
Alterations to this class are seen as soon as the form is rendered.
Edit the card template, such as changing the background color with a property like card_view: { 'background': '#3D4251'}.
This class is particularly impactful for branding purposes and user engagement.
Modifies the display of card brand logos, ensuring they fit well within the design of your form.
The size and position can be adjusted to meet visual design standards.
Specific to the card number input field, this class can be styled to indicate valid input or errors, with immediate feedback enhancing the customer’s experience.
Targets the CVV field, allowing for distinct styles during error states or focus, providing immediate visual cues to the customer.
Controls the appearance of the expiry date field.
Customizing this field can ensure consistency with other form elements and can trigger when the field is in focus or an error state.
Description
Defines the style for the cardholder’s name field, which is a crucial element for transactions.
A string parameter ranging from 3 to 50 characters. The pattern ^[a-zA-Z]+ [a-zA-Z]+(?: [a-zA-Z]+)*$ is used to validate the format.
The field specifies the name as it appears on the card, essential for transaction processing. It requires at least one space between the first and last names to ensure accuracy and enhance transaction conversions.
Manages the styling of any additional fields that may be required for specific transactions, ensuring these fields are visible and styled according to the form’s design when they become relevant.
Styling for the ZIP code field can be crucial for forms requiring address information, and adjustments to this class will be seen as soon as the ZIP code field is rendered.
Customize the error messages associated with the card and flat templates, ensuring that any validation errors are communicated effectively and clearly.
The errors customization for card and flat template.
Edits the appearance of security-related branding, such as SSL certificates or payment compliance logos, reinforcing trust and security on the payment form.
The properties for input fields on the Payment Form could be applied for the following states:
not-empty
error
valid
default - without specifying the state
In case the state is not specified, properties are applied for all states.
The following pseudo-classes and pseudo-elements can also be styled using a nested object inside a variant:
:hover
:focus
:placeholder
There is no support for transferring images - neither via link nor via data-uri.
For the Solidgate Payment Form, applying CSS styles allows control over the visibility of form elements, providing control over the display of specific properties within the form.
Please note that hiding price-related fields on the payment form might impact the form functionality, so thorough testing is recommended to ensure the form still functions correctly.
To customize all labels on the payment form, add the parameter fieldNameLabel with the new label name in the formParams object for each desired field.
To customize all placeholders on the payment form, add the parameter fieldNamePlaceholder with the new label name in the formParams object for each desired field.
To get the value of fieldNameLabel or fieldNamePlaceholder for additional fields, you need to take the Field Class name on the table, remake it into camelcase, and add a Label or Placeholder at the end.
For example, bolivia_ci becomes boliviaCiLabel, and argentina_dni becomes argentinaDniLabel
Solidgate Payment Form provides two options for payment submission:
click on the payment button
use the form.submit method
The option to display a custom payment button below the form is available, allowing for the collection of additional customer data.
To hide the payment form submit button, set the allowSubmit display property in formParams to false during initialization. This action not only hides the button but also blocks form submission via the enter key.
<template><Payment:merchant-data="merchantData":form-params="formParams"width="100%"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}constformParams:InitConfig['formParams']={allowSubmit:false}</script>
<template><Payment:merchant-data="merchantData"@mounted="onMounted"@ready-payment-instance="onReadyPaymentInstance"/><buttonv-if="mounted"
@click="submit">Submit</button></template><scriptlang="ts"setup>import{defineAsyncComponent,ref}from'vue'import{InitConfig,ClientSdkInstance}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}letmounted=ref(false)letformResolve:(form:ClientSdkInstance)=>{}=()=>{}constformPromise=newPromise<ClientSdkInstance>(resolve=>{formResolve=resolve})functiononReadyPaymentInstance(form:ClientSdkInstance):void{formResolve(form)}functiononMounted():void{mounted.value=true}functionsubmit():void{formPromise.then(form=>form.submit())}</script>