Can we covert the guest customer in stripe to real customer? - stripe-payments

I have strange situation ... I want to convert my guest customers in my stripe account to the real customers ... Real customers have the customerID but the guest customer doesn’t have the customer ID ... Is there any way to convert them.

Guest customers are only available in Stripe Dashboard so there is not a way to manipulate them via the API and there is not an option to convert them to a customer object via the Dashboard.
The recommendation is to create real customers moving forward. Although there is not a way to associate previous payments to real customers, you’d be able to track payments that belong to the same customer and create recurring charges. To achieve this, you’d pass the customer object on the PaymentIntent creation or if you’re using Checkout, you’d pass it when creating the Checkout Session.

Related

Stripe Payment Links with Customer Id

I am currently building an application where we want to user Stripe Payment links rather then building our own version of UI to support the same functionality. However I notice that Stripe Payment Links create a new customer every single time. Is there a way to attach my customer id to the payment link so that a new customer is not created when they attempt to buy more then one product? I would prefer not to have to have a single user have multiple customer ids inside of my database.
Thanks!
Payment Links are not specific to a Customer record. The documentation does include examples of how you might append data to them to aid in reconciling payments to a specific individual.
If you want to make use of the Stripe hosted UI while still assigning specific Customer records then I would recommend making use of Stripe Checkout.

Stripe - Any way to migrate off older Charges API (Subscriptions) without creating a Customer beforehand?

I am updating my billing page which used Stripe JS V2 tokens and the Charges API (Subscriptions). The new(er) Payment Element looks slick from a future proofing standpoint, but am I understanding it correctly that the Customer object must be created prior to populating the payment form?
I only create the Customer once the payment token is obtained and a user has a clear intent to purchase after evaluating during a trial period. Otherwise my Stripe Dashboard is overrun with "empty" trial users that never sign up (I only have around a 10% signup rate from account creation). I guess this is mostly just a personal peeve, but I also just don't like to share user data and figured this way I would only be sharing with a third party once they become actual customers of mine.
Since a Subscription cannot be created without providing a Customer as part of the required parameters, am I stuck using the Card Element and the older Charges API if I don't create a Customer for every user in my system?
You really should just create a Customer up front. It will be required if you want to use trials with Subscriptions and will be cleaner in the long run.
For a workaround, which I would not overall recommend, you could use a SetupIntent with Payment Element to collect the customer's payment method without actually creating a Customer object. Then you can later create the Customer object and attach the PaymentMethod that was previously collected and then create the Subscription.

Stripe Connect - share customers without payment method

I am currently hitting a roadblock implementing Stripe Connect into our platform. We want to allow multiple connected accounts to use our platform to sell some sort of tickets. For this we wanted to use Standard accounts with Direct Charges (since we want to take a cut and also not have to deal with refunds/disputes etc.).
On our end the end-user has to either select or create a customer on our platform (created in our Stripe account) and then provide their payment method details through Stripe Elements. The documentation states that you need to create a PaymentIntent for the connected account, but this is not possible while also supplying the previously saved customer (because the customer only exists on our platform).
Now another documentation outlines that it is possible to share customers between connected accounts. The issue with this is that for this step you already seem to need a payment method attached to the customer:
If your platform uses the Payment Methods API, you must create a PaymentMethod from that customer.
The linked documentation outlines how to clone payment methods of customers between linked accounts, but this once again assumes that we already have a confirmed/attached payment method.
So my question is: How can we allow customers to be shared between all connected accounts without having to supply a payment method first? After the first payment (and if the customer chooses to do so) we want to save (and later clone if necessary) this payment method for future payments on all connected accounts.
For normal payments you can create a PaymentIntent with a customer but without a payment method and only supply the latter on the client (in our case stripe.js)
Since you're using Standard accounts, you have to use Direct Charges when accepting payments on behalf of that connected account. This means that the PaymentIntent has to live on the connected account, alongside the Customer and the PaymentMethod if any.
If you want to re-use the payment method details for other accounts in the future though, the PaymentMethod itself and its associated Customer has to live on the platform account.
Unfortunately, there's no way to "clone" a PaymentMethod from the connected account back to the platform today. This means that you have to change your integration logic slightly and approach the overall flow differently.
The idea is that you first need to collect payment method details in the platform. Since you're not taking an immediate payment during that step, you want to use the SetupIntent API. This is the flow documented here that will let you create the SetupIntent on the platform and collect card details securely client-side.
Once you have this information, you will now have a Customer cus_A in the platform, with the PaymentMethod pm_123 attached to it. That is the first step of the flow.
Now, you want to accept a payment on the connected account. So you first need to clone the PaymentMethod on that account as documented here. That will give you a brand new PaymentMethod pm_xyz that lives on that connected account. You can then use that PaymentMethod to confirm a new PaymentIntent on that connected account and passing payment_method: 'pm_xyz' to attempt to charge that saved card.
Note that it is possible this requires a "next action" such as doing 3D Secure as it's on a different account which could come with different restrictions.
In the future, if that customer comes back and wants to pay another connected account, you'd do a new clone of the PaymentMethod on that account and a new PaymentIntent for that cloned card and you can repeat it each time they pay a new business.
It can seem a bit convoluted at first, but once you grasp the flow of all the objects it does make sense overall!

Stripe - How To Add Product Behalf Of Connected Account?

Normally when using stripe I can create products and add tax rates, shipping rates. After the payment I can create invoice. I want to do the same thing when using connected account. In my app I want users to create stores and this stores' product will be saved to their connected stripe account. Stores in my app will set shipping rates and tax rates. Then I can automatically invoice the payment. That's what I want to do. Is it possible to do with stripe? Because I read the documents but I could not understand the invoicing on connected accounts. Because when invoicing the connected account only customer id required. That confused me.
Invoice connected accounts document
I'm not sure you'll be able to do things exactly how you describe but I'd suggest you reach out to Support to talk about this further: https://support.stripe.com/contact/email

Stripe - How to get purchaser's information for a charge with Connect (Express)?

I've set up a test charge using stripe.Charge.create() and it is working, i.e. I can see the dollar amounts processed in the Connect test dashboard. It appears to be money going from the tok_visa to a dummy Stripe account I set up.
charge = stripe.Charge.create(
amount=1000,
currency="usd",
source="tok_visa",
application_fee_amount=123,
transfer_data={
"destination": "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
}
)
For a marketplace type platform, I need to be able to send funds from the purchasing user to the selling user, however.
Would I need to get the purchaser's account (or some other object?) to use as the "source" in the charge?
How do I get that to put it into the "source" field?
I feel a little lost in Stripe's docs, so I could be missing something. Thank you for any tips.
I need to be able to send funds from the purchasing user to the
selling user, however
If by 'purchasing user' you mean a cardholder customer of your marketplace, this is exactly what you have. tok_visa here represents a credit card, that you accept through a payment page.
If instead you mean, the purchasing user is another connected account in the marketplace, you can either :
use an account debit to debit one account, and then transfer to
another.
collect a card from users when they sign up and create a
Customer object for them. You can then charge that customer as needed
like in your example code. You need to maintain a link in your system that
'customer cus_xxx is also my marketplace user acct_xxx'

Resources