Webhook events will be sent over HTTPS to endpoints configured in "My Company" -> "PayKeeper API".
Authentication
You can verify that PayKeeper is the one sending you webhook events by validating the "Authorization" HTTP header. The header value will be "Basic <auth_string>". To verify auth_string, decode using base64. The resulting string will be “[organization_id]:[webhook_secret]”. Your webhook secret is available on your organization's PayKeeper API page.
Topics
| Topic | Description |
|---|---|
project.funding.changed | Project funding pending, added, or returned |
project.schedule.changed | Project schedule milestone step changed |
project.disbursements.changed | Project money disbursed |
project.changed | Project changed |
project.active-status.changed | Project active status changed ("CANCELLED", "UNCANCELLED", "SETTLED") |
Event Structure
HTTP requests will be made to configured endpoints utilizing HTTP Headers and request Body. Data will be sent in JSON and will include the topic, event information, and link to associated structure.
Event Data Structure
Events sent from PayKeeper will be in JSON and will include the topic, projectId, data and link, which will include a link to the updated information.
{
"topic": "project.funding.changed",
"projectId": "0920f13b-b426-4b2b-97d9-45ab3e5f6eff",
"data": {
"projectId": "0920f13b-b426-4b2b-97d9-45ab3e5f6eff",
"amountPending": -2000,
"amount": 2000
},
"link": "https://app-dev.paykeeper.com/api/public/projects/0920f13b-b426-4b2b-97d9-45ab3e5f6eff/funding"
}Schemas by topic
project.changed
projectId- id of the affected projectpreviousContractAmount- Contract amount of the project prior to this change eventcontractAmount- Contract amount of the project after this change event
project.funding.changed
projectId- id of the affected projectamountPending- changed amount of pending project funds. Can be negativeamount- changed amount of posted project funds. Can be negative
project.schedule.changed
projectId- id of the affected projectmilestoneid- id of the changed milestonename- name of the changed milestone
step- Project schedule milestone step changed
project.disbursements.changed
projectId- id of the affected projectdisbursementId- id of the disbursementreferenceCode- reference code of the disbursementamount- amount of the disbursementorganizationid- id of the organization the disbursement was made toname- name of the organization the disbursement was made to
project.active-status.changed
projectId- id of the affected projectstatus- updated status of the project. ("CANCELLED", "UNCANCELLED", "SETTLED")
Retries
- If your endpoint takes longer than 5 seconds to respond, we will time out and retry the request
- Events associated with HTTP status codes 409, 429, and 5xx are retried.
- Events associated with HTTP status codes 1xx, 2xx, 3xx, and 4xx (excluding 409 & 429) are not retried.
- Timeouts or non-success response codes will result in us retrying delivery with an exponential backoff, with a maximum of 185 tries over the first 24 hours.
