Stripe 凭证(Stripe credentials)#
你可以使用以下凭据验证以下节点:
🌐 You can use these credentials to authenticate the following nodes:
支持的身份验证方法(Supported authentication methods)#
- 密钥
你还需要一个 Stripe 签名密钥 或端点密钥,这是为每个 webhook 端点生成的唯一密钥,用于验证传入请求,确保它们确实来自 Stripe。
🌐 You'll also need a Stripe Signature Secret or endpoint secret, which is a unique key for each webhook endpoint used to verify incoming requests, ensuring they truly came from Stripe.
相关资源(Related resources)#
要配置此凭证,你需要一个 Stripe 管理员或开发者账户。有关该服务的更多信息,请参考 Stripe 的 API 文档。
🌐 To configure this credential, you'll need a Stripe admin or developer account. Refer to Stripe's API documentation for more information about the service.
在生成 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 密钥。
- 在 标准密钥 部分,选择 创建密钥。
- 输入一个键名,例如
n8n integration。 - 选择 创建。新的 API 密钥将显示。
- 复制密钥并将其作为 Secret Key 输入到你的 n8n 凭证中。
有关更多信息,请参阅 Stripe 的创建秘密 API 密钥。
🌐 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 密钥。
- 在 标准密钥 部分,为 密钥 选择 显示测试密钥。
- 复制密钥并将其作为 Secret Key 输入到你的 n8n 凭证中。
有关更多信息,请参阅 Stripe 的创建秘密 API 密钥。
🌐 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 凭据
如果你想同时使用实时模式和测试模式的密钥,请将每种模式的密钥存储在不同的 n8n 凭证中。
键前缀(Key prefixes)#
Stripe 的密钥总是以 sk_ 开头:
🌐 Stripes' Secret keys always begin with sk_:
- 实用密钥以
sk_live_开头。 - 测试密钥以
sk_test_开头。
n8n 尚未使用受限密钥(前缀为 rk_)测试这些凭据。
🌐 n8n hasn't tested these credentials with Restricted keys (prefixed rk_).
可发布的密钥
不要在你的 n8n 凭证中使用可发布的密钥(前缀为 pk_)。