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 event types.

Get a single event

Get a single event using the event ID.

The request

Use the details below to set up your request.

Endpoints

Live

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

Sandbox

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

Header parameters

Header

Value

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 parameter

eventId Required

The event ID.

The 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": "[email protected]",
      "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 notification for an event.

The request

Use the details below to set up your request.

Endpoints

Live

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

Sandbox

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

Header and path parameters

Header

Value

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

Value

eventId Required

The ID of the event.

notificationId\ Required

The ID of the notification.

The 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 responses

  • 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 request

Use the details below to set up your request.

Endpoints

Live

https://api.checkout.com/webhooks/{webhookId}

Sandbox

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

Header and path parameters

Header

Value

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

Value

eventId Required

The event ID.

The 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 request

Use the details below to set up your request.

Endpoints

Live

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

Sandbox

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

Header and path parameters

Header

Value

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

Value

eventId Required

The event ID.

webhookId\ Required

The webhook ID.

The response

Below is a list of example responses:

  • 202 - Accepted. A notification was sent.
  • 404 - The event or webhook does not exist.

Can we help?

Thanks for using Checkout.com. If you need any help or support, then message our support team at [email protected].