#michael_elements-saved

1 messages ยท Page 1 of 1 (latest)

drifting sageBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1278772157681242133

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

normal maple
#

michael_elements-saved

abstract flame
#

Thanks for the info. Can I ask you another question?

#

I would like to save payment information for a customer, but I need to associate the customer with a particular merchant. Is this possible? Or is the customer only able to be associated with the stripe api key?

normal maple
#

Can you clarify what "with a particular merchant" means exactly?

abstract flame
#

The people who use our product are 'merchants', but those merchants have 'patients', so I need to save payment information for a patient who is associated with a merchant.

#

When a merchant is processing a payment for a patient, the merchant should only see payment information for their own patients

#

The merchant should not see payment information for patients that are not their patients

normal maple
#

Okay so you are a platform and you use our Stripe Connect product and those "merchants" are connected accounts?

abstract flame
#

correct

normal maple
#

Okay, what type of integration do you use

  1. Which connected account type: Custom, Express or Standard
  2. Which flow of funds: Destination Charges, Direct Charges or Separate Charges and Transfers
abstract flame
#
  1. Standard connect.
    Double checking on #2
normal maple
#

Likely Direct Charges since that's the canonical flow for that type of connected account

#

Assuming it's Direct Charges: Where do you want to save the Customer information?
Do you want to "aggregate them all" on your platform account first so that in the future you can charge them for other merchants?
Or do you want them at the merchant (connected account) level instead because really they are a customer of that merchant. If they were to also be a customer of another merchant they would enter card details again

abstract flame
#

correct, it is direct charges.

#

I would prefer the second option. if a patient visited a different merchant on our platform, they would need to re-enter their payment method

normal maple
#

I'm glad you said that because the other approach is near impossible to build today ๐Ÿ˜‚

#

So what you want is fairly straightforward overall. You have a connected account acct_12345 (merchant A) and you have a Customer cus_12345 who is John Doe paying merchant A for something
What you do is use Direct Charges to create a PaymentIntent directly on the connected account today to accept a $100 payment.

What you can do is create a Customer that represents John Doe for merchant A and you get that cus_12345 and you store that in your database "oh John Doe for merchant A is cus_12345". And that Customer can have saved PaymentMethods that you can then display in PaymentElement when they come back a week later to pay merchant A again (using the feature I mentioned above)

drifting sageBOT
abstract flame
#

how is the customer associated with the merchant?

StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";

var options = new CustomerCreateOptions
{
Name = "Jenny Rosen",
Email = "jennyrosen@example.com",
};
var service = new CustomerService();
service.Create(options);

https://docs.stripe.com/payments/save-during-payment

Could the merchant id be used in the customer create options? for example?

normal maple
#

I have to run and my colleague @true jolt is taking over.

But really you, as a platform using Direct Charges, are likely already using the Stripe-Account header feature documented at https://stripe.com/docs/connect/authentication#stripe-account-header which lets you make an API Request on a connected account. That's how you must be creating the PaymentIntent today.

And all the calls would work the same way. So the Customer should be created on the connected account with that same option

abstract flame
#

I see, thanks!