#theahmadzai - recurring payments
1 messages · Page 1 of 1 (latest)
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
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
Then you can use either. Whichever works better with your flow
with invoices am I able to show stripe line items?
like what is he charged for the detailed overview
Yes, the line items that you add to the invoice will show up on the invoice page
Can you please send me link to some tutorial on invocing programtically from official stripe if there is any
I don't see line items property here https://stripe.com/docs/api/invoices/create
and also I'm receving staging webhooks into my production
Looking in to docs for you. Are those webhook events connect related?
Can you send me the ID of the event? (evt_123)
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or you can do it the other way around: create the invoice with a pending_invoice_items_behavior of exclude and then creating the invoice items directly on the invoice https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sure let me send it to u
this event is from dev it hit staging "evt_1KbiZRQkDpfjUhmGqaiQnZfu",
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.
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
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.
We note this behavior in our docs here: https://stripe.com/docs/connect/webhooks
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
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.
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
No signature is based on Webhook endpoint
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
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.
oh but what's the point of sendingg test events to livemode and how can i filter them out or ignore them
Connect events will contain an account property and a livemode property that you can use to filter
See our docs that I shared above: https://stripe.com/docs/connect/webhooks