#hargisss
1 messages · Page 1 of 1 (latest)
I've created a PHP checkout page which can be used to purchase a product on the main account... But when the price ID is for a product on a connected account, it doesn't work.
I get a 500 error or something like that.
There must be some way to specify that the payment will be transferred to the connected account which I am not finding.
something to do with payment_intent_data?
What is your goal here? Do you want the payment to be made directly on the connected account (also known as a direct charge)? Or do you want the payment to be made on the platform account and then transfer a portion to the connected account (known as a destination charge)?
I want most of the money to go to the connected account, but a fee to go to our main account.
Gotcha - so that would be a direct charge.
When you're creating the Checkout Session w/ the price ID (that belongs to a connected account) are you setting the Stripe-Account header to your connected account ID?
I had a feeling it was something like that! Do you know where I could find a good example code for a stripe account header?
All those brackets and parenthesis can make me slightly dizzy 🙂
I don't know of a good sample off the top of my head (you can try looking in https://github.com/stripe-samples) but we do have a good guide that can walk you through it as well (https://stripe.com/docs/connect/creating-a-payments-page?destination-or-direct=direct-charges) - make sure you have the "Direct charges" tab selected
Sure thing. That's all I need for now, thanks karbi.