繁体   English   中英

使用Stripe API的客户对客户付款

[英]Customer to Customer Payment Using Stripe API

我可以使用Stripe API接收客户付款,但是我希望它应该使用客户ID发送给其他客户。

我已经编写了用于接收付款的代码,但是我希望使用他的客户ID将付款发送给其他客户。

Stripe.apiKey="sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
Customer c=Customer.retrieve("cus_FhPkYk0wrgEyCC");
Map <String, Object> chargeParam= new HashMap<String, Object>();
chargeParam.put("amount","500");
chargeParam.put("currency", "usd");
chargeParam.put("customer", c.getId());
Charge.create(chargeParam);
Gson gson=new GsonBuilder().setPrettyPrinting().create();
System.out.println(gson.toJson(c));

应该将其发送给其他客户,但我不知道在此添加哪些其他代码段。

对于普通的Stripe帐户,这是不可能的。 您可以接受任何客户的付款,但不能向客户付款。 您只能向与您的Stripe帐户关联的银行帐户付款。

如果要处理付款并向卖家和服务提供商付款,请查看使用Stripe Connect: https : //stripe.com/docs/connect

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM