- 🏗 How to set up Stripe payment
- Checkout with set price
- Checkout where the app user sets the price
- Extra information fields
- Checkout response actions
- 💎 Resources
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.
🏗 How to set up Stripe payment
- In your Bravo app project, access Settings >
Connect with stripe
2. Once connected, we'll focus on the UI needed in the app. There are 2 required elements:
- Credit card input field: this field gathers the credit card data.
- Checkout action element: this element triggers the payment action
[action:stripe-checkout](any layer type)
Checkout with set price
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.
- 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.
- Add the amount and currency value into the checkout action tag. (Data binding is currently not supported for this tag.)
Checkout where the app user sets the price
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.
- Amount input field: this field gathers the amount to be paid.
- Currency input field: this field gathers the currency type.
You don't need to have both input fields in the form, you can specify either one in the checkout action tag.
Ex: If you just have a visible amount input field, then include the currency in the checkout tag like this:
Make sure you have a double colon
:: in the tag if the amount is not included.
Extra information fields
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.
- Customer name:
- Customer email:
- Customer phone:
- Payment description:
- Any other information:
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.
[stripe:metadata:comments], and the user has input "Save the forest!"
If you want the app user to input the information themselves, you need to add an input field tag with these information tags.
Checkout response actions
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.
- In Bravo Studio, go to your project and select the app page to open data binding mode.
- Locate the layer with the checkout action tag. It will have a data icon next to it.
- Click on the layer to open the element binding panel, there you can configure the response action for on success and on error.
If you don't set up any response action, these are the default responses: - On success: a pop-up dialog that says "Payment success" - On error: No response
Options for Response Actions: - Show Alert: Display a pop-up message. - Go To Page: Redirects user to another page in the app. - Open URL: Opens the web browser on the phone with the specified URL. - Refresh: Refreshes the current page
After you have completed these three steps:
- Connect your Stripe account to Bravo.
- Add the Bravo Tags to your checkout page.
- 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
Figma - Bravo Sample: Stripe Payment | Made for Bravo Studio. Add one-time card payments integrated with Stripe in your Bravo app with t...
Figma Community file - Made for Bravo Studio. Add one-time card payments integrated with Stripe in your Bravo app with this sample Figma file. The file includes layers named with Bravo Tags, containers, and other essential setup. 🤓 To see the final result, create a project in Bravo Studio with this Figma file and prev...
1️⃣ Sample Adobe XD file
That's it! 🥳