【发布时间】:2015-11-01 18:20:52
【问题描述】:
我正在尝试使用 Stripe API 收取申请费。我确定我在请求中遗漏了一些东西。
需要以下任何一项的条带投诉:OAuth 密钥、Stripe-Account 标头或目标参数。
我正在传递Stripe-Account 标头。
能否请您指出正确的方向?
这是我的 curl 请求:
curl https://api.stripe.com/v1/charges \
-u sk_test_<key>: \
-H "Stripe-Account: acct_<key>" \
-d amount=2000 -d currency=usd -d capture=true \
-d card=tok_<key> -d description="curl" -d application_fee=48
这是我得到的回复:
{
"error": {
"type": "invalid_request_error",
"message": "Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).",
"param": "application_fee"
}
}
【问题讨论】:
-
您是否在此处传递自己的帐户 ID 作为平台?如果是这样,您可以尝试将新帐户连接到平台吗?
-
99% 的情况下,当您尝试向自己的平台收费并在
Stripe-Account标头中传递平台的帐户 IDacct_XXX时,就会发生该错误。 -
@koopajah 这也是我的问题的原因。我在 Stripe 上创建了一个新帐户(使用新的电子邮件地址),然后就没事了。
-
这是一个常见的测试环境问题,绝对应该在 Stripe 文档中解释...
-
我也遇到了这个问题,是我和平台和客户使用同一个账号造成的。
标签: stripe-payments stripe-connect