Webhooks Samples
Testing Connectivity
When you use the Test Connectivity button, a successful test will generate a 200 message in the back office UI.

{
"mode": "test",
"eventDate": "2017-09-06T19:54:05Z",
"eventType": "test",
"attemptNumber": 1
}
Testing Webhooks
When you use the Send Test Webhook button, you can select the event type that you want to simulate. The following test response is for a completed payment.
{
"resourceId": "068c506c-82e7-4578-8ea2-3d141430b69d",
"mode": "test",
"eventDate": "2017-09-07T13:27:32Z",
"eventType": "AP_PAYMENT_COMPLETED",
"attemptNumber": 1,
"payload": {
"id": "068c506c-82e7-4578-8ea2-3d141430b69d",
"accountId": "YOUR_ACCOUNT_ID",
"merchantRefNum": "YOUR_REFERENCE_NUMBER",
"paymentType": "PAYSAFECARD",
"amount": 1000,
"currencyCode": "EUR",
"status": "COMPLETED",
"txnTime": "2017-09-07T13:27:32Z"
},
"links": [{
"rel": "payment",
"href": "http://api.test.paysafe.com/alternatepayments/v1/accounts/YOUR_ACCOUNT_ID/payments/068c506c-82e7-4578-8ea2-3d141430b69d"
}]
}
The following table describes the elements in the webhook response:
Element | Type | Constraints | Required | Description |
---|---|---|---|---|
id | String | Max = 36 | Yes | This is the webhook event ID. |
resourceId | String | Max = 255 | Yes | The ID of the resource that has changed. |
mode | String | live / test | Yes |
|
eventDate | dateTime | UTC formatted date | Yes | This is the date and time the event occurred. |
eventType | String | Max = 255 | Yes | This is the type of event. |
attemptNumber | Integer | Yes | This is the number of times this event has been sent. | |
links | Complex | Yes | This is a link to the resource. | |
payload | Complex | No | The payload varies depending on the eventType. |
Was this page helpful?
On this Page