v1

latestOpenAPI 3.0.12026-07-14164671.7 KB
Card payments

Get a payment's events

You can use this endpoint to get a list of a payment’s events. A payment event is when a payment’s state changes, such as when the payment is created, or when the paying user submits their details.

get/v1/payments/{paymentId}/events

Path parameters

paymentIdstring required

Payment identifier

Response

OK - your request was successful.

payment_idstring

The unique ID GOV.UK Pay automatically associated with this payment when you created it.

Example response

{
  "_links": {
    "self": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    }
  },
  "events": [
    {
      "_links": {
        "payment_url": {
          "href": "https://an.example.link/from/payment/platform",
          "method": "GET"
        }
      },
      "payment_id": "hu20sqlact5260q2nanm0q8u93",
      "state": {
        "code": "P010",
        "message": "User cancelled the payment",
        "status": "created"
      },
      "updated": "2017-01-10T16:44:48.646Z"
    }
  ],
  "payment_id": "hu20sqlact5260q2nanm0q8u93"
}