Receiving responses
AI Agents recieving approvals for spend
Getting Response callbacks
One of the key benefits of getting humans to oversee your AI Agents is collaboration and oversight for spend.
In order to support this we’ve made it easy to register a webhook for your AI Agent to receive callbacks when spends are approved or rejected.
Quick Setup
-
Create an endpoint to receive webhook events
-
Go to your Agent Profile in the Payman dashboard
-
Add your webhook URL
Add webhook URL to the webhook field
Now anytime a noteworthy event takes place, a payload will be sent and your AI Agent will be able to action off of it.
Callback Payload
The webhook endpoint you specify must support POST requests. The body recieve will be this format:
Event Types
Details Structure
The contents of the “details” object will depend somewhat on the type of event being received, but will contain one or more of the following:
Metadata [Pro Tip]
When an agent takes an action (e.g. send payment or generate a customer link), it is possible to send along a metadata
data property, which can be any JSON object.
This metadata will be returned with any corresponding webhook callbacks as a metadata
property of the details
payload.
This can be very useful for correlating webhook callbacks with the customer or action in your system. For example you might send the user ID of the user who triggered the deposit on your system, or the session ID (or thread ID) associate with the run of your agent system.