#davidhusselmann
1 messages Β· Page 1 of 1 (latest)
Cloning a payment method can only be from platform to connected account, and not another way round
The only way is to ask customers to add payment method again on platform
Okay, so if I want to charge a card and set it up for future payments, but keep the connected account as the merchant of reference, how do I do that while keeping the card details in the platform account?
Are you using Checkout Session or Payment Intent?
Checkout Session.
(for the first charge+setup anyway) - PaymentIntent for rebilling
brb
For Checkout Session, you can set payment_intent_data.on_behalf_of (payment mode) or setup_intent_data.on_behalf_of (setup mode), so that connected account will be the merchant of record to the customers and the payment methods will be saved on the platform.
payment_intent_data.on_behalf_of: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-on_behalf_ofsetup_intent_data.on_behalf_of: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-setup_intent_data-on_behalf_of
What type of connected account and charges are you using?
- Connected account types: Standard, Express, Custom
- Charge types: Direct Charges, Destination Charges, Separate Charges & Transfers
using direct charges against standard connected accounts.
so if I use on_behalf_of that's not going to cause any other charges/fees right? Until now I was using the Stripe-Account header to do the direct charge against the connected account.
If the payment methods are saved on the platform, Direct Charges can't be used anymore.
Payment methods saved on the platform can only perform Destination Charges and Separate Charges & Transfers: https://stripe.com/docs/connect/charges
In addition,
- the products and customers will also have to be created on the platform instead of in connected accounts.
- Destination charges and Separate Charges & Transfers are only recommended for Express and Custom connected account, not Standard connected account
even if we clone payment methods into the connected accounts?
If the payment method is saved on the platform and clone it to connected account during payment with Direct Charges, then this will also work
aha, ok, that might be just the ticket. thanks
No problem! Happy to help π
I'm attempting that direct charge (with an application fee) against the connected account now, but it's giving me this:
| Can only apply an application_fee_amount when the PaymentIntent is attempting a direct payment (using an OAuth key or Stripe-Account header) or destination payment (using transfer_data[destination])
I'm doing the Session Create against the platform account, but setting the PaymentIntentData.OnBehalfOf to the connected account. Is this not supported? Seems to work fine when using it in setup mode?
Can you share the request ID (req_xxx) that returned you the error? Hereβs how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
that's interesting, the log is telling me a slightly different error - in any case, request id is this: req_AxB8WsKoMQ10Xh
π taking over here
acct_1MCCJ6DFj58ragMm is your platform account, correct?
I see it's not a Direct Charge. To create a Direct Charge via Checkout, you need to use the Stripe Account header: https://stripe.com/docs/connect/authentication#stripe-account-header
After the brackets for parameters, open another brackets: {stripe_account: '{{CONNECTED_ACCOUNT_ID}}'}
yep, I tried that and it works, but the problem is then the payment method (for off session billing) gets created in the connected account, not in the platform account where I'd like them
I think that's the misunderstanding here. Direct Charge mean the Charge "belongs" to the Connected Account, you are just the one who is making the request
When the Charge belongs to the Connected Account, associated Payment Method will also belongs to the Connected Account
So if I want to rebill the card from another connected account, how can I achieve that?
Situation is: golfer makes a booking at one club (one of our connected accounts) - they save their card for future billing. Then, another day, they make a booking at a different club (another one of our connected accounts), and they expect their card details to be in the system so we can just rebill them.
Um sorry for the back and forth, but it sounds like you need the other 2 flows:
- Create each club as an Express or Custom Account
- Use Destination Charge or Separate Charges And Transfers, with on_behalf_of. This way the Payment Method lives in Platform
The reason we wanted to use Direct + Standard is a liability thing - we don't want our platform account to be the merchant of record. There are also a lot of fees with the other flows I gather
on_behalf_of is the flag make the Connected Account the merchant of record
yep, okay, so that is what I've been trying to do - have a look at this:
on line 125 there, I set the OnBehalfOf to the connected account
the problem is, when I do this, I get that error that I contacted you about before - the one saying I can't use application_fee_amount
sure, just a moment
req_5qTusJa2WoJmPW - The 'payment_intent_data[transfer_data][destination]' param cannot be set to your own account.
even though I set on_behalf_of to the connected account
The error is pretty clear IMO, you need to set that payment_intent_data.transfer_data.destination to acct_1MDzDaKX8tvh29a8 too, not acct_1MCCJ6DFj58ragMm which is your own (platform) account
okay, but how can I charge a fee that is transferred to our platform account?
since application_fee doesn't work
How it doesn't work? Can you try application_fee_amount under payment_intent_data? https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, let me do another request now.
ok, adding application_fee_amount to the payment_intent_data gives me this error: Can only apply an application_fee_amount when the PaymentIntent is attempting a direct payment (using an OAuth key or Stripe-Account header) or destination payment (using transfer_data[destination]).
request req_lbpZeT1NBrgP2U
and annoyingly the logs show a different errorr
brb have to have dinner :/
Yes it requires to have the transfer_data block, like previous request req_5qTusJa2WoJmPW Why did you remove it π
apparently not though if you believe the error message:
You may not provide the application_fee_amount parameter and the transfer_data[amount] parameter simultaneously. They are mutually exclusive.
actually let me remove the transfer[amount]
okay, that API call worked (req_uOcpVs4l5QBjl2) - however it seems to have put it under our platform account (I'm not exactly sure how to tell who the merchant of record is) - isn't this the separate charges and transfers flow now?