#dtops_webhooks

1 messages · Page 1 of 1 (latest)

hoary impBOT
#

👋 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/1262708788142800946

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

olive echo
#

hi! not really a webhook for this no, but there's an available_on on the BalanceTransaction so you know when the payment will be available.

lavish carbon
#

@olive echo Okay, I can see the property in the API, I guess I can use a combination of available_on and status

`"3": {
"id"
:
"txn_3PcrxpGQsGT4rfE81qqXpbrj"

Copy
,
"object"
:
"balance_transaction"
,
"amount"
:
5000
,
"available_on"
:
1721606400
,
"created"
:
1721061686
,
"currency"
:
"gbp"
,
"description"
:
"Subscribed to author 1"
,
"exchange_rate"
:
null
,
"fee"
:
183
,
"fee_details": [
"0"
:
{… 5 items}
,
],
"net"
:
4817
,
"reporting_category"
:
"charge"
,
"source"
:
"ch_3PcrxpGQsGT4rfE81wZJuyym"

Copy
,
"status"
:
"pending"
,
"type"
:
"charge"
,
},`

olive echo
#

pretty much yes. Every day, you can also listen for the balance.available event that is sent whenever your balance increases. At that point, you can check which charges have been released. The best solution is to look into your database for each charge supposed to be released that day and then retrieve the corresponding BalanceTransaction via the API to confirm that the status property to confirm that the funds have been made available.