After responding to the Webhook request as outlined in Arming an endpoint, the endpoint needs to ensure the Webhooks are processed. The push request will always be an array of Webhooks (even for a single Webhook). A Webhook is the combination of Endpoint and Event. The same Event will be repeated in a Webhook for each registered Endpoint. The content of a push request looks like this:
{
"Code":"ABC123",
"DateCreated":"2023-05-15T17:03:00+10:00",
"DateUpdated":"2023-05-15T17:03:00+10:00",
"Event":"customer.created",
"Status":"accepted",
"ResourceCode":"DEF123",
"ResourceUrl":"https://api.payadvantage.com.au/v3/customers/DEF123",
"MerchantCode":"PA00001",
"EndpointCode":"XYZ456",
"EndpointUrl":"https://yourdomain.com/payadvantage_webhooks",
},
...
Code
is the unique identifier for that particular Webhook.
Event
represents the event type that occurred. Please refer to Webhooks for all possible values.
Status
is one of the following values: pending
, sending
, or accepted
.
ResourceCode
is the unique identifier for the resource affected by the Event.
ResourceUrl
is the Url to use to GET the item that was affected. Please be aware that this will be null for deleted
events.
MerchantCode
identifies which Pay Advantage account this resource belongs to.
EndpointCode
is the unique identifier of the Endpoint this Webhook is for.
Comments
0 comments
Please sign in to leave a comment.