Skip to main content
POST
/
v1
/
notifications
/
simulate-event
Simulate webhook event
curl --request POST \
  --url https://api-m.sandbox.paypal.com/v1/notifications/simulate-event \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "event_type": "PAYMENT.AUTHORIZATION.CREATED"
}'
{
  "id": "<string>",
  "create_time": "2023-11-07T05:31:56Z",
  "resource_type": "<string>",
  "event_version": "<string>",
  "event_type": "<string>",
  "summary": "<string>",
  "resource_version": "<string>",
  "resource": {},
  "links": [
    {
      "href": "<string>",
      "rel": "<string>",
      "method": "GET"
    }
  ]
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Body

application/json

Simulates a mock webhook event.

event_type
string
required

The event name. Specify one of the subscribed events. For each request, provide only one event.

Maximum length: 50
webhook_id
string

The ID of the webhook. If omitted, the URL is required.

Maximum length: 50
url
string<uri>

The URL for the webhook endpoint. If omitted, the webhook ID is required.

Maximum length: 2048
resource_version
string

The identifier for event type ex: 1.0/2.0 etc.

Response

A successful request returns the HTTP 202 Accepted status code and a JSON response body that shows details for the mock event.

A webhook event notification.

id
string

The ID of the webhook event notification.

create_time
string<date-time>

The date and time when the webhook event notification was created, in Internet date and time format.

resource_type
string

The name of the resource related to the webhook notification event.

event_version
string
deprecated

The event version in the webhook notification.

event_type
string

The event that triggered the webhook event notification.

summary
string

A summary description for the event notification.

resource_version
string

The resource version in the webhook notification.

resource
object

The resource that triggered the webhook event notification.

An array of request-related HATEOAS links.

I