Get Started

Event Types & Payloads

An event payload will be defined as combination of common and resource specific fields.

Common fields are:

{
"id":
"unique event id, like 1234-1234-234-5345345",
"createOnUtc":“UTC time stamp when event has occured,
like 2015-12-22T22:21:53Z",
"eventType":"one of the defined event types,
like payment.statusChanged",
"summary":"A payment status has been changed ",
"resource":
{
// - resource specific fields allowing to identify a resource
and it's state - might not be present
}
}

Currently supported event types:

  1. ping
  2. payment.statusChanged
  3. payment.notAccepted
  4. order.statusChanged
  5. order.invoiceGenerated
  6. payment.updateFailed

Tables - Event Payload with 5 Supported Event Types

1. ping

Happens every time a ping resource is requested by a Partner
{
"id":
"1234-1234-234-5345345",
"createOnUtc": “2015-12-22T22:21:53Z",
"eventType": "ping",
"summary": "Ping request was successful"
}

2. payment.statusChanged

happens when an accepted payment's status has been changed
{
"id":
"1234-1234-234-5345346", "createOnUtc": “2015-12-22T22:21:54Z",
"eventType": "payment.statusChanged","summary": "A payment status has been changed",
"resource":
{
//same payment payload as received by GETting a collection of payments
"id":
"<paymentId>","customerID":"<customerId>"
"partnerReference", "<partner generated reference>",
"status":"<paymentStatus>","errorCode":"<errorCode>:<error message>",
// <supplied for payments in Rejected or Returned status>
"createdOn":"<timestamp>","lastUpdatedOn":"<timestamp>"
}
}

3. payment.notAccepted

happens when a submitted payment was not accepted due to validation or other errors
{
"id":
"1234-1234-234-5345347","createOnUtc":“2015-12-22T22:21:57Z",
"eventType":"payment.notAccepted",
"summary":"A payment is not accepted for processing",
"resource":
[
{
//same payment payload as received by GETting a collection of payments
"id":"<paymentId>","customerID":"<customerId>",
//if submitted for a payment
"status":"<paymentStatus>",
"errorCode":"<errorCode>:<error message>"
}
]
}

4. order.statusChanged

happens every time order status has changed
{
"id":
"1234-1234-234-5345348","createOnUtc": “2015-12-22T22:21:58Z",
"eventType": "order.statusChanged","summary":"An orderstatus has been changed",
"resource":
{
//same order payload as received by GETting a collection of orders
"id":"<orderId>","customerId":"<customerId>",
"partnerReference", "<partner generated reference>",
“status”: “<paymentStatus>”,"createdOn":"<timestamp>",
"lastUpdatedOn":"<timestamp>",
"settlementCurrency":"<order settlement currency>",
}
}

5. order.invoiceGenerated

happens every time order's invoice file has been generated
{
"id":
"1234-1234-234-5345348","createOnUtc":“2015-12-22T22:21:58Z",
"eventType":"order.invoiceGenerated",
"summary":"Invoice has been generated.",
"resource":
{
//"orderIds":"<orderId[,orderId]>",
//comma separated list of orders included into invoice
"invoiceFileName":"<invoice_file_name>"
}
}

6. payment.updateFailed

happens when an requested update failed for already accepted payment
{
"id":
"712babb4-3b2f-e611-864f-005056ab44d1","createOnUtc":"2016-06-10T18:55:06Z",
"eventType":"payment.updateFailed",
"summary":"A payment update has failed.",
"resource":
{
"id":"<paymentId>","customerId":"<customerId>",
"status":"<paymentStatus>","errorCode":"<errorCode>:<error message>",
// <supplied for payments in Rejected or Returned status
"lastUpdatedOn":"<timestamp>","updateErrorCode":"<errorCode>:<error message>",
// specific to failed update errorCode
"updateErrorOn":"<timestamp>",
}
}

Retrieving Events as separate resource

Resource Template
/events/{id}
HttpMethod GET
Description Used to retrieve published event
Input

{}

Output
200 OK
{
<specific to event payload - same as was published>
}
404 Not Found 
- if event does not exist