#syoxiss_webhooks

1 messages ยท Page 1 of 1 (latest)

amber zephyrBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1217499730750472192

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

covert flumeBOT
autumn pewter
#

Hi ๐Ÿ‘‹

Can you provide just the event ID (evt_)? I cannot use dashboard links. Also the second ID your provided is for a Webhook endpoint, not an event.

supple inlet
#

Here's the event ID for live: evt_3Ot2ry4WiaEK29cC1Rn0xeB9
Here's the test one: evt_3OtNJc4Mwn5afyL31N82L85h

autumn pewter
#

The difference here is that the Test event has the Charges parameter expanded. In Live we are only returning the Charge ID. However, you can extract all this information by using the Charge ID to retrieve the Charge object and expand the balance_transaction to see the fee details.

supple inlet
#

oh, so I just need to get the chargeId and use a stripe API to get the charge ID and then use that to get the stipe fee?

autumn pewter
supple inlet
#

can you give me an example of that API call with charge and an expand balance_transaction? While I got an idea of how it works based on the examples given in the docs, it's a little different with an actual nodejs call

autumn pewter
#

You can change the language in the code snippets to NodeJS

#

In the sceond code block, there's a drop down menu in the header and you can select Node. When I do, I get this code snippet

const session = await stripe.checkout.sessions.retrieve(
  '{{SESSION_ID}}',
  {
    expand: ['customer'],
  }
);

The {{SESSION_ID}} is a placeholder for some actual ID you would get from your integration

supple inlet
#

okay thanks!

autumn pewter
#

Sure thing! We try to make sure all code examples are availabe in all 7 server-side languages we support so if you are ever looking at a code snippet and it's not in NodeJS, check for the header to change it to Node