条纹卷曲命令行 POST
stripe curl command line POST
我正在尝试使用 stripe curl 向测试客户收取 10 美元,但 returns 错误提示金额不正确。
curl https://api.stripe.com/v1/charges \
-u sk_test_qtxx1EuLIMqMwOmEw3NKxxxx: \
-d amount=10.00 \
-d currency=usd \
-d card[number]=4242424242424242 \
-d card[exp_month]=12 \
-d card[exp_year]=2019 \
-d card[cvc]=123
返回的错误是:
{
"error": {
"type": "invalid_request_error",
"message": "Invalid integer: 10.00",
"param": "amount"
}
}
我试了10个,它说:"Amount must be at least 50 cents"。
我想知道我是否遗漏了任何 post 变量,例如某种令牌或密钥。
根据the documentation,金额参数需要
A positive integer in the smallest currency unit
所以十块钱,你需要通过1000
。
我正在尝试使用 stripe curl 向测试客户收取 10 美元,但 returns 错误提示金额不正确。
curl https://api.stripe.com/v1/charges \
-u sk_test_qtxx1EuLIMqMwOmEw3NKxxxx: \
-d amount=10.00 \
-d currency=usd \
-d card[number]=4242424242424242 \
-d card[exp_month]=12 \
-d card[exp_year]=2019 \
-d card[cvc]=123
返回的错误是:
{
"error": {
"type": "invalid_request_error",
"message": "Invalid integer: 10.00",
"param": "amount"
}
}
我试了10个,它说:"Amount must be at least 50 cents"。
我想知道我是否遗漏了任何 post 变量,例如某种令牌或密钥。
根据the documentation,金额参数需要
A positive integer in the smallest currency unit
所以十块钱,你需要通过1000
。