#bwurtz999

1 messages · Page 1 of 1 (latest)

acoustic salmonBOT
vague breach
#

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.

shadow pawn
#

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?

fallen sundial
#

Is this paid position?

shadow pawn
fallen sundial
#

it is just question. maybe i can help you.

vague breach
#

@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

shadow pawn
vague breach
#

Oh I misunderstood your idea. So you are having the person from Customer B putting in their own card info or something

shadow pawn
#

Yes

vague breach
#

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.

shadow pawn
#

Great thank you

#

Just wanted to double check that would work

acoustic salmonBOT
shadow pawn
#

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

wraith geode
shadow pawn
#

req_NPBRZWX0qUKlbZ

#

Does this mean I can't clone a payment method to a customer within the same account?

wraith geode
#

Oh, yeah that isn't a thing you can do

#

Only between Connect Accounts

shadow pawn
#

And I assume that also would apply within a connected account?

wraith geode
#

Right, just between accounts

#

which is why the API is expecting you to pass the ID of the account you want to clone to

shadow pawn
#

And there's no way around this?

wraith geode
#

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

shadow pawn
#

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

wraith geode
#

Customer A and Customer B just need to have their own payment methods

shadow pawn
#

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

wraith geode
#

Oh wait, right. The Invoice is for Customer A. Only Customer A and Customer A's payment method can be used.

shadow pawn
#

Any ideas here that don't involve regenerating an invoice for Customer B?

wraith geode
#

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?

shadow pawn
#

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?

wraith geode
#

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

shadow pawn
#

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?

wraith geode
#

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.

shadow pawn
#

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

wraith geode
#

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

shadow pawn
#

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

wraith geode
#

I'm glad talking it through has helped! Sometimes just bouncing ideas around can be very illuminating

shadow pawn
#

Absolutely