The webhook endpoints API allows you to create and view your webhook endpoints. These are URLs that Pin Payments requests when events occur on your account.
Creates a new webhook endpoint and returns its details.
url | The destination URL of the webhook endpoint. |
---|
curl https://test-api.pinpayments.com/1/webhook_endpoints -u your-secret-api-key: \
-d "url=https://example.org/webhooks/"
{
"response": {
"token": "whe_4I23afROQsdI5Csjo",
"key": "vSeHhoa0amv38tF3pXDtPA",
"url": "https://example.org/webhooks/",
"created_at": "2023-09-22T15:08:54Z",
"updated_at": "2023-09-22T15:08:54Z"
}
}
422 | invalid_resource |
{...}
|
---|---|---|
403 | limit_reached |
{...}
|
Returns a paginated list of all webhook endpoints.
curl https://test-api.pinpayments.com/1/webhook_endpoints -u your-secret-api-key:
{
"response": [
{
"token": "whe_4I23afROQsdI5Csjo",
"key": "vSeHhoa0amv38tF3pXDtPA",
"url": "https://example.org/webhooks/",
"created_at": "2023-09-22T15:08:54Z",
"updated_at": "2023-09-22T15:08:54Z"
}
],
"pagination": {
"count": 1,
"per_page": 25,
"current": 1
}
}
Returns the details of the specified webhook endpoint.
curl https://test-api.pinpayments.com/1/webhook_endpoints/whe_4I23afROQsdI5Csjo -u your-secret-api-key:
{
"response": {
"token": "whe_4I23afROQsdI5Csjo",
"key": "vSeHhoa0amv38tF3pXDtPA",
"url": "https://example.org/webhooks/",
"created_at": "2023-09-22T15:08:54Z",
"updated_at": "2023-09-22T15:08:54Z"
}
}
404 | resource_not_found |
{...}
|
---|
Deletes a webhook endpoint and all of its webhook requests. You will not be able to recover them.
curl https://test-api.pinpayments.com/1/webhook_endpoints/whe_4I23afROQsdI5Csjo -u your-secret-api-key: -X DELETE
404 | resource_not_found |
{...}
|
---|