Skip to main content
PATCH
/
webhook
/
config
Atualiza URL e/ou secret de webhook
curl --request PATCH \
  --url https://api.astronpay.co/api/v1/webhook/config \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-secret: <api-key>' \
  --data '
{
  "webhookUrl": "<string>",
  "webhookSecret": "<string>"
}
'
{
  "url": "https://meuapp.com/webhooks/astronpay",
  "secretConfigured": true,
  "lastRotatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required
x-api-secret
string
header
required

Body

application/json
webhookUrl
string<uri> | null

URL pública HTTPS para receber eventos. Passe null para remover.

webhookSecret
string | null

Secret para assinar os payloads (HMAC-SHA256). Passe null para remover.

Minimum string length: 8

Response

Atualizado

url
string<uri>
Example:

"https://meuapp.com/webhooks/astronpay"

secretConfigured
boolean
Example:

true

lastRotatedAt
string<date-time> | null