Skip to main content
POST
Registrar webhook

Authorizations

Authorization
string
header
required

A chave de API da conta, no formato sk_{modo}_{prefixo}.{segredo}.

Headers

Idempotency-Key
string
required

Chave única da operação. Obrigatória em toda requisição que altera dados; sem ela a resposta é 422 idempotency_key_required. Um reenvio com a mesma chave e o mesmo corpo repete a resposta guardada.

Maximum string length: 255

Body

application/json

Body of POST /v2/public/webhooks. Registration is the one write that reads active, so a caller can register a subscription muted; afterwards it flips through the toggle endpoint alone.

url
string<uri>
required
Maximum string length: 2048
token
string | null
Maximum string length: 255
product_id
integer | null
order_payment_approved
boolean
order_payment_pending
boolean
order_payment_failed
boolean
order_payment_refunded
boolean
order_subscription_approved
boolean
order_subscription_pending
boolean
order_subscription_failed
boolean
order_subscription_refunded
boolean
order_subscription_canceled
boolean
order_subscription_trial_started
boolean
active
boolean

Response

ApiWebhookResource

data
ApiWebhookResource · object
required