Moo*_*oon 9 stripe-payments stripe-connect
我正在尝试使用Stripe API收取申请费.我确信我在请求中遗漏了一些东西.
条带投诉它需要以下任一项:OAuth密钥,Stripe-Account标头或目标参数.
我正在传球Stripe-Account
.
你能指点我正确的方向吗?
这是我的卷曲请求:
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
Run Code Online (Sandbox Code Playgroud)
以下是我得到的回复:
{
"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"
}
}
Run Code Online (Sandbox Code Playgroud)
小智 9
将我对此问题的经验添加到上述评论中 - 当您在请求中包含申请费时,Stripe 预计您将代表已连接的帐户向客户收费。申请费是应进入您的平台账户的金额,作为您提供服务的费用。
如果 Stripe 认为支付的账户是平台账户,则抛出此错误,因此对同一账户处理单独的申请费是没有意义的。发生这种情况的方式包括在请求中传递您的平台帐号而不是连接的帐号,或者将目标参数设置为 null。
解决方案是仔细检查您付款的帐户是否不是您的平台帐户,或者如果费用将转到您的平台,则不包括申请费。我会添加指向文档相关部分的链接,但我不知道这在任何地方都有涉及。
归档时间: |
|
查看次数: |
3839 次 |
最近记录: |