我有以下Python代码在Stripe中创建一个费用。
a_charge = stripe.Charge.create(
amount=cents,
currency="usd",
source=token,
description="my_description",
application_fee=application_fee,
stripe_account=teacher_stripe_id
)
我觉得这个操作成功了,因为它在我的仪表板上显示有一个charge_id。但紧接着在代码中,以下操作失败:
stripe.Charge.retrieve(a_charge.id)
错误信息: 没有这样的收费:somelongstringhere
然而,somelongstringhere确实是我Stripe仪表板上收费详情下的ID。那么为什么Stripe无法检索此收费?这不是正确的ID吗?