#Nadiya-Webhook
1 messages · Page 1 of 1 (latest)
Hi there, webhook events are compatible with Connect. However I don't see a direct connection between invoice and separate charges and transfers, can you elaborate more?
i've 3 webhooks,
- account.updated
- invoice.paid
- payment_intent.succeeded
from these 3 only account.updated is working, the remaining 2 not working.
so, i guess if its related to separate charges and transfer? because the subscription is created on platform account and transfer the amount later to connected account?
i mean it only listen for webhook for connected account
can you share with me the webhook endpoint ID?
we_1L2rfXA1EHHsA76ZINLqJYnu
Can you share with me an ID of a subscription that was created from platform?
in_1LA4yrA1EHHsA76ZYOBrkwHO
this was the invoice id that didn't trigger invoice.paid event
let me check for subscription id
OK. I know the reason
The subscription (sub_1L5MgLA1EHHsA76ZY08ahXkL) was created on the platform, not connected account, and that's why the associated events are not sent to the connect webhook endpoint.
And payment_intent.succeeded occurs for payments including direct and destination charges, not SCT.
is it possible to create the subscription on connected account, even if we use "Separate charges and transfer" ?
Yes you can create subscriptions on connected accounts.
Still I don't see a direct relationship between subscription and SCT.
sorry, do you have a link to create subscription on connected account?
Basically the idea is that you need to specify the connected account's ID in the Stripe-Account header.
thanks, let me take a look
sorry, if we create subscription on connected account, then isn't the payment goes to connected account?
yes you are right, the funds goes to the connected account
then, how do we supposed to perform SCT?
we want to transfer the amount to connected account, only after n days
Can you tell me more about your use case? as I still don't understand how you use subscription and SCT together.
they've a refund policy, and the number of days is chosen by the admin user ( >90 days) . so, in order to eliminate the risk of not having enough balance on connected account holder's while refund process, platform account holder plans to keep the amount on platform account. after the specified days have passed, it'll transfer the amount to connected account
I see. Thanks for the context.
If that's the case, you can still create subscriptions on platform, and create another Account webhook endpoint for the platform account to listen to event occurs within the account (i.e., subscriptions and invoices).
ok, but we normally specify the webhook secret on .env
is it possible to add more than one webhook secret to it?
For the same endpoint? I don't recommend you deploy two endpoints on the same server.
I'd recommend you to deploy the endpoints in two different servers with two different URLs
well.. we only have one site url.
do you think i should create another one, just to manage this webhook?
I don't recommend this.
what about this one?
Yes creating a separate webhook endpoint will be my suggestion.
can i use the endpoints like these?
https://landingsite.jp/stripe/webhook
and
https://landingsite.jp/stripe/webhook-account
Yes, this sounds like a nice solution!
thank you, let me try this