Event

What is an event?

An Event will contain a full copy of the resource under the resource key. The resource object will contain an object key which will be the name of the Paystand resource. A full spec can be found under that resource's API docs. For example, if the object is payment you can find the full specs under Payment resource.

Any changes to properties in the following Paystand resources will cause an event to be emitted to a registered client system: Customer, Payment, Refund, Dispute, Withdrawal

Event webhook can be configured on a per-customer basis by updating the Customer's settings.

Paystand highly recommends that customers verify that any received HTTP POST event callback originated at Paystand by retrieving the event back from its systems by using the supplied id.

{
  "resource": {
    "object": "payment",
    "id": "3kramjln354zmhcl17bfft6j",
    "amount": "15.00",
    "currency": "USD",
    "externalId": "pay01",
    "payerId": "h2ficw8bkirmlece404ulf14",
    "payer": {...},
    "fees": [{...}],
    "holds": [{...}],
    "sourceId": "31e48fdzmvidlxmdqr23r1op",
    "sourceType": "Card",
    "ownerId": "0c7c56vbmzcwiw94wdl9k1ec",
    "status": "posted",
    "created": "2016-09-09T18:37:51.000Z",
    "lastUpdated": "2016-09-09T18:37:54.000Z",
  },
  "diff": {
    "previous": {
      "object": "payment",
      "id": "3kramjln354zmhcl17bfft6j",
      "amount": "15.00",
      "currency": "USD",
      "externalId": "pay01",
      "payerId": "h2ficw8bkirmlece404ulf14",
      "payer": {},
      "fees": [{..}],
      "holds": [{..}],
      "sourceId": "31e48fdzmvidlxmdqr23r1op",
      "sourceType": "Card",
      "ownerId": "0c7c56vbmzcwiw94wdl9k1ec",
      "status": "processing",
      "created": "2016-09-09T18:37:51.000Z",
      "lastUpdated": "2016-09-09T18:37:52.000Z",
      "customValues": []
    },
    "changes": {
      "holds": [{..}],
      "status": "posted",
      "lastUpdated": "2016-09-09T18:37:54.000Z"
    }
  },
  "urls": [
    "http://requestb.in/w1oosfw1"
  ],
  "created": "2016-09-09T18:37:55.000Z",
  "lastUpdated": "2016-09-09T18:37:55.000Z",
  "status": "active",
  "id": "g6lq7pdu0mjqhsmwidxu5xmu",
  "object": "event"
}

Parameter

Description

id

The unique identifier for the event.

object

Will have value "event" indicating that the object is an event response.

resource

Embedded resource object. This is the current resource after any updates.

resource.object

This value will determine the resource that this event is for.
For example: payment will represent a Payment resource.
A full spec of attributes can be found under the corresponding resources page.

diff.previous

The previous state of the resource before the updates.

diff.changes

An object containing the key-value pairs of parameters that have changed during the resource update.

urls

An array of urls the event is registered to be sent to.

created

The date the event was created.

lastUpdated

The date the event was last updated.