Stripe Node SDK 错误 - transfer_group 列出费用
Stripe Node SDK Error - Listing charges by transfer_group
我最近建立了一个系统,使用 charges.list 方法通过他们的 Node SDK 从 Stripe 的 API 中提取收费数据。此方法采用一个包含各种请求配置属性的选项对象。我正在使用其中两个选项:limit 和 transfer_group。我的代码如下所示:
const charges = await stripe.charges.list({
limit: 25,
transfer_group: transferId
});
它工作了一段时间并取消了对帐户的收费,但最近它开始返回错误,我似乎无法在任何地方找到提及。我没有在文档中看到任何提及针对单个 transfer_group 的指控可能过多。错误对象如下所示:
type: 'StripeInvalidRequestError',
raw: {
message: 'Too many charges with transfer group: `fbbb2c66-b79b-eb11-b1ac-000d3a14ec78`',
param: 'transfer_group',
type: 'invalid_request_error',
headers: {
server: 'nginx',
date: 'Tue, 27 Apr 2021 21:41:59 GMT',
'content-type': 'application/json',
'content-length': '183',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required',
'access-control-max-age': '300',
'cache-control': 'no-cache, no-store',
'request-id': 'req_yg2EGfHSoNHsIN',
'stripe-version': '2020-08-27',
'x-stripe-c-cost': '0',
'strict-transport-security': 'max-age=31556926; includeSubDomains; preload'
},
statusCode: 400,
requestId: 'req_yg2EGfHSoNHsIN'
},
rawType: 'invalid_request_error',
code: undefined,
doc_url: undefined,
param: 'transfer_group',
detail: undefined,
headers: {
server: 'nginx',
date: 'Tue, 27 Apr 2021 21:41:59 GMT',
'content-type': 'application/json',
'content-length': '183',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required',
'access-control-max-age': '300',
'cache-control': 'no-cache, no-store',
'request-id': 'req_yg2EGfHSoNHsIN',
'stripe-version': '2020-08-27',
'x-stripe-c-cost': '0',
'strict-transport-security': 'max-age=31556926; includeSubDomains; preload'
},
requestId: 'req_yg2EGfHSoNHsIN',
statusCode: 400,
charge: undefined,
decline_code: undefined,
payment_intent: undefined,
payment_method: undefined,
setup_intent: undefined,
source: undefined
}
有人知道如何解决这个问题吗?
这是 Stripe 的一个已知限制 API。我建议您直接联系 Stripe 支持并向他们询问缓解措施:https://support.stripe.com/contact
我最近建立了一个系统,使用 charges.list 方法通过他们的 Node SDK 从 Stripe 的 API 中提取收费数据。此方法采用一个包含各种请求配置属性的选项对象。我正在使用其中两个选项:limit 和 transfer_group。我的代码如下所示:
const charges = await stripe.charges.list({
limit: 25,
transfer_group: transferId
});
它工作了一段时间并取消了对帐户的收费,但最近它开始返回错误,我似乎无法在任何地方找到提及。我没有在文档中看到任何提及针对单个 transfer_group 的指控可能过多。错误对象如下所示:
type: 'StripeInvalidRequestError',
raw: {
message: 'Too many charges with transfer group: `fbbb2c66-b79b-eb11-b1ac-000d3a14ec78`',
param: 'transfer_group',
type: 'invalid_request_error',
headers: {
server: 'nginx',
date: 'Tue, 27 Apr 2021 21:41:59 GMT',
'content-type': 'application/json',
'content-length': '183',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required',
'access-control-max-age': '300',
'cache-control': 'no-cache, no-store',
'request-id': 'req_yg2EGfHSoNHsIN',
'stripe-version': '2020-08-27',
'x-stripe-c-cost': '0',
'strict-transport-security': 'max-age=31556926; includeSubDomains; preload'
},
statusCode: 400,
requestId: 'req_yg2EGfHSoNHsIN'
},
rawType: 'invalid_request_error',
code: undefined,
doc_url: undefined,
param: 'transfer_group',
detail: undefined,
headers: {
server: 'nginx',
date: 'Tue, 27 Apr 2021 21:41:59 GMT',
'content-type': 'application/json',
'content-length': '183',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required',
'access-control-max-age': '300',
'cache-control': 'no-cache, no-store',
'request-id': 'req_yg2EGfHSoNHsIN',
'stripe-version': '2020-08-27',
'x-stripe-c-cost': '0',
'strict-transport-security': 'max-age=31556926; includeSubDomains; preload'
},
requestId: 'req_yg2EGfHSoNHsIN',
statusCode: 400,
charge: undefined,
decline_code: undefined,
payment_intent: undefined,
payment_method: undefined,
setup_intent: undefined,
source: undefined
}
有人知道如何解决这个问题吗?
这是 Stripe 的一个已知限制 API。我建议您直接联系 Stripe 支持并向他们询问缓解措施:https://support.stripe.com/contact