#jose_connect-pmc

1 messages · Page 1 of 1 (latest)

visual anchorBOT
#

đź‘‹ 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.

south raptor
#

Hi đź‘‹

When you say "managed" do you mean Express/Custom accounts?'

#

Or their equivalent controllerproperties?

deft thicket
#

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.

south raptor
#

Correct.

#

So the payments exist on your platform and use your platform's Connect payment method configuration

deft thicket
#

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.

south raptor
deft thicket
#

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?

south raptor
#

Are these payments using on_behalf_of to specify the Connected Account as the merchant of record?

deft thicket
#

Yes, that's correct.

south raptor
#

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?

deft thicket
#

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.

visual anchorBOT
#

jose-fragoso_connect-payment-method-config

deft thicket
#

Sorry, unfortunately I do not have a specific request Id or PI ID at the moment.

south raptor
#

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.

deft thicket
#

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?

south raptor
#

That depends, are you create Stripe elements before or after you create a Payment Intent?

deft thicket
#

Before, since I use Elements to show the available payment methods or to add a new payment method.

south raptor
#

Okay great, in that case you would specify it when you create stripe.elements. Our JS doc shows this parameter.

visual anchorBOT
deft thicket
#

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

south raptor
#

React Elements are just wrappers around Stripe.JS. So this would be a property in the options you pass into the Elements provider

indigo silo
#

đź‘‹ @deft thicket are you using on_behalf_of for your PaymentIntent creation?

deft thicket
#

Just for testing I put it as a hardcoded value, but it is throwing an error

indigo silo
#

(yeah this was the wrong advice sorry)

#

jose_connect-pmc

deft thicket
#

Yes we are using the on_behalf_of property

indigo silo
#

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

deft thicket
#

Are you saying I should be able to do this? It is saying that that property doesn't exist

indigo silo
#

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)

deft thicket
#

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?

indigo silo
#

can you ignore the type error and test it?

deft thicket
#

OMG yeah it works

#

Awesome, thanks a lot!

indigo silo
deft thicket
#

That makes sense, thanks a lot for all your help!

indigo silo
#

basically options on Elements is defined here and that points to the Stripe.js types and you are likely a couple versions behind

deft thicket
#

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

indigo silo
#

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

  1. For Custom accounts (what you call Managed) you set onBehalfOf as you use Destination Charges + on_behalf_of
  2. For Standard accounts you do not set onBehalfOf because you are instead setting the stripeAccount header 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

deft thicket
#

Yeah that make total sense, got it.

#

Very much appreciated!

indigo silo
#

sure thing!

deft thicket
#

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?