#pkxd_webhooks

1 messages · Page 1 of 1 (latest)

velvet compassBOT
#

đź‘‹ 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/1389248987856375849

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

polar forge
#

Hi there đź‘‹ did you get this working in testmode before trying in livemode?

Can you help me understand how you built your flow to work? The Event ID that you linked is for a application_fee.created Event, are you trying to find the balance transaction details of the payment that led to the creation of that application fee?

final idol
#

Hi toby,

I am trying to get the net, fee, and gross values for a payment by retrieving the balance transaction associated with the charge (using the charge’s balance_transaction field), right after receiving a payment_intent.succeeded or charge.succeeded webhook. I use the Stripe API to fetch the balance transaction details, as those values are not directly available on the payment or charge object. Is this the correct approach, or should I be using a different event or method to obtain these details?

polar forge
#

That's the right approach.

final idol
#

btw it wasn't working in live mode nor live mode

polar forge
#

What isn't? What are you doing, what do you see when you try that?

final idol
#

What isn’t working is that when I try to retrieve the balance transaction details (net, fee, gross) in either test mode or live mode, the fields are missing or not showing up, even though I’m using the balance_transaction ID from the charge and fetching the details via the Stripe API. The behavior is the same in both modes – either the fields are empty or I can’t find the balance transaction at all.

polar forge
polar forge
#

If something doesn't work in testmode, that is a good indication that it won't work in livemode either, and it's typically worth troubleshooting the problem at that point.

#

I'm not spotting any GET requests that were made to try to retrieve a Balance Transaction.

final idol
#

even when the Stripe API response for a balance transaction contains fields like net, fee, etc. (see the example below), these values are still missing (not saved) in my own database for this transaction. I expect my system to store these values after receiving the relevant webhook/event, but in these cases, my database doesn’t have them.

Here is the response I get from Stripe:

{
"id": "txn_1RfiNDDKowFg7axKBXwV5eAi",
"object": "balance_transaction",
"amount": 1520,
"available_on": 1751846400,
"balance_type": "payments",
"created": 1751292472,
"currency": "czk",
"description": "Application fee from application for petr.259@seznam.cz (acct_1RfhRWRaTc75vIIi)",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"net": 1520,
"reporting_category": "platform_earning",
"source": "fee_1RfiNARaTc75vIIiLQlMfEJP",
"status": "pending",
"type": "application_fee"
}

#

But in my database, these fields are missing for this transaction.
Could you please help me figure out why this happens, and what is the correct way to make sure my database is updated correctly?

Thank you!

polar forge
#

That's the Balance Transaction for the Application Fee, not for the payment that led to that Application Fee being created.

#

The Application Fee is not relevant to what you want to do here, unless I'm misunderstanding your goal. The Application Fee represents the fee that your Platform retains as part of this transaction, however it doesn't relate to the Stripe fees. The Stripe fee details are shown on the Balance Transaction for the payment/charge.

final idol
polar forge
#

What am I checking there?

final idol
#

Could you please check why the balance_transaction is missing (null), even though the payment was successful and the Application Fee and Transfer were created?

polar forge