Webhooks

Obter a configuração de webhook da organização

webhook.events.organization_id é único, então existe no máximo uma configuração por organização. O secret não é retornado; apenas o indicador hasSecret.

GEThttps://api.monkeypay.app/api/v2/webhook/resource/organization-eventsBearer

Antes de chamar

  1. Chamada

    POSTEmitir token bearer

    /resource/auth/token

    Authorization: Bearer <seu-token>

  2. Você

    Tenha o organizationId

    O mesmo das suas carteiras

Esta chamada

GETListar eventos configurados

/webhook/resource/organization-events

Respostas possíveis

BearerRequer autenticação Bearer
x-customer-idstringcabeçalhoopcional

Opcional. A versão atual da API não lê nem grava este header: a organização é sempre deduzida do token bearer. Enviá-lo não altera o resultado da chamada.

<x-customer-id>
organizationIdstringqueryobrigatório

ID da organização (texto, ex. org_…)

Tamanho1 ≤ tamanho
<organizationId>
1{
2 "error": "<error>",
3 "success": true,
4 "message": "<message>",
5 "data": {
6 "id": "<id>",
7 "organizationId": "<organization-id>",
8 "type": "pix",
9 "pending": "<pending>",
10 "cancelled": "<cancelled>",
11 "failed": "<failed>",
12 "expired": "<expired>",
13 "created": "<created>",
14 "completed": "<completed>",
15 "processing": "<processing>",
16 "refunded": "<refunded>",
17 "awaitingPayment": "<awaiting-payment>",
18 "infraction": "<infraction>",
19 "hasSecret": true,
20 "maxRetries": 1,
21 "retryDelay": "<retry-delay>",
22 "createdAt": "<created-at>",
23 "updatedAt": "<updated-at>"
24 }
25}

Campos da resposta

errorobjectopcional
<error>
successbooleanopcional
<success>
messagestringopcional
<message>
dataobjectopcional

Configuração de webhook da organização. O `secret` nunca é retornado.

<data>
idstring (uuid)opcional
<id>
organizationIdstringopcional
<organizationId>
typestringopcional

valores: pixbilletted

<type>
pendingstringopcional
<pending>
cancelledstringopcional
<cancelled>
failedstringopcional
<failed>
expiredstringopcional
<expired>
createdstringopcional
<created>
completedstringopcional
<completed>
processingstringopcional
<processing>
refundedstringopcional
<refunded>
awaitingPaymentstringopcional
<awaitingPayment>
infractionstringopcional
<infraction>
hasSecretbooleanopcional

Indica se há secret configurado, sem expor o valor.

<hasSecret>
maxRetriesintegeropcional
<maxRetries>
retryDelayobjectopcional
<retryDelay>
createdAtstring (date-time)opcional
<createdAt>
updatedAtstring (date-time)opcional
<updatedAt>
Credenciais

Requisição

1curl --request GET \
2 --url 'https://api.monkeypay.app/api/v2/webhook/resource/organization-events' \
3 --header 'Content-Type: application/json' \
4 --header 'Authorization: Bearer <seu-token>'

Resposta

1{
2 "error": "<error>",
3 "success": true,
4 "message": "<message>",
5 "data": {
6 "id": "<id>",
7 "organizationId": "<organization-id>",
8 "type": "pix",
9 "pending": "<pending>",
10 "cancelled": "<cancelled>",
11 "failed": "<failed>",
12 "expired": "<expired>",
13 "created": "<created>",
14 "completed": "<completed>",
15 "processing": "<processing>",
16 "refunded": "<refunded>",
17 "awaitingPayment": "<awaiting-payment>",
18 "infraction": "<infraction>",
19 "hasSecret": true,
20 "maxRetries": 1,
21 "retryDelay": "<retry-delay>",
22 "createdAt": "<created-at>",
23 "updatedAt": "<updated-at>"
24 }
25}