#melvin_best-practices

1 messages · Page 1 of 1 (latest)

lime estuaryBOT
#

👋 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/1440359703132504187

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

short rampart
#

hi there, can you describe your use case a bit more? what kind of payment flow are you using? I'm not sure I understand why you need to clone the Payment Method to the Connected Account

urban night
#

Sure thing, there are 2 primary payment flows for my use case:

  1. users that create a business on my platform (they pay a $99 / month subscription to use my platform to create products and monetize) — I'll name this user type a BUSINESS_OWNER
  2. users that purchase products from merchants (Stripe Connect Accounts) using my platform — I'll name this user type a RANDOM_CONSUMER

A user can be just a BUSINESS_OWNER, just a RANDOM_CONSUMER, or both.

To enable easy checkout flow experiences with saved payment methods, I was going to follow the suggested approach of having a single "Platform Customer Vault" that saves a PaymentMethod on any user's first checkout, and re-uses it (by cloning the payment method, as decribed here: https://docs.stripe.com/connect/direct-charges-multiple-accounts#clone-and-create-direct-charges) to either (1) purchase more subscriptions to my monetization platform to create more businesses OR (2) purchase from other merchants without having to re-enter their payment details

However, the cloning seems to be directly built for use case 2: I as the platform create the Customer, then clone that Customer's payment method to Merchant's on my platform, so the Merchant can charge the PaymentMethod. It doesn't seem to be built for use case 1: where I as the Platform, would like to clone the Customer's PaymentMethod so that the Customer can create multiple Businesses (each with an Account V2 with it's own customer + merchant config) with their own subscriptions.

Save payment details on your platform and clone them to connected accounts for making direct charges.

#

TL;DR - I'm trying to use a single Customer object as the user's "wallet/vault", and re-use the PaymentMethod across Merchants and subsequent Account V2 businesses they create/subscribe for on my platform

So far, I've been able to clone the PaymentMethod from the Customer "Vault" (V1 Customer) to the Account V2 (the "business") with merchant + customer configs, but when I attempt to charge the Account V2 (the "business") a subscription, my platform cannot read the PaymentMethod, because the PaymentMethod seems to be scoped to the Account (hence my earlier statement that "cloning seems to be directly built for use case 2 — for Platforms to pass off Customer PaymentMethods to Merchants, not across Customers")

#

Sorry last constraint I forgot to mention:

A user should be able to create multiple businesses — this is why I haven't just used a single Account V2 to represent both the consumer and merchant/business (because each business requires a net-new Account V2)

The conflicting constraints are 1. ability to save and re-use payment methods for a single user while 2. enabling a single user to create multiple businesses

short rampart
#

do you have an example request ID for the error you are seeing? that might help me better understand how to resolve this

urban night
#

Yes

Latest attempt (cloned PM can't be found by platform subscription):
Request ID: req_OT43Kdb4brSVGi
Time: Nov 18, 2025, 3:06:55 PM
Error: "No such PaymentMethod: 'pm_1SUqUd3gidK7xZIAihLWcl3U'; It's possible this PaymentMethod exists on one of your connected accounts"
Param: default_payment_method

Previous attempt (with customer_account only):
Request ID: req_Np1YtW2J0Bnf7a
Time: Nov 18, 2025, 3:06:16 PM
Error: "You may only specify one of these parameters: customer, customer_account."
Param: customer

Earlier attempt (with customer: accountId):
Request ID: req_SOxH4phuAYXLTb
Time: Nov 18, 2025, 3:05:41 PM
Error: "No such customer: 'acct_1SUfkrKZ6sVoLVpB'"
Param: customer

SetupIntent Error (trying to attach cloned PM)
Request ID: req_r2qBleR1OW5PPm
Time: Nov 18, 2025, 3:06:55 PM
Error: "No such PaymentMethod: 'pm_1SUqUd3gidK7xZIA'; It's possible this PaymentMethod exists on one of your connected accounts"
Param: payment_method

The pattern is consistent in that any platform-level API call (no Stripe-Account header) can't see the cloned PM because it's scoped to the Account

short rampart