Skip to main content

Webhooks

A webhook is a way for an app to provide other applications with real-time information. Palenca delivers data programmatically to keep you updated on your user's connections.

Webhooks enable us to send notifications to your app as a JSON payload, so you can use them to automatically trigger processes in your backend systems.

For example, Palenca will send you a webhook when one of your users successfully connects to Uber (or any other platform), or when we refresh one of your users profile looking for updates on the user’s employment information.

How to use Palenca webhooks

  1. Be sure to have an endpoint on your server that can listen to POST requests.
  2. Create a webhook with our API, providing your local server url where you want to receive the notifications and with the field "is_sandbox": True. You can find more information about how to do this here.
  3. Test that your webhook endpoint is working properly using the Palenca sandbox environment.
  4. Once you validated that your webhook is working properly, you can create a webhook with the field "is_sandbox": False.
  5. You are ready to go. Palenca will start sending you webhooks in the production environment.

Response

The response you'll get from Palenca will include some information about the user or account and the webhook_action to be notified. You can read more about these actions here.

The following is an example of a webhook payload:

{
"user_id": "f2a6d844-22ee-455d-9d2c-deb413d78b74",
"account_id": "d86efb5b-4bbf-4f28-8576-9612430bc5e2",
"country": "mx",
"platform": "uber",
"webhook_action": "account.created"
}

Payload

ParameterDescriptionTypeExample
user_idThe ID of the useruuid054d0a9d-38ec-40cb-a31c-09b483242e4a
account_idAccount IDuuid628cdf56-95f1-4397-a154-281112781240 or null
countryThe user's account countrystringmx or null
platformThe user's account platformstringimss or null
webhook_actionType of notification sentstraccount.created

Retries

If we do not get a 200 or 201 status code within 30 seconds of the first POST request to the webhook URL, we will make up to three more calls (stopping if we get a 200 or 201), waiting a few minutes in between each of them.

Data Retrieval Times

DataTime FrameExample Time
ProfileUnder 30 seconds12:00:30 PM
Employment InfoUnder 30 seconds12:00:30 PM
1 Month of EarningsUnder 1 minute12:01:00 PM
2 Month of EarningsUnder 2 minutes12:02:00 PM
3 Month of EarningsUnder 3 minutes12:03:00 PM
Rest of EarningsUnder 30 seconds> 12:03:00 PM