A 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.
This ID represents the Stripe Data source to use for payment processing.
A currency data type value representing the amount to be charged. For example:
This value would charge 10 dollars.
The text to display on the submit button in the Credit card control.
The placeholder text for the Credit Card Number input.
The placeholder text for the CVC input.
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.
To use an existing customer, pass in a customer id to the control.
The submitted action chain is triggered whenever the user clicks the button at the bottom of the form.
The Submit Successful action is triggered if the processor successfully executes the payment.
The Submitted Failed action is triggered if the payment fails to complete successfully by the processor.
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.
Example 1: Simple Collection Form
A simple credit card form:
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.
- Working with Numbers and Currency in Airscript - for information on using Airscript to generate the payment amount dynamically.
- Creating a Stripe Integration - for information on creating a stripe integration.
- Working with Forms & Agreements - has a complete list of information on forms and agreements.