Stripe 凭证#
¥Stripe credentials
你可以使用以下凭据验证以下节点:
¥You can use these credentials to authenticate the following nodes:
支持的身份验证方法#
¥Supported authentication methods
- API 密钥
¥API key
相关资源#
¥Related resources
有关服务的更多信息,请参阅 Stripe API 文档。
¥Refer to Stripe's API documentation for more information about the service.
使用 API 密钥#
¥Using API key
要配置此凭据,你需要一个 Stripe 管理员或开发者账户以及:
¥To configure this credential, you'll need a Stripe admin or developer account and:
- API 密钥密钥
¥An API Secret Key
生成 API 密钥前,请决定是在正式模式还是测试模式下生成。有关两种模式的更多信息,请参阅 测试模式和正式模式。
¥Before you generate an API key, decide whether to generate it in live mode or test mode. Refer to Test mode and live mode for more information about the two modes.
实时模式密钥#
¥Live mode Secret key
要在实时模式下生成密钥:
¥To generate a Secret key in live mode:
- 打开 Stripe 开发者控制面板 并选择 API 密钥。
¥Open the Stripe developer dashboard and select API Keys. 2. 在“标准密钥”部分,选择“创建密钥”。
¥In the Standard Keys section, select Create secret key.
3. 输入密钥名称,例如 n8n integration。
¥Enter a Key name, like n8n integration.
4. 选择“创建”。显示新的 API 密钥。
¥Select Create. The new API key displays. 5. 复制密钥并将其作为私钥输入到你的 n8n 凭据中。
¥Copy the key and enter it in your n8n credential as the Secret Key.
有关更多信息,请参阅 Stripe 的 创建密钥。
¥Refer to Stripe's Create a secret API key for more information.
测试模式和生产模式#
¥Test mode Secret key
要在测试模式下使用密钥,你必须复制现有密钥:
¥To use a Secret key in test mode, you must copy the existing one:
- 前往你的 Stripe 测试模式开发者控制面板 并选择 API 密钥。
¥Go to your Stripe test mode developer dashboard and select API Keys. 2. 在“标准密钥”部分,为“密钥”选择“显示测试密钥”。
¥In the Standard Keys section, select Reveal test key for the Secret key. 3. 复制密钥并将其作为私钥输入到你的 n8n 凭据中。
¥Copy the key and enter it in your n8n credential as the Secret Key.
有关更多信息,请参阅 Stripe 的 创建密钥。
¥Refer to Stripe's Create a secret API key for more information.
测试模式和正式模式#
¥Test mode and live mode
所有 Stripe API 请求均在 测试模式 模式或实时模式下进行。每种模式都有自己的 API 密钥。
¥All Stripe API requests happen within either test mode or live mode. Each mode has its own API key.
使用测试模式访问模拟测试数据,使用生产模式访问实际账户数据。一种模式下的对象无法被另一种模式下的对象访问。
¥Use test mode to access simulated test data and live mode to access actual account data. Objects in one mode aren’t accessible to the other.
请参阅 API 密钥 |测试模式与正式模式,了解每种模式下可用的功能以及何时使用每种模式的指南。
¥Refer to API keys | Test mode versus live mode for more information about what's available in each mode and guidance on when to use each.
n8n credentials for both modes
如果你想同时使用生产模式和测试模式的密钥,请将每种模式的密钥存储在单独的 n8n 凭据中。
¥If you want to work with both live mode and test mode keys, store each mode's key in a separate n8n credential.
键前缀#
¥Key prefixes
Stripes 的密钥始终以 sk_ 开头:
¥Stripes' Secret keys always begin with sk_:
- 活动密钥以
sk_live_开头。
¥Live keys begin with sk_live_.
- 测试密钥以
sk_test_开头。
¥Test keys begin with sk_test_.
n8n 尚未使用受限密钥(前缀为 rk_)测试这些凭证。
¥n8n hasn't tested these credentials with Restricted keys (prefixed rk_).
Publishable keys
请勿将可发布密钥(以 pk_ 为前缀)与你的 n8n 凭据一起使用。
¥Don't use the Publishable keys (prefixed pk_) with your n8n credential.