One-time Payment (Stripe)
Add a custom checkout page to your app with our Stripe integration. With a set of Stripe-specific Bravo Tags, you can turn form input fields into checkout fields that are automatically connected to your Stripe account. Stripe handles identity verification to meet Know Your Customer (KYC) and compliance requirements.
1. In your Bravo app project, access
Connect with stripe
2. Once connected, we'll focus on the UI needed in the app. There are 2 required elements:
- 1.Credit card input field: this field gathers the credit card data.
- 2.Checkout action element: this element triggers the payment action
[action:stripe-checkout](any layer type)
If you want to set the payment amount, you need to specify amount and currency.
This data needs to be included in the form, there are two ways to add it.
- 1.Add these two "hidden fields". These tags support data binding, so you can choose to connect API data to override the amount (10) and currency (eur) values.`[component:input-hidden:10][stripe:amount][component:input-hidden:eur][stripe:currency]`
- 2.Add the amount and currency value into the checkout action tag. (Data binding is currently not supported for this tag.)
If you want to allow the end app user to set the amount they pay (ex: a donation), you can add a visible input text field for the amount or the currency.
- 1.Amount input field: **this field gathers the amount to be paid.
- 2.Currency input field: this field gathers the currency type.
In this example, we allow the user to input the amount, and we specify the currency in the checkout button.
It's recommended to add extra fields that will serve as context for each payment and add information about the customer.
These will be saved in the payment detail page.
- 1.Customer name:
- 2.Customer email:
- 3.Customer phone:
- 4.Payment description:
- 5.Any other information:
[stripe:metadata:<whatevername>]This will be saved under the Metadata section in the payment detail page in Stripe. The value you put in
<whatevername>will appear as the label for this information.
Ex: this metadata tag is set as [stripe:metadata:comments], and the user has input "Save the forest!"
After you have added the checkout action tag to the UI, you can configure the response actions. The response action is what happens after the user triggers the checkout action, in the case it succeeds or fails.
- 1.In Bravo Studio, go to your project and select the app page to open data binding mode.
- 2.Locate the layer with the checkout action tag. It will have a data icon next to it.
- 3.Click on the layer to open the element binding panel, there you can configure the response action for on success and on error.
After you have completed these three steps:
- 1.Connect your Stripe account to Bravo.
- 2.Add the Bravo Tags to your checkout page.
- 3.Configure the response actions after the checkout action.
The checkout page is complete! Your app users can now use the checkout page in your app to make payments to your Stripe account.
1️⃣ Sample Figma file
1️⃣ Sample Adobe XD file
Bravo Sample - Stripe payment.xd.zip
1️⃣ Creating an e-commerce app
That's it! 🥳