I am able to receive the Customer Payment using Stripe API, but I want it should send to other customers using Customer ID.
I have written the code for receiving the payment, but I want payment should be sent to other customer using his customer 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));
It should be sent to other customers, but I don't know what other code snippets to add here.
"cus_FhPkYk0wrgEyCC". as long as the customer has a default payment card, your API call will work - wsw