#MarkoBoras

1 messages · Page 1 of 1 (latest)

cedar flintBOT
vague lynx
#

Hello! It would depend on how you're facilitating the one-time payments: are you adding them to an existing invoice from the subscription, or are they entirely separate?

sonic saffron
#

entirely separate

#

can I have 2 entirely different webhooks?

vague lynx
#

Sure, that could work if you prefer that

#

But this will work fine with a single webhook

sonic saffron
#

is something more recommended?

#

I am also using stripe checkout for subscription

#

and I'll use stripe checkout also for one-time payments

#

how can I then create 2 different endpoints for webhook

#

what is the difference in types

stoic drum
#

hey , jumping in.

so there are a number of ways to differenciate one-time and recurring payments.

#

for example, a recurring payment is always an Invoice, and connected to a Subscription. So if you are looking at a PaymentIntent object(from a payment_intent.succeeded event), the invoice field on the object is set; and if you retrieve/expand the Invoice, the subscription is field is set.

#

and similiarly if a payment was one-time, either it has no Invoice, or the Invoice was not associated with a Subscription.

#

so there's various things you can check so it all depends on exactly your setup, hopefully that helps unblock you to do some testing/validation.

sonic saffron
#

that's it