【发布时间】:2012-10-07 19:10:54
【问题描述】:
我可以创建卡并使用该新卡创建帐户,但是当我尝试创建保留时收到 401 错误提示 Not permitted to perform create on holds
我正在使用balanced.js 创建卡,然后将card_uri 发送到我的应用程序。
然后我通过POSTing 创建一个帐户
{
"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": ...
}
带有新卡的新帐户会显示在我的仪表板balancedpayments.com。
当我尝试通过POSTing 创建保全时
{
"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 创建保留?
【问题讨论】:
标签: payment-gateway balanced-payments