To build Retool apps with your Stripe data you'll first need to create a resource for querying the Stripe API. Resources sit on top of our integrations and store the authentication and metadata fields required for you to connect to a data source.
Get started by navigating to the Resources page, clicking Create new and then selecting Stripe as your resource type.
Give your resource a name and add your secret Stripe API key, then click Create resource. You can now select your newly-created Stripe resource when creating queries in your Retool apps.
To connect to Stripe with Retool you'll need to provide a secret Stripe API key available via the Developers > API Keys section of the Stripe Dashboard.
We recommend creating a new secret API key specifically for Retool. Using a Retool-specific key ensures that your Retool apps will not be impacted but updates to the default secret key, and that other applications or services that are using your Stripe API key are not impacted if you need to turn off Retool access. Remember to give your key a clear name.
📘How does Retool use the API key?
Retool uses the API key you provide to authenticate requests to the Stripe API. Requests are authenticated using bearer auth — meaning Retool automatically adds a
Authorization: Bearer YOUR_API_KEYheader to all Stripe API requests made with Retool.
If you'd like to learn more about how API keys work refer to Stripe's API keys documentation.
You can now select your newly-created Stripe resource from the Resource dropdown when creating queries in your Retool apps.
After selecting the resource, pick a Stripe API of your choice from the Operation dropdown. For more in-depth details on each operation and their required payloads, check out the Stripe docs here.
Let's pick GET /v1/customers to retrieve an individual customer's details.
You can display the results of Stripe queries as with any other query in Retool.
You can also write back to Stripe by using one of the POST APIs that Stripe provides. For instance if we want to issue refunds directly from Retool we can use POST /v1/refunds as shown below.
Updated 3 months ago