#achadee_connect-terminal-subscriptions
1 messages ยท Page 1 of 1 (latest)
๐ 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/1216875692004737044
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
If I'm reading this correctly you want to trigger a Hardware order https://docs.stripe.com/api/terminal/hardware_orders/object that then assigns the hardware to a Connected Account and you want to offer this as a Subscription. Is that correct?
yes thats correct
Okay. Now the Terminal Hardware order must be a single purchase, so is that something you would want to do on your Platform account and then transfer ownership of the device to the Connect Account?
yes, thats what i was hoping to do
What kind of Connect integration were you planning on using? Standard, Express, Custom?
right now everyone is setup on express
Okay so one thing to be aware of is, with Express, you should be creating all the payments directly on your platform using Destination Charges: https://docs.stripe.com/connect/destination-charges
thats just with the terminals yeah?
because with invoices, ive just been providing the connected account and application fee
Do you mean you have been using Direct Charges? Using the stripe-account header?
That is certainly possible but it is not recommended
for example this is my checkout code:
const session = await stripe.checkout.sessions.create({
return_url: ${process.env.NEXT_PUBLIC_CHECKOUT_URL || ''}/${checkout.workplace.subdomain}/${checkout.token}/complete,
client_reference_id: checkout.id,
customer_email: checkout.email || undefined,
ui_mode: 'embedded',
payment_intent_data: {
application_fee_amount: fee,
},
invoice_creation: {
enabled: true
},
line_items: checkout.lines.map((line) => {
return {
price_data: {
currency: checkout.currency,
product_data: {
name: line.description || 'Unknown Line',
},
unit_amount: line.price.amount,
},
quantity: line.quantity,
}
}),
mode: 'payment',
expand: ['line_items.data.price.product'],
},
{
stripeAccount: checkout.workplace.stripeAccountId
});
Yeah this bit right here
stripeAccount: checkout.workplace.stripeAccountId
means you are using Direct Charges. This is only reommended for Standard Accouts
ah ok
so this would be the correct code:
const session = await stripe.checkout.sessions.create({
return_url: ${process.env.NEXT_PUBLIC_CHECKOUT_URL || ''}/${checkout.workplace.subdomain}/${checkout.token}/complete,
client_reference_id: checkout.id,
customer_email: checkout.email || undefined,
ui_mode: 'embedded',
payment_intent_data: {
transfer_data: {
destination: checkout.workplace.stripeAccountId,
},
},
invoice_creation: {
enabled: true
},
line_items: checkout.lines.map((line) => {
return {
price_data: {
currency: checkout.currency,
product_data: {
name: line.description || 'Unknown Line',
},
unit_amount: line.price.amount,
},
quantity: line.quantity,
}
}),
mode: 'payment',
expand: ['line_items.data.price.product'],
});
No, no it would not
You should review the doc on destination charges I shared earlier
how do I ensure the invoices are created on the connected accounts?
not on the primary?
I will assume you mean "platform". For Express accounts we recommend all objects are created on the Platform account. This is because Express accounts have limited access to the Dashboard. This means they do not have the tools to respond to things like disputes.
ah right
Ok reading up on the docs now, thats for your input
thanks *
ill need to make a few changes, but I gather from our conversation today:
all terminals are registered to the "platform" account and use the destination attrubite to flow the charges?
which technically means all "locations", also belong to the platform account
Correct
However, to get back to your earlier business model, you can create a Customer object for each of your Connected Accounts and create Subscriptions for the use of the Terminal hardware. That would just be the normal Subscription payment flow with a Price you create to charge for the use of the Terminal devices.
oh I thought you guys would create one automattically with the connected account?
ok good to note
Yeah, there's a clear differentiation there. Customer objects represent entities you can charge for things. Connected Accounts represent merchants that are linked to your Platform account. But it's not uncommon to have Connected Accounts also have Customer objects on the Platform Account in case the Platform wants to charge the Connected Accounts for services other than processing payments.
ok thanks for your help, youve saved me alot of headache
Sure thing! Happy to shed what ๐ก I can ๐