Skip to main content
POST
https://api.sandbox.wepayout.com.br
/
v2
/
register
/
companies
/
webhooks
Setup
curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "<string>",
  "url": "<string>"
}
'
{
  "event": "onboarding",
  "url": "https://my-url.requestcatcher.com/test"
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Setup

The system allows the registration of webhook URLs to receive automatic notifications about relevant events. Webhook URL: HTTPS address where the events will be delivered.
Supported event: onboarding
Notification format: JSON payload sent via HTTP request
Request method: All notifications will be sent exclusively using the POST method

Request Body

event
string
required
Type of event that will trigger the webhook. Currently, only the onboarding event is supported.Example: onboarding
url
string
required
Endpoint URL that will receive the webhook notifications for the selected event.URL characters: a-z, A-Z charactersExample: https://my-url.com/test

Response

event
string
Type of event that will trigger the webhook. Currently, only the onboarding event is supported.Example: onboarding
url
string
Endpoint URL that was registered to receive webhook notifications.Example: https://my-url.requestcatcher.com/test

Request Example

curl --request POST \
  --url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --data '{
    "event": "onboarding",
    "url": "https://my-url.requestcatcher.com/test"
  }'
{
  "event": "onboarding",
  "url": "https://my-url.requestcatcher.com/test"
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Webhook Payload

When an onboarding event occurs, a POST request will be sent to your webhook URL:
{
  "event": "onboarding",
  "event_id": "evt_1234567890",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "account_id": "acc_1234567890",
    "status": "approved",
    "previous_status": "under_review",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
Your webhook endpoint must return a 200 OK status code to acknowledge receipt. If the endpoint fails or returns an error, the system will retry delivery.