Ir para o conteúdo
Infopago Developersv1.0.3
Referência da APIAPI de ContasWebhooks

Criar webhook para cobranças (invoices).

Cadastra a URL que recebe eventos de cobrança: `invoice.registered`, `invoice.paid`, `invoice.settled`, `invoice.cancelled` e `invoice.overdue`.

POST
/webhooks/invoice

Autorização

OAuth2 webhook.write
headerAuthorizationBearer <token>

Escopo: webhook.write

Corpo da requisição

application/json
  1. body
uri*string
Formatouri
email?string

E-mail utilizado para realizar as notificações de erros de envio de webhooks

method?string
Padrão"POST"
Value in"POST""GET""PUT"
enabled*boolean
Padrãotrue
pauseOnFail?boolean
Padrãotrue
headers?

Corpo da resposta

Criado

application/json
  1. response
id?string
Formatouuid
type?WebhookType
Value in"TRANSFER""RECEIVE""REFUND""CASHOUT""INFRACTION""INVOICE""CRYPTO"
uri?string
Formatouri
enabled?boolean

Callbacks

Exemplo de requisição
curl -X POST 'https://cashout.infopago.com.br/api/v2/webhooks/invoice' \  -H 'Content-Type: application/json' \  -d '{  "uri": "http://example.com",  "enabled": true}'
Exemplo de resposta
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "INVOICE",  "uri": "https://example.com/webhook",  "enabled": true}