Skip to main content
POST
/
api
/
v1
/
treasury
/
webhook-endpoints
Create a treasury webhook endpoint (signing secret returned once)
curl --request POST \
  --url http://localhost:3001/api/v1/treasury/webhook-endpoints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/hooks/axra",
  "events": [
    "payment.completed",
    "payment.failed"
  ],
  "description": "<string>",
  "apiVersion": "<string>"
}
'
{
  "success": true,
  "data": {
    "endpoint": {
      "id": "<string>",
      "url": "<string>",
      "events": [
        "<string>"
      ],
      "status": "<string>",
      "signingSecretHint": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "businessId": {},
      "partnerId": {},
      "description": {},
      "apiVersion": {}
    },
    "signingSecret": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.useaxra.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string
required
Example:

"https://example.com/hooks/axra"

events
string[]
required

Event types to receive, or ["*"] for all supported events.

Example:
["payment.completed", "payment.failed"]
description
string
apiVersion
string

Optional API version pin for this endpoint

Response

Webhook endpoint created

success
boolean
required
Example:

true

data
object
required