Stripe Emoji Apparel App
The Emoji Apparel app is an app that demonstrates integrating with the Stripe Android SDK. It uses the standard integration approach, which means it uses PaymentSession to manage the checkout flow, including selecting a Payment Method and specifying a shipping address and shipping method.
The app is comprised of two Activity classes:
StoreActivity, which represents the customer adding items to their cart
PaymentActivity, which represents the checkout experience
- Clone the
- Open the project in Android Studio.
- After deploying the example backend to Heroku and configuring the app, build and run the project.
Deploy the example backend to Heroku
- Create a Heroku account if you don't have one.
- Navigate to the example mobile backend repo and click "Deploy to Heroku".
- Set an App Name of your choice (e.g. Stripe Example Mobile Backend).
- Under Config Vars, set your Stripe testmode secret key
- Click "Deploy for Free".
Configure the samplestore app
const val PUBLISHABLE_KEY = "pk_test_12345"
const val BASE_URL = "https://my-example-app.herokuapp.com"
Set Settings.CURRENCY to the currency that the app should use. The default is
const val CURRENCY = "usd"
val ALLOWED_PAYMENT_METHOD_TYPES = listOf( PaymentMethod.Type.Card )
The following is a demonstration of a Customer
- Adding items to their cart
- Navigating to the checkout screen
- Choosing their Payment Method, which happens to require 3D Secure 2 (3DS2)
- Specifying their shipping address and shipping method
- Confirming their intent to pay
- Authenticating their payment with 3DS2
- Completing their purchase
- App icon from Twemoji