#jose_connect-pmc
1 messages · Page 1 of 1 (latest)
đź‘‹ 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/1440051454751805613
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi đź‘‹
When you say "managed" do you mean Express/Custom accounts?'
Or their equivalent controllerproperties?
By “managed” I mean a Custom connected account where my platform is the controller. The account doesn’t use its own keys — all API calls are done through my platform.
Correct.
So the payments exist on your platform and use your platform's Connect payment method configuration
Correct. I’m trying to figure out if there’s any supported way to let a Custom connected account use its own payment method configuration (which has Afterpay/Clearpay enabled) while still having the actual charges created on my platform account since I cannot enable afterpay_clearpay for my platform account due to B2B restrictions.
What about the Connect payment method configurations (of which you can create multiple)? Not the one that applies to your account but to Connected accounts? https://docs.stripe.com/connect/multiple-payment-method-configurations
Thanks for pointing me toward the Payment Method Configurations feature.
Here’s my architecture:
I’m running payments through my platform account (for managed/Custom connected accounts) — the PaymentIntent is always created on the platform, so funds route to my account but we use the on_behalf_of property that points to my customer's account id (managed/Custom connected account).
Some connected accounts are eligible for Afterpay/Clearpay, but my platform account is not allowed to enable that method (due to B2B classification).
I want to allow those eligible connected accounts to offer Afterpay/Clearpay only for their buyers, but still use my platform for payment processing.
Given the documentation on multiple payment method configurations:
Is there a way to apply a “child” configuration (with Afterpay enabled) on the platform account’s payment flow such that the PaymentIntent still lives on the platform account but inherits the connected account’s configuration?
Or does a child configuration apply only when the payment is created on the connected account?
Essentially: can I use a child-PMC but keep the charge on the platform’s account and still show/allow Afterpay/Clearpay?
Are these payments using on_behalf_of to specify the Connected Account as the merchant of record?
Yes, that's correct.
Do you have a request ID or Payment Intent ID where you expected Afterpay to be available but it wasn't?
And you are aware that it's a separate Payment Method Configuration for Connect Account and your Platform, right?
Yes I am aware of that. My platform's PMC does not allow afterpay because it is inelegible, the Connect Account has a different PMC with afterpay enabled. But since I am initializing Stripe Elements with my platform account (I have not specified the stripeAccount property) because I want all charged to be processed through my account.
jose-fragoso_connect-payment-method-config
Sorry, unfortunately I do not have a specific request Id or PI ID at the moment.
Sorry but no, there is still a bit I think you are missing
the Connect Account has a different PMC
I'm not talking about this PMC
There is a separate PMC on your platform account that only applies to the connected Accounts. You should be able to use that.
Ah I see what you mean now, sorry for the confusion. I do have it and it is supposed to have afterpay_clearpay enabled.
How can I specify this PMC to use when loading Elements?
That depends, are you create Stripe elements before or after you create a Payment Intent?
Before, since I use Elements to show the available payment methods or to add a new payment method.
Okay great, in that case you would specify it when you create stripe.elements. Our JS doc shows this parameter.
Do you happen to have the link for react?
I can't find the react version of that doc
Also, I don't see that parameter being listed in the Elements option prop
React Elements are just wrappers around Stripe.JS. So this would be a property in the options you pass into the Elements provider
đź‘‹ @deft thicket are you using on_behalf_of for your PaymentIntent creation?
Just for testing I put it as a hardcoded value, but it is throwing an error
Yes we are using the on_behalf_of property
Cool, that's your problem: you forgot to set that on Elements initialization (instead of the paymentMethodConfiguration)
If you set it then we will use that PMC that only exists in the Dashboard that applies to both Destination Charges with OBO and Direct Charges
Are you saying I should be able to do this? It is saying that that property doesn't exist
you are mixing up snake case and camel case. It's onBehalfOf
also you should never be passing payment_method_types at all if you are trying to use our "Dynamic Payment Methods" feature (but I think it's ignored because you also used snake case there)
I did try camel case but it is still marking as non-existent prop, and yeah it makes sense to me the thing about payment_method_types
I am using this version of react stripe elements: "@types/react-stripe-elements": "^6.0.5"
Is it not supported in this version?
can you ignore the type error and test it?
There are 2 SDKs, the React one and the Stripe.js one and you use both so for types you need to make sure you are on more recent types https://github.com/stripe/stripe-js
That makes sense, thanks a lot for all your help!
basically options on Elements is defined here and that points to the Stripe.js types and you are likely a couple versions behind
Cool, and one more/last question...If I pass onBehalfOf for non-managed accounts, would it cause any issues?
Or should I instead check if it is managed I pass that prop, if it is non-managed, don't pass it
Just for clarity: Managed accounts is quite an old name. Those got renamed to Custom in 2017. I recommend saying "Custom accounts" always.
And yes it will cause issues so
- For Custom accounts (what you call Managed) you set
onBehalfOfas you use Destination Charges +on_behalf_of - For Standard accounts you do not set
onBehalfOfbecause you are instead setting thestripeAccountheader on Stripe.js initialization which is due to you using Direct Charges
Does that make sense? Basically you want you client-side code to match what you do server-side on the PaymentIntent
sure thing!
I think it is safe to close this thread. Is there anything you would like me to do in order to set this as resolved?