Credit Card

Overview

Credit Card web control is used to collect credit card information from users. By default, it is set up to work with a Stripe Integration.

organizing info

Control Details

Datasource ID

This ID represents the Stripe Data source to use for payment processing.

Currency

A Currency data type value representing the amount to be charged. For example:

CURRENCY(  
  1000,  
  "USD",  
  2  
)

This value would charge 10 dollars.

Button Text

The text to display on the submit button in the Credit card control.

Number Placeholder

The placeholder text for the Credit Card Number input.

CVC Placeholder

The placeholder text for the CVC input.

Expiration Placeholder

The placeholder text for the expiration input.

Return Payment Token

If enabled, the payment request will return a payment token that can be used to identify the payment method. The token is available on the event.token.

Create New Customer

If enabled, the payment request will return a new customer id for the customer. This id will be returned on the event.customerId.

Customer ID

To use an existing customer, pass in a customer id to the control.

Control Actions

Submitted

The submitted action chain is triggered whenever the user clicks the button at the bottom of the form.

Submit Successful

The Submit Successful action is triggered if the processor successfully executes the payment.

Submitted Failed

The Submitted Failed action is triggered if the payment fails to complete successfully by the processor.

Input Validation

The Input Validation action is triggered every time the user modifies a value on the credit card data. The results of the validation check are returned on the input validation event and can be used for custom error messages. 

Note: this action chain is fired on both validation success and failure.

Examples

Example 1: Simple Collection Form

A simple credit card form:

organizing info

Create a Stripe Integration at the Console level. Attach the integration to the app via the Configuration Builder. Add a Credit Card component to a web page. Select the integration from the dropdown. Add a valid currency value.