Back-end app example
Build a Stripe app that performs back-end processing with no user interface.
This guide shows you how to build a back-end Stripe app. It doesn’t provide any user interface other than the default app settings page.
Select the authentication type that you want to use. If you want to build a private app, you can’t use OAuth authentication.
The following example shows how to build a Stripe app that uses platform key authentication.
Create a Stripe account
Vor der Integration mit Stripe müssen Sie ein Stripe-Konto erstellen.
- Erstellen Sie ein Konto, indem Sie Ihre E-Mail-Adresse, Ihren vollständigen Namen und Ihr Land eingeben und ein Passwort erstellen.
- Füllen Sie Ihr Unternehmensprofil aus.
- Klicken Sie im Dashboard auf Ihre E-Mail-Adresse verifizieren. Stripe sendet zur Verifizierung eine E-Mail an Ihre E-Mail-Adresse.
- Ihre E-Mail-Adresse verifizieren.
Hinweis
You can continue building your app in a sandbox as you follow the steps in this guide. You need a live Stripe account to publish your app.
Install Stripe CLI and Apps CLI Plugin
# Install Homebrew to run this command: https://brew.sh/ brew install stripe/stripe-cli/stripe
# Connect the CLI to your dashboard stripe login
# Install Apps CLI Plugin stripe plugin install apps
See the additional instructions to verify that you’re using CLI v1.12.4 and that node.js is up to date.
Create your app
stripe apps create {my-app-name}
After you run this command, it prompts you for the following:
- An app ID, which must be globally unique and can change
- An app display name, which doesn’t need to be unique and that you can change
Configure your app
In your new directory, find the stripe-app.json app manifest file, and update it as follows:
{ "id": "com.example.example-app", // unique app ID "version": "0.0.1", // app version "name": "Example App", // app display name "icon": "./[YOUR_APP]_icon_32.png", // app icon; put the file in the same directory for ease of distribution "stripe_api_access_type": "platform", "allowed_redirect_uris": ["https://example.com/installed/callback"], // optional redirect URLs "distribution_type": "public", // for a private app, set to "private" "sandbox_install_compatible": "true", "permissions": [] }
Configure installation redirect URLs (optional)
In the allowed_ array, add the URLs to return your app users to after they install your app from an install link. The first entry becomes the default. If you don’t want to create an install link, you don’t have to include this array in your app manifest.
Configure app permissions
In the permissions array, include the necessary object and event permissions for your use case. For example, accessing the Customers API needs the customer_ permission.
- Enter each permission as an object with both a
permissionand apurpose. Stripe uses thepurposestring during app review. - Include only the permissions that your app needs.
Implement server-side logic
You can implement back-end functionality such as:
- Integrating securely with external systems
- Handling Stripe events with webhooks
- Making signed Stripe API calls
- Scheduling actions
For detailed instructions, see Add server-side logic.
Upload, test, and publish your app
The process for uploading, testing, and publishing your app depends on whether you want to publish your app to the Stripe App Marketplace or keep it private to your own account.