#pravin-connect
1 messages · Page 1 of 1 (latest)
hi there!
-who do you want to be the merchant of record - connected account / platform?
what connected account type are you using - express/custom/standard?
connected accout type is Standard.
i want to be third party Person who will do payments for connected account
i want to save that users card details by creating customer id
so you want the connected account details to appear on the customer's credit card statement?
no no
let me recreate the question
i have one platform User.
i have couple of Standard type connect users
under that Platform user
and there are lots of end user who will do the payment to connected account.
let suppose i have A ,B, C, D are the connect users
and X,Y are the third party users. who can do payments for A or B or C or D connect user
so for that end user i want create one Customer by using which ill save card details and reuse while doing payment
so will it work if i create customer for X and Y under Platform user
and pass that customer id to A or B or C or D connect user for doing payment
hope its clear now
the way you need to go about it is to create the Customer and save the PaymentMethod on the Platform account, then clone the PaymentMethod to the connected accounts : https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
cool
let me verify this link
can we keep this group on for some time
i want test this suggestion
need 10-15 min
@humble chasm
i have tried to implement the suggestion like below
RequestOptions requestOptions = stripeMapper.getRequestParameter("acct_1LACDaPOg4uILN6v");
CustomerCreateParams customerCreateParams = CustomerCreateParams.builder().setEmail("pravin@yopmail.com").build();
try {
Customer customer = Customer.create(customerCreateParams);
PaymentMethodCreateParams params =
PaymentMethodCreateParams.builder()
.setCustomer(customer.getId())
.setPaymentMethod("pm_1LBCu2POg4uILN6vPDFWL028")
.build();
PaymentMethod paymentMethod = PaymentMethod.create(params, requestOptions);
System.out.println(paymentMethod);
} catch (StripeException e) {
e.printStackTrace();
}
I am getting Below Error : No such PaymentMethod: 'pm_1LBCu2POg4uILN6vPDFWL028'; code: resource_missing; request-id: req_m3Zo87hf9ULYme
@humble chasm can you please suggest whats wrong in my implement
what is your platform account id?
acct_1G6RI8Alnu7mVSWl
the payment method should first be created on the platform. But the PaymentMethod was created on your connected account - acct_1LACDaPOg4uILN6v
ok
you mean
i need to create customer id and payment Methods on Platform Account
and then ill need to make use of it?
is it?
yes
let me try this
@humble chasm again i have tried below
========================
RequestOptions requestOptions = stripeMapper.getRequestParameter("acct_1LACDaPOg4uILN6v");
CustomerCreateParams customerCreateParams = CustomerCreateParams.builder().setName("Pravin").setEmail("pravinShin@yopmail.com").build();
try {
Customer customer = Customer.create(customerCreateParams);
System.out.println(customer.getId());
PaymentMethodCreateParams params =
PaymentMethodCreateParams.builder()
.setCustomer(customer.getId())
.setPaymentMethod("pm_1LBDVEAlnu7mVSWlEJa4djxS")
.build();
PaymentMethod paymentMethod = PaymentMethod.create(params, requestOptions);
System.out.println(paymentMethod.getId());
PaymentIntentCreateParams paramss =
PaymentIntentCreateParams.builder()
.setCurrency("usd")
.setAmount(1L)
.setPaymentMethod(paymentMethod.getId())
.setCustomer(customer.getId())
.setConfirm(true)
.setOffSession(true)
.build();
PaymentIntent.create(paramss, requestOptions);
=======================
i am getting below error
No such customer: 'cus_LszWFbRsH8bMUr'; code: resource_missing; request-id: req_2VexkA4OhS9KPk
@humble chasm can you please help me on this
the customer doesn't clone over also
so after you clone the PaymentMethod over, if you want to reuse that PaymentMethod on the connected account, you need to create a new customer on the connected account, then attach the cloned PaymentMethod to ut
oh
but i want that customer should be on platform account
Because i want keep single customer which will i use across all connected Account
that's not possible unfortunately, you're going to need to perform some kind of mapping in your own database to keep track of the customers probably