我正在尝试使用 Stripe API 收取申请费。我确定我在请求中遗漏了一些东西。
Stripe 抱怨它需要以下任何一种: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
这是我得到的回复:
{
"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"
}
}