#some1ataplace

1 messages ยท Page 1 of 1 (latest)

tropic saddleBOT
twilit prawn
#

You can not pass payment_intent_data in subscription mode.

rain seal
#

There is subscription_data on that endpoint

twilit prawn
#

checkout_session = stripe.checkout.Session.create(
success_url=request.build_absolute_uri(reverse('memberships:stripe_success')) + '?session_id={CHECKOUT_SESSION_ID}',
cancel_url=request.build_absolute_uri(reverse('memberships:stripe_cancelled')),
payment_method_types=['card'],
customer=customer_id,
allow_promotion_codes=True,
line_items=[{
'price':settings.STRIPE_MONTHLY_PRICE_ID,
'quantity':1,
}],
payment_intent_data={
'transfer_data': {
'destination': 'acct_1Nu7mfIsMFguiimW',
},
},
)

tropic saddleBOT
rain seal
twilit prawn
#

What am I looking for in that link?

rain seal
twilit prawn
#

Like this?

        checkout_session = stripe.checkout.Session.create(
            success_url=request.build_absolute_uri(reverse('memberships:stripe_success')) + '?session_id={CHECKOUT_SESSION_ID}',
            cancel_url=request.build_absolute_uri(reverse('memberships:stripe_cancelled')),
            payment_method_types=['card'],
            customer=customer_id, 
            allow_promotion_codes=True,
            line_items=[{
                'price':settings.STRIPE_MONTHLY_PRICE_ID,
                'quantity':1,
            }],
            subscription_data.application_fee_percent = 100,

        )
#

And how do I connect that to the connect account?

pulsar quarry
#

๐Ÿ‘‹ taking over

#

just to clarify, when you say you want to reward your connected account

what does that mean?

#

what's the usecase here?

#

are you trying to transfer specific amount of funds to that account?

#

aside from what they get from the subscription signup?

#

also, are you creating these subscriptions on the platform or the connected accounts?

twilit prawn
#

the connected account is an affiliate marketer for my site. When they share an affiliate link, and the viewer of that link makes an account and buys a subscription, I want to reward the affiliate marketer.

#

Platform subscriptions

#

So if the monthly platform subscription is $50 USD I want to give a good amount of % to the affiliate marketer. Maybe 50% or $25 reward.

pulsar quarry
twilit prawn
#

Yes that looks right. Wondering though how I would do this in python?

#

subscription_data={
#"items": [{"plan": "YOUR_PLAN_ID"}],
"transfer_data": {
"destination": 'acct_1Nu7mfIsMFguiimW',
"amount_percent": 100,
},
},

#

I don't neeed the items?

pulsar quarry
#

not in subscriptions_data field, no since you're setting line items on the checkout session

twilit prawn
#

Cool i will leave it commented out. But does everything else look good?

pulsar quarry
#

Try it out

#

looks good but running the code would confirm if it works

twilit prawn
#

I never used connect before. How do I tell it works? Would I see the $25 anywhere?

pulsar quarry
#

on the connected account

#

payments view

twilit prawn
#

So right now it shows the full amount $50 but later today it will show $25?

#

Do I have to log in as the connected account to receive the $25?

pulsar quarry
#

No, it happens automatically on subscription creation

twilit prawn
#

hmm even logged in on the eexpress account I see $50

#

The subscription was created

pulsar quarry
twilit prawn
#

req_02qtApelCinEcX

pulsar quarry
#

meaning you transferred 100% of the amount

twilit prawn
#

oh boy thanks i must have not saved the new 2500 when trying it out

#

So now am I done? The platform doesn't have to do anything now? Stripe will transfer it to the user?

#

I just have to worry about negative balances? Would I have to do any kind of funding into a balance that the platform account controls?

pulsar quarry
#

So now am I done? The platform doesn't have to do anything now? Stripe will transfer it to the user?
Yup

twilit prawn
#

Oh wow you are saying yes to both points?

pulsar quarry
#

I just have to worry about negative balances? Would I have to do any kind of funding into a balance that the platform account controls?
Not really as you're transferring the amount you receive from the subscriptions

#

So if you're not making any explicit transfers

#

you should have enough balance

twilit prawn
#

Excellent. Where would I see on the dashboard this balance?

pulsar quarry
twilit prawn
#

Cool. So every stripe platform business needs to add a bank account in order to receive payments from platform subscriptions and also see balances according to connected accounts transfers? I as the platform could always add more money to this balance?

How long do connected accounts usually need to wait for this transfer to make it into their account? Always at the end of the day?

pulsar quarry
#

So every stripe platform business needs to add a bank account in order to receive payments from platform subscriptions and also see balances according to connected accounts transfers?
Not sure I fully understand following:
"also see balances according to connected accounts transfers?"
can you elaborate?

How long do connected accounts usually need to wait for this transfer to make it into their account? Always at the end of the day?
It depends on their payout schedule

twilit prawn
#

There is a platform balance? If somehow the connected accounts go negative, I would see the deductions in that balance page from my platform balance?

#

From my understanding there is a platform balance and a connected account balance

pulsar quarry
twilit prawn
#

ah yes i seem to be confused about the both of them

pulsar quarry
#

Our team won't know a ton about what dashboard can show etc since we primarily focus on the API integrations but I think it should show any deductions that occur due to negative balances

twilit prawn
#

perfect thank you for all the help hanzo. I am happy now I havee got connect to work and now i have a better idea how it all works. much appreciated!

pulsar quarry
#

No worries ๐Ÿ™‚ happy to help