Stripe异常 – 在获取支付对象时出现“没有这样的支付”

huangapple go评论71阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年3月7日 13:40:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75658393.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定