英文:
Stripe exception - "no such payout" when fetching a payout object
问题
I just received a payout.paid webhook for one of my Connect accounts. I'd like to retrieve the payout object and expand on the balance_transaction and destination properties.
So in one of my controllers I do this just to test and fetch the payout-
StripeConfiguration.ApiKey = _config["StripeSettings:SecretKey"];
var service = new PayoutService();
Payout payout = service.Get("po_1Mip8FQfrEXkPBakiZX3dTD8");
And I receive the exception saying "no such payout po_1Mip8FQfrEXkPBakiZX3dTD8"
QUESTION - Is this how I retrieve a payout on a Connect account or is this only looking at my platform account for this payout id?
If this is only looking at my platform account and not through all my Connected accounts, how would I look at the Connect account payout?
英文:
I just received a payout.paid webhook for one of my Connect accounts. I'd like to retrieve the payout object and expand on the balance_transaction and destination properties.
So in one of my controllers I do this just to test and fetch the payout-
StripeConfiguration.ApiKey = _config["StripeSettings:SecretKey"];
var service = new PayoutService();
Payout payout = service.Get("po_1Mip8FQfrEXkPBakiZX3dTD8");
And I receive the exception saying "no such payout po_1Mip8FQfrEXkPBakiZX3dTD8"
QUESTION - Is this how I retrieve a payout on a Connect account or is this only looking at my platform account for this payout id?
If this is only looking at my platform account and not through all my Connected accounts, how would I look at the Connect account payout?
答案1
得分: 1
为了检索属于已连接帐户的支付,您应该在发出请求时包括Stripe-Account
标头,其中包含已连接帐户的ID。请求然后将查看已连接帐户中的支付ID:https://stripe.com/docs/connect/authentication#stripe-account-header
如果未包括Stripe-Account
标头,则请求将仅查看平台中的支付ID。
英文:
In order to retrieve the Payout that belongs to a connected account, you should include Stripe-Account
header as connected account ID when making the request. The request will then look at the Payout ID in the connected account: https://stripe.com/docs/connect/authentication#stripe-account-header
If Stripe-Account
header is not included, the request will only look at the Payout ID in the platform.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论