#t9000
1 messages ยท Page 1 of 1 (latest)
Hi there!
Hello Soma, how are you doing? ๐
Are you using Stripe Connect, and the Seller has a Stripe account?
yes, express account
Currently I am doing like this
When I create a SessionService does it already starts to get money from the client?
So you are using a Checkout Session to create a Subscription, and you want to split the money between you (the paltform account) and the express account?
If so you need to create a regular Subscription with Checkout Session, and set the subscription_data.transfer_data parameter: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-transfer_data
Actually not exactly like this
I did a mistake in this code, I will remove the PaymentIntentData, I will not split the payment of the subscription with the express account
I will make 2 subscriptions: One between the express account and the end-client
And another between me and the express account
And you want to do this with a single Checkout Session?
Actually not
I will give you a more concrete example
maybe is easier to visualize like this
I have a platform account for online courses, where teachers (express accounts) will be able to sell their courses to end-users (students)
Each teacher will pay me montly 200 dollars to be able to use my platform
but their students will also pay them montly (subscription based) according to their course price
So in this case there are two checkouts in different moments
The teacher subscribing for my website and another of the student subscribing for the teachers course
Do you understand what I mean?
Sure! So:
- Create a regular Checkout Session to charge each teacher $200
- Create another regular Checkout Session for the students, but make sure to set
subscription_data.transfer_data
Ok, and in this scenario
Create another regular Checkout Session for the students, but make sure to set subscription_data.transfer_data
With the application fee of zero
right?
And this part in here:
SuccessUrl = "https://example.com/success.html?session_id={CHECKOUT_SESSION_ID}",
If you set it to zero, it means the connected account gets 0% and you (the platform) gets 100%.
CHECKOUT_SESSION_ID I should leave like this, right?
yes
Ah, so it should be always set like this:
ApplicationFeeAmount = (long)(coursePaymentInfo.CoursePriceMatrix.Price * 100) / 100,
ApplicationFeeAmount = (long)(coursePaymentInfo.CoursePriceMatrix.Price )
So ApplicationFeeAmount should always be set, and it should be set with the 100% of it's value in case I want to pay 100% for the teacher
No, it's a percentage, please read https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-transfer_data-amount_percent
If you want to send everything to the teacher, set it to 100.
ok, got it
And I recommend doing some tests in test mode to make sure everything works as expected. Note that you can use Test Clocks if needed: https://stripe.com/docs/billing/testing/test-clocks
and in this transaction do I pay any fee for stripe? I would like to transfer the fee payments from stripe for the teacher in this case, if there is any
Ah nice, thanks - I will take a look
and in this transaction do I pay any fee for stripe?
Yes for Destination Charges the platform pays the Stripe fees.
So you may want to not transfer 100%, but a little less to account for the Stripe fees.
yes, exactly
how much would be that fee?
I want the teacher to pay the stripe fee instead of me
It depends on many factors, so it's had to know in advance. You can learn more about our pricing here: http://stripe.com/pricing
is it possible to create product and price in one go?
I currently need to make two calls:
//TODO: Everything should be done in one single service
//Also this should be moved to
var product = await this.CreateProductAsync(coursePaymentInfo);
coursePaymentInfo.StripePaymentInfo.ProductId = product.Id;
var price = await this.CreatePriceAsync(coursePaymentInfo);
coursePaymentInfo.StripePaymentInfo.ProductId = price.Id;
await _userPaymentInfoRepository.SaveCoursePaymentInfoChanges(coursePaymentInfo);
it takes two calls