Coinflow’s Card Form components provide a streamlined, PCI-compliant way to collect credit card information directly in your application. Instead of managing separate card number, CVV, and expiration inputs, these components bundle everything into a single embeddable form with one tokenize() method.
Use these components when you want to:
All three components expose a tokenize() method via a ref that returns a token you can pass to the Coinflow checkout APIs.
Use CoinflowCardForm to collect the full card details (number, expiration, CVV) and tokenize them in a single call.
When a customer pays with a saved card, you need to re-collect the CVV and refresh the token. Use CoinflowCvvForm with the saved card’s token from the Get Customer endpoint.
In Vue, the CoinflowCardForm component accepts a variant prop to switch between 'card-form', 'card-number-form', and 'cvv-form' modes.
Use CoinflowCardNumberForm when you only need to collect the card number and expiration — for example, when saving a card for future use without an immediate charge.
tokenize() ResponseThe tokenize() method returns a CardFormTokenResponse:
CoinflowCvvForm only returns token since expiration details are already stored with the saved card.
All card form components accept a theme prop to customize the look and feel. Theme values are passed as a MerchantTheme object.
The theme values shown above are examples for illustration. Configure your branding in the Merchant Dashboard or contact the Coinflow integrations team to set these values for your account.
CoinflowCardForm automatically adapts its layout to the width of the container you place it in — no configuration is required.
This is especially useful in mobile checkout UIs, where a single-row layout can clip the card number in narrow viewports. The form measures its own container and switches layouts on the fly, including when the viewport is resized or rotated.
Because the form’s height changes when it reflows, the embedded iframe reports its content height back to the SDK, which resizes the iframe automatically so the fields are never clipped.
To let the form size itself correctly, place it in a container whose width you control and whose height is allowed to grow. Avoid setting a fixed height on the component or its wrapping element — doing so prevents the form from expanding to its two-row layout.
Responsive reflow and automatic height adjustment are built in to CoinflowCardForm. To pick up this behavior, update to the latest version of your SDK (@coinflowlabs/react, @coinflowlabs/vue, @coinflowlabs/angular, or @coinflowlabs/react-native). No code changes are needed.
CoinflowCardForm / CoinflowCardNumberFormCoinflowCvvFormTokens expire if not used within 7 days of creation. Once used, a token is valid for 5 minutes in production. In the sandbox environment, tokens remain valid indefinitely. If a token expires, call tokenize() again to generate a new one.
If you are currently using CoinflowCardNumberInput and CoinflowCvvInput, the new Card Form components simplify your integration:
The legacy components continue to work but are deprecated. New integrations should use the Card Form components.