Our Ionic 5 Stripe Payment app will allow you to securely charge money from a user’s credit card to your Stripe account using the Stripe API:
Our Stripe Payment Template contains ready-to-use services and the UI that makes it easy to use.
Note that you will need to arrange for your actual Stripe API to make it work.
Before you can use the Stripe API you will need to sign up for an account and then fill out the section Public business information on the Account Settings page. It is easy - just follow the instructions on the Register page.
Once you are logged into your account (will need to be activated to go live), you can start with adding the products you are going to sell.
Select the Products tab and click + Add product to create your first product. In the new window, provide the needed product information, and once ready, confirm by clicking the Save product button. As many products as needed can be added one by one.
This is how the products list with three added items looks like:
Also, you can check the Developers > API key panel for your Stripe API keys.
Note, that the Publishable and Secret keys will be needed for your application later:
Please make sure that the account or business name in Stripe is successfully set up and you have added at least one product to operate with.
Now, let's get the Ionic 5 Stripe Payment app.
- Click Create new app.
- Click From backup and select the project backup file on your drive.
- Type in the app name, for example, Ionic 5 Stripe Payment App.
- Click Create:
In a few moments, the app is created.
Now, when you open your app, you will see that all needed pages and services have been automatically imported and you are ready to go with the app:
The next step is to connect the app backed with Stripe API.
- Now, go to the Server Code tab and select the Stripe_Settings library that has been imported with the backup:
- In the library code that opens in a new window, you will now need to provide the Stripe API Publishable key and Secret key. To find it, go back to the Developers > API key panel of the Stripe dashboard and copy the keys that need to be provided for the code.
- Click Save:
Now, when your app version is ready, you might like to test it.
A great option to quickly test the app is to use our Appery.io Tester app.
Here are the details how you can use it.
- Build an application using EXPORT > Binary selecting the format you prefer (you are also free to build both if you need):
.ipato start building your projec::
Managing Build Error The provisioning file is not set
If this is your first app created with Appery you will most likely get the error signifying about missing certificates that will prevent you from successfully finishing the build process.
The error reads similar for both binary types and indicates that you should set the corresponding certificate before starting a new build.
If this notification is what you see after starting your build, please check out the this document about the certificate management that explains how to add the needed certificate to your project:
- Once your project is generated, you will see the QR-Code that you can use to upload the application to your device (or save the
.ipafile for further use):
- Install the app on your device and run it reviewing the items on sale and adding them to Favorites:
- To make your first purchase, select the item, click Buy and, in the new window, use the test card number 4242424242424242 with any valid expiration date and CVV (read more here). Confirm the payment by clicking Pay:
- You will be notified that the payment is successful:
- Also, your Stripe Payments dashboard should show the new charge info:
Note, that you can try using the following test cards to check different payment scenarios:
- 4242424242424242 Succeeds and immediately processes the payment.
- 4000000000003220 3D Secure 2 authentication must be completed for a successful payment.
- 4000000000009995 Always fails with a decline code of insufficient_funds.
Appery.io Tester App
A great option to quickly test the app on the device is to use our Appery.io Tester app.
The app is free and available for both iOS and Android.
You can check out this page to learn more about using the Appery.io Tester app.
After the app has been tested, activate the account and don’t forget to switch from test mode to Live in your Stripe dashboard before going live (the test mode switch should be set to off).
Note as well that before you can proceed with exporting your production app, you will need to go to Project view > Project > App settings > Android binary/iOS binary to select the Release build type (Debug is the default type for both and can be used for testing purposes only):
Another Important Note!
Please, note that before you can export the app, the app certificates must be imported or automatically generated (in the case of Android).
You can check this document in case you need help with exporting your application for iOS.
Here, you will find information on generating certificates for Android.
Note as well that starting from August 2021, new apps are required to publish with the Android App Bundle (
.aab) on Google Play.
Please read more here.
You can also check this Appery.io Community video that shows how to create Android and iOS certificates:
Video: Payment via Stripe for PWA and Web Application
You can also check our Appery.io video that shows how to organize the payment process in PWA and Web applications:
Updated 26 days ago