#theahmadzai - recurring payments

1 messages · Page 1 of 1 (latest)

lament junco
#

Invoices have payment intents, so you can either send the link to the invoice's hosted URL or you can have your own custom form that uses the Invoice's payment intent

lofty basin
#

I'm not using stripe subscription or products just using stripe to collect payments I have my own small subscription infrastructure to collect payments currently I use paymentIntents but the drawback is I cannot put line items into it the receipt says just 1 item

#

I am charging them automatically with paymentIntents

#

I just came across invoices seems a good feature and I want to know where can I utilize it better

lament junco
#

Then you can use either. Whichever works better with your flow

lofty basin
#

with invoices am I able to show stripe line items?

#

like what is he charged for the detailed overview

lament junco
#

Yes, the line items that you add to the invoice will show up on the invoice page

lofty basin
#

Can you please send me link to some tutorial on invocing programtically from official stripe if there is any

#

and also I'm receving staging webhooks into my production

lament junco
#

Looking in to docs for you. Are those webhook events connect related?

lofty basin
#

yes

#

I'm using stripe connect

#

no the webhook is checkout session success

lament junco
#

Can you send me the ID of the event? (evt_123)

lament junco
#

Unfortunately I am not finding a doc specifically on creating an Invoice like this. Essentially you will want to create the invoice items on the account and then create the invoice. Creating the invoice will pull in pending invoice items https://stripe.com/docs/api/invoices/create

lofty basin
#

sure let me send it to u

#

this event is from dev it hit staging "evt_1KbiZRQkDpfjUhmGqaiQnZfu",

soft yew
#

Hi @lofty basin, I'm stepping in here for @lament junco as he needs to step away.

#

Looks like your staging endpoint is returning a 500 for that event.

#

You will need to debug why it is not responding to the event when the endpoint is hit, but I can confirm that the event is being sent to that staging endpoint.

lofty basin
#

but that even was from dev how it went to staging

#

also

#

cs_test_b1mBUMRSPx3EhuMFfmzxaBX5icTGM3YrMg6ab0PpALwb2VhPy5gaUFXlSo this session was created and completed it in stagingg and I see it's log in production bugsnag

soft yew
#

You are using Connect. With Connect your Platform endpoint in livemode will both receive live and test mode events from Connected Accounts. This is expected behavior.

lofty basin
#

Ow thanks for clearifying so I'l receive checkout session events to both my production and test envs right

#

I thought if event is created with test key it goes to test env

soft yew
#

The event lives on the test environment, but production Connect Webhook endpoints have a special behavior where they will receive both live and test events from your Connected Accounts.

lofty basin
#

but even if they receive it every env has it's own secret key and due to that signature is different they cannot work right

soft yew
#

No signature is based on Webhook endpoint

lofty basin
#

if on dev someone checkouts from store id 2 and if store id 2 exist on production it will crate subscription for store id 2 in prod

#

let's assume all parameters match like same store same user exist on both env

#

theoratically

soft yew
#

Okay let's back up.

#

You have store 1 which is a livemode Connected Account. Then you have store 2 which is a testmode Connected Account.

#

If you use your Platform Livemode API key to create a Checkout Session for Store 1 then there will be a production (livemode) Session created on Store 1 and your webhook endpoint will receive those livemode events.

#

If you use your Platform Testmode API key to create a Checkout Session for Store 2 then that dev (testmode) Checkout Session will be created on Store 2 but your Platform Production endpoint will ALSO receive those events.

#

The Checkout Session itself is determined by the API key you use to create it. However, your Production Webhook Endpoint will receive the events regardless.

lofty basin
#

oh but what's the point of sendingg test events to livemode and how can i filter them out or ignore them

soft yew
#

Connect events will contain an account property and a livemode property that you can use to filter

lofty basin
#

THANK YOU SO MUCH

#

my bugsnag was spammed

#

I think I know how to fix it now