我试图查询Stripe的税务id的价值,以验证是否有人已经注册了该税务id。我试过的任何方法都无法得到纳税证明。我的代码是用C#编写的,但是任何其他语言的答案都是有帮助的。下面的代码返回空异常,没有多少帮助。
public async Task<StripeList<TaxId>?> GetTaxIds(string value)
{
try
{
var options = new TaxIdListOptions()
{
ExtraParams = new Dictionary<string, object> {
{ "value", value }
}
};
var service = new TaxIdService();
return await service.ListAsync(String.Empty, options);
} catch (Exception ex)
{
return null;
}
}另一种解决方案是使用Stripe查询语言搜索具有给定税号的客户,如下所示:
var options = new CustomerSearchOptions
{
Query = $"tax_ids CONTAINS '{value}'",
};关于如何通过tax_id获得客户的解决方案也将是很棒的。谢谢。
https://stackoverflow.com/questions/74532565
复制相似问题