Skip to content

Stripe 凭据#

您可以使用这些凭据来验证以下节点:

支持的认证方法#

  • API key

相关资源#

参考 Stripe 的 API 文档了解有关该服务的更多信息。

使用 API key#

要配置此凭据,您需要一个 Stripe 管理员或开发者账户和:

  • 一个 API Secret Key 密钥

在生成 API 密钥之前,决定是在线上模式还是测试模式下生成。参考测试模式和线上模式了解有关两种模式的更多信息。

Live mode Secret key 线上模式密钥#

在线上模式下生成密钥:

  1. 打开 Stripe developer dashboard 并选择 API Keys
  2. Standard Keys 部分,选择 Create secret key
  3. 输入 Key name,如 n8n integration
  4. 选择 Create。新的 API 密钥显示。
  5. 复制密钥并将其作为 Secret Key 输入到您的 n8n 凭据中。

参考 Stripe 的创建密钥 API 密钥了解更多信息。

Test mode Secret key 测试模式密钥#

要在测试模式下使用密钥,您必须复制现有的密钥:

  1. 转到您的 Stripe test mode developer dashboard 并选择 API Keys
  2. Standard Keys 部分,为 Secret key 选择 Reveal test key
  3. 复制密钥并将其作为 Secret Key 输入到您的 n8n 凭据中。

参考 Stripe 的创建密钥 API 密钥了解更多信息。

Test mode and live mode 测试模式和线上模式#

所有 Stripe API 请求都在测试模式或线上模式中进行。每种模式都有自己的 API 密钥。

使用测试模式访问模拟测试数据,使用线上模式访问实际账户数据。一种模式中的对象无法访问另一种模式。

参考 API keys | Test mode versus live mode了解每种模式中可用内容的更多信息以及何时使用每种模式的指导。

两种模式的 n8n 凭据

如果您想同时使用线上模式和测试模式密钥,请将每种模式的密钥存储在单独的 n8n 凭据中。

Key prefixes 密钥前缀#

Stripe 的密钥总是以 sk_ 开头:

  • 线上密钥以 sk_live_ 开头。
  • 测试密钥以 sk_test_ 开头。

n8n 未测试这些凭据与受限密钥(前缀 rk_)的使用。

可发布密钥

不要将可发布密钥(前缀 pk_)与您的 n8n 凭据一起使用。