Events API

Request and view events that have taken place within a specific timeframe.

With the Events API, you can:

To view a list of events you can subscribe to, please see our event types page.

Get an event 

Get an event using the event's ID.

The GET request

Use the details below to set up your request.

Endpoints

GEThttps://api.checkout.com/events/{eventId}
GEThttps://api.sandbox.checkout.com/events/{eventId}

Header parameters

HeaderValue

Authorization

REQUIRED

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type

REQUIRED

application/json

Path parameters

PathDescription

eventId

REQUIRED

The event ID.

The GET response

Below is an example of a successful response.

{
  "id": "evt_az5sblvku4ge3dwpztvyizgcau",
  "type": "payment_approved",
  "version": "2.0",
  "created_on": "2018-10-29T16:59:20Z",
  "data": {
    "id": "pay_y3oqhf46pyzuxjbcn2giaqnb44",
    "action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44",
    "amount": 6540,
    "currency": "GBP",
    "approved": true,
    "status": "Authorized",
    "auth_code": "643381",
    "response_code": "10000",
    "response_summary": "Approved",
    "3ds": {
      "downgraded": true,
      "enrolled": "N"
    },
    "flagged": true,
    "source": {
      "type": "card",
      "id": "src_wmlfc3zyhqzehihu7giusaaawu",
      "billing_address": {
        "address_line1": "75 York Road",
        "address_line2": "Apartment 3",
        "city": "Oxford",
        "state": "Oxfordshire",
        "zip": "OX1 5DJ",
        "country": "GB"
      },
      "phone": {
        "country_code": "+44",
        "number": "7891 23456"
      }
    },
    "customer": {
      "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
      "email": "jack.brown@ckomail.com",
      "name": "Jack Brown"
    },
    "processed_on": "2018-10-29T16:59:20Z",
    "reference": "ORD-5023-4E89",
    "destinations": [
      {
        "id": "vendor-123456",
        "amount": 10.5
      }
    ],
    "metadata": {
      "coupon_code": "LDN2018",
      "partner_id": 123989
    }
  },
  "notifications": [
    {
      "id": "ntf_az5sblvku4ge3dwpztvyizgcau",
      "url": "https://example.com/webhooks",
      "success": false,
      "_links": {
        "self": {
          "href": "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau"
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau"
    },
    "webhooks-retry": {
      "href": "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/retry"
    }
  }
}

Other possible responses:

  • 404 - The event was not found
  • 500 - Unexpected server error

Get an event's notification summary 

View a summary of the notifications for an event.

The GET request

Use the details below to set up your request.

Endpoints

GEThttps://api.checkout.com/events/{eventId}/notifications/{notificationId}
GEThttps://api.sandbox.checkout.com/events/{eventId}/notifications/{notificationId}

Header parameters

HeaderValue

Authorization

REQUIRED

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type

REQUIRED

application/json

Path parameters

PathDescription

eventId

REQUIRED

The ID of the event.

notificationId

REQUIRED

The ID of the notification.

The GET response

Below is an example successful response.

{
  "id": "ntf_az5sblvku4ge3dwpztvyizgcau",
  "url": "https://example.com/webhooks",
  "success": false,
  "content_type": "json",
  "attempts": [
    {
      "status_code": 400,
      "response_body": "Bad Request",
      "retry_mode": "Automatic",
      "timestamp": "2018-10-29T16:59:20Z"
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/notifications/ntf_az5sblvku4ge3dwpztvyizgcau"
    },
    "retry": {
      "href": "https://api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/webhooks/wh_5nuzkt62ddxuho5rwsvt6pyesi/retry"
    }
  }
}

Other possible response: 404 - The event or notification was not found.

Retry notifications for all active webhooks 

Use this API request to retry notifications for all subscribed active webhooks.

The POST request

Use the details below to set up your request.

Endpoints

https://api.checkout.com/events/{eventId}/webhooks/retry
https://api.sandbox.checkout.com/events/{eventId}/webhooks/retry

Header parameters

HeaderValue

Authorization

REQUIRED

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type

REQUIRED

application/json


Path parameters

PathDescription

eventId
REQUIRED

The event ID.

The POST response

Below is a list of example responses:

  • 202 - Accepted. Notifications were queued
  • 204 - No content. No active webhooks are subscribed to this event
  • 404 - The event does not exist

Retry a single event 

Retry a single event for a specific webhook.

The POST request

Use the details below to set up your request.

Endpoints

https://api.checkout.com/events/{eventId}/webhooks/{webhookId}/retry
https://api.sandbox.checkout.com/events/{eventId}/webhooks/{webhookId}/retry

Header parameters

HeaderValue

Authorization

REQUIRED

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type

REQUIRED

application/json


Path parameters

PathDescription

eventId
REQUIRED

The event ID.

webhookId
REQUIRED

The webhook ID.

Can we help?

Thanks for using Checkout.com. If you need help or have a question, message our Support team at support@checkout.com.