#justintime42
1 messages · Page 1 of 1 (latest)
No problem at all
OK, based on the request (https://dashboard.stripe.com/test/logs/req_Z0LNgTUlt99W5H) this invoice was created on your account (platform) , not the connected account, and that's why you don't see it in the connected account
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Also, since the connected account is a Standard account, you can just create the invoice on the connected account directly by specifying a Stripe-Account header in the request.
By specifying a stripe_account, you are telling Stripe that you want to make an API call on behalf of a connected account. You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)
So I should be making the invoice like so:
await stripe.invoices.create({
customer: customer.stripeID,
due_date: dueDate,
pending_invoice_items_behavior: "include",
collection_method: 'send_invoice',
},
{
stripeAccount: stripeAccount
})
Is that right? If so what is the difference between passing the stripeAccount header versus using the on_behalf_of field?
You don't need to set on_behalf_of in this case since the invoice is directly created on the account
oh I think I see. so I can use that stripeAccount header to make any API call on the connected account? Like creating customers, invoices, etc?
Yes you are right
https://stripe.com/docs/connect/destination-charges#settlement-merchant if you want to learn more about on_behalf_of
Ok, and just to clarify, if I do the stripeAccount header, I don't need to do on_behalf_of, because the connected account will be the settlement merchant since I created the invoice directly on their account.
Yes! If you have Stripe-Account header, on_behalf_of is not needed
ok awesome. thanks so much for all the help!