我可以创建一张卡并使用该新卡创建一个帐户,但是当我尝试创建一个保留时,我收到一个 401 错误说Not permitted to perform create on holds
我正在使用balanced.js
创建卡,然后将其发送card_uri
到我的应用程序。
然后我通过POST
ing创建一个帐户
{
"uri": card_uri,
"email_address":"xxx@yyy.com"
}
https://api.balancedpayments.com/v1/marketplaces/MYTESTMARKETURI/accounts?MYTESTMARKETSECRETKEY
我收到这样的回复:
{
"holds_uri": "/v1/marketplaces/MYTESTMARKETURI/accounts/AC6uOkhFTsOMpvY8zAvjnBtu/holds",
"name": null,
"roles": [],
"created_at": ...,
"uri": ...,
"bank_accounts_uri": ...,
"refunds_uri": ...,
"meta": {},
"debits_uri": ..,
"transactions_uri": ...,
"email_address": "xxx@yyy.com",
"id": "AC6uOkhFTsOMpvY8zAvjnBtu",
"credits_uri": ...,
"cards_uri": ...
}
并且带有新卡的新帐户会显示在我在 balancepayments.com 上的仪表板中。
当我尝试通过POST
ing创建保留时
{
"amount": 200
}
我https://api.balancedpayments.com/v1/marketplaces/MYTESTMARKETURI/accounts/AC6uOkhFTsOMpvY8zAvjnBtu/holds?MYTESTMARKETSECRETKEY
收到以下错误:
{
"status": "Unauthorized",
"category_code": "authentication-required",
"category_type": "permission",
"description": "Not permitted to perform create on holds. Your request id is OHMf82dbd8e10a811e29f5d026ba7d31e6f.",
"request_id": "OHMf82dbd8e10a811e29f5d026ba7d31e6f",
"status_code": 401
}
我究竟做错了什么?如何使用 BalancedPayments.com REST API 创建保留?