#bwurtz999
1 messages · Page 1 of 1 (latest)
Unfortunately not as far as I know. Invoices have to be tied to a specific Customer and there isn't a way to share it across Customers at the moment. I think you would have to do something where you wait to get confirmation on who is paying and then create an Invoice for the specific customer that wants to pay.
In theory, could I add the payment method to Customer A, submit payment, then delete the payment method from Customer A? This way Customer A does not get direct access to a payment method from Customer B?
Is this paid position?
I think you're on the wrong chat
it is just question. maybe i can help you.
@fallen sundial if you have a coding question please ask it in the main channel. We keep threads focused on the specific users and questions who opened them
@shadow pawn You could do that, but Customer A wouldn't have access to Customer B's payment methods in our API in the first place
Wouldn't I have to attach the PM to Customer A?
Oh I misunderstood your idea. So you are having the person from Customer B putting in their own card info or something
Yes
So yes in that case you would probably want to detatch the payment method so that it wouldn't be on the object for Customer A anymore.
hey @wraith geode I'm trying to do what Pompey described earlier but I'm getting an error
// clone the payment method to the invoice customer
$clonedPaymentMethod = $stripe->paymentMethods->create([
'customer' => $invoiceCustomer->stripe_id,
'payment_method' => $paymentMethod->payment_method_id,
]);
I get
In order to share a PaymentMethod, you must pass a connected account ID by using an OAuth key or the Stripe-Account header.
But I'm not using connected accounts
Hi 👋
Can you share the request ID for the request that generates that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_NPBRZWX0qUKlbZ
Does this mean I can't clone a payment method to a customer within the same account?
And I assume that also would apply within a connected account?
Right, just between accounts
which is why the API is expecting you to pass the ID of the account you want to clone to
And there's no way around this?
Well let's back up and can you tell me what you are trying to achieve?
Because around this: cloning PMs to different customers on the same account, no there isn't a way. But maybe we can get close
I create an invoice for Customer A. But I want Customer A or Customer B to be able to submit payment. I don't currently use connected accounts but I will integrate that soon. But, Customer A and Customer B could be part of the same account
Or from different accounts
Sounds like cloning would work if they were from different accounts. But not id they belong to the same account
I already have a process in place to create the invoices. And I'd like to avoid changing that, if possible
Customer A and Customer B just need to have their own payment methods
Yes, they do
But I get an error saying the invoice can't be paid because the payment method does not belong to Customer A
So I tried cloning it
But that doesn't work within the same account
Oh wait, right. The Invoice is for Customer A. Only Customer A and Customer A's payment method can be used.
Any ideas here that don't involve regenerating an invoice for Customer B?
Do Customer A and Customer B need to be separate? E.g. are they different employees of the same company and perhaps the Customer could represent the Company but you could attach metadata indicating which actual person paid?
Hmmm
Maybe
Appreciate the feedback
I'm gonna have to play around with this to figure out how I want it to work
But that's a good idea
Does the metadata show up on the invoice?
I can make a feature request for a more hierarchical customer object but that is a big engineering effort so unlikely to get actioned fast
Gotcha. I mean I don't think I even need all of that. Simply allowing a payment method to be copied to a customer within the same account would be sufficient
Does the metadata show up on the invoice?
Simply allowing a payment method to be copied to a customer within the same account would be sufficient
Right but the problem is I think that will just never happen.
Metadata does not show up on Invoices but you can customize individual invoices with Custom fields.
https://stripe.com/docs/api/invoices/update#update_invoice-custom_fields
I guess I don't know enough about how it works behind the scenes. Seems strange though. If a husband and wife both sign up for a service separately, but they share a credit card, the same payment method would be in there twice for two different customers. Both within the same account (hypothetical account - not my business model)
Custom fields looks like what I need
Okay but we won't do it because of the potential for accounts to clone payments to customers without consent
Collecting the card details a second time to create a new Payment Method record on the second customer gets us the consent to use the card
Got it
This has been very helpful, though. Thank you! I might have to change how my invoices are generated but you gave me some things to try so I might be able to avoid that
I'm glad talking it through has helped! Sometimes just bouncing ideas around can be very illuminating
Absolutely